The tag has no usage guidance.

learn more… | top users | synonyms

4
votes
3answers
17k views

Apache executes HTML, but not PHP; PHP CLI works

I am running php 5.3.3 on rhel 6.2 with Apache 2.2.15 and am failing to get PHP code interpreted by Apache. There are no errors (in the system log, httpd/error_log, or php_errors.log) - I have ...
2
votes
4answers
3k views

Do PHP files need read permission to be executed in CLI?

I have a php file test.php #!/bin/php <?php echo "test"; ?> This file owned by root and its permissions are these -rwxr-x--x so 'others' can execute, but cannot read. When logged in ...
2
votes
3answers
2k views

PHP cli uses different php.ini file when run by cron

My CakePHP console script is having problems executing under cron. It complains about missing Mysql connections and such. After a little investigating I found that php run by cron uses a different ...
2
votes
2answers
4k views

PHP Warning: PHP Startup: apc.shm_segments setting ignored in MMAP mode

Any ideas on how i can fix this warning? Getting this while executing it from shell, on FreeBSD 8.x # /usr/local/bin/php --run 'echo "test";' PHP Warning: PHP Startup: apc.shm_segments setting ...
2
votes
1answer
56 views

PHP CLI not loading IMAP extension

When I try to run a script that uses imap in my browser, it works fine (it is loaded from a Ubuntu 14.04 server on my network with the extension installed). However, when I try to use PHP CLI on said ...
2
votes
2answers
918 views

Enable coloured PHP CLI messages on console [closed]

How to enable coloured messages for PHP CLI on console (Mac OS X, latest PHP/Apache from MacPorts)? export CLICOLOR=1 export LSCOLORS=gxfxcxdxbxegedabagacad doesn't seem to be enough, all PHP CLI ...
2
votes
2answers
3k views

Changes made to cli's php.ini not taking effect

I have two php.ini files - /etc/php.ini which loads in case of cli /opt/lampp/etc/php.ini which loads in case of browser. I am able to use PHP's Mailparse extension after adding the line ...
2
votes
3answers
622 views

PHP-CLI cannot execute scripts on Samba Share (using cifs) inside a guest VM (Centos 6)

I have a centos 6 VM running as a guest within Virtualbox. I've set up a LAMP stack which I am able to access from the host (Windows) environment. I've mounted a SMB share using 'mount -t cifs' and I'...
2
votes
1answer
1k views

PHP CLI: Call to undefined function mysql_connect() even with mysql module enabled

I try to run a PHP script from the command line, but get the following error: Call to undefined function mysql_connect() However, the mysql module is loaded: root /var/www/scripts # php -m | grep ...
0
votes
2answers
61 views

How to run 5 php processes, which uses different eth interfaces?

I'm using cron to run everyday script, which has to run 5 php-cli processes. I need them to use separate interfaces. I have 5 devices, eth0, eth1, eth2, eth3, eth4. How can I call php to make sure ...
0
votes
1answer
218 views

The apache2handler SAPI is not supported by pthreads

It has been weeks now that I cannot install pthreads. I am going to list the error logs then I will list my configuration options. These are the errors I get:(Apache Error Log) The apache2handler ...
0
votes
1answer
286 views

PHP 7 Module already loaded warnings

I have a machine running Ubuntu 14.04.3 LTS that is deployed via Ansible. I've got PHP 7 installed using Ondřej Surý's PPA for PHP. $ dpkg -l | grep -i php ii libapache2-mod-php7.0 7.0.3-...
0
votes
1answer
185 views

What are the affects of disabling CGI on my server to enable PHP CLI

I have a DS WHM - cpanel running apache / with litespeed I have a number of websites running on this server I need to run CLI on one of the sites the CGI module is enabled in the apache build. The ...
0
votes
0answers
21 views

Render backslashes in environment variables

I am on CentOS 7 with PHP 5.5.34 (cli) I have some environment variables set in /etc/environment and have my apache config set to use /etc/environment as one of it's EnvironmentFile directives in ...
0
votes
1answer
400 views

Configuring php7.0 with apache2

I'm running the newly released php7.0 on debian jessie. By now it works all fine. Enabling the pdo_mysqli, I have found mutliple configuration directories for php7. There are: apache2 cli fpm I'm ...
0
votes
0answers
391 views

Bus error during PHP5 is running a simple script - what?

When working with PHP scripts, I usually do not have to bother with the underlying system. Today, I have to. A PHP script (cronjob) that has worked fine is crashing since 2 days ago. The cronjob mail ...
-1
votes
2answers
572 views

PHP CLI error: Could not startup

I just installed the php5-cli package in Ubuntu 11.04. If I run: /usr/bin/php5 -a # The -a is for interactive mode I get the output: Could not startup.. However, if I add the -n option, which ...
-2
votes
2answers
137 views

enabling php-cli in php5

i wanted to install php-cli in php5.2.11..does it come built-in or should i install it?