PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

learn more… | top users | synonyms

3
votes
4answers
3k views

APC (PHP Cache) Uptime 0 minutes, not caching

My goal is to implement APC for opcode cache for a drupal 6 production site. I have so far tested APC with several php files with and without including other php files with include_once. Also tried ...
3
votes
1answer
1k views

Monit is restarting apache2, should I fix the monit config, or the server config?

Monit is restarting apache2 frequently, based on the totalmem > 200m test in my apache2 stanza. I'm not sure that I actually have a problem, or if I should increase the totalmem test in my monit ...
3
votes
1answer
3k views

Confirm that mysqli extension is not installed

Recently I discovered that mysqli extension is not installed in my server Centos version 2.6. I confirm it because I change the driver of db connection from mysqli to mysql and now works fine. So, is ...
3
votes
2answers
1k views

PHP-FPM chroot with chdir

I am trying to setup a site inside of a PHP-FPM chroot. My paths are as follows: chroot = /var/www/ chdir = www/ The chroot works just fine without chdir. But when I add chdir I get this error on ...
3
votes
2answers
4k views

Configure php5-fpm for many concurrent users

EDIT: Added some configs and a clarification on how many is "many", as requested by anthonysomerset. EDIT 2: Added fastcgi_cache to nginx config, as suggested by SleighBoy. I run a server for a ...
3
votes
1answer
3k views

Php: How to enable blowfish hashing on a debian server

I'm trying to make blowfish hashing available to php on a debian server. Taken from the php manual on the crypt() function ( http://php.net/manual/en/function.crypt.php ), the following code checks ...
3
votes
3answers
10k views

Hide STRICT errors on PHP 5.4

I've upgraded from PHP 5.3 to PHP 5.4 today. Now my script is displaying a lot of error messages. How to hide them without using error_reporting(0); inside php file ? I use this: error_reporting = ...
3
votes
1answer
1k views

IP flooding despite mod_evasive?

I have an Apache 2 server running PHP5, prefork MPM, eaccelerator and modevasive. My server sometimes goes down, apparently due to flooding from some IPs. At least this is what I understand from ...
3
votes
1answer
250 views

linux + apache + mpm_worker + mod_fcgid + php5

I am using VPS based hosting for a website and found that default apache2 + prefork + mod_php is too resource intensive for my VPS to achieve acceptable concurrency. (Eating RAM) So I recently ...
3
votes
3answers
298 views

Apache serves incorrect page

To preface: this has got to be one of the strangest bugs I have ever seen, especially since it comes and goes. There exists a page called view.php and another page called save.php. The bug manifests ...
3
votes
0answers
215 views

Can't seem to set AcceptPathInfo in Apache

I'm trying to migrate an ExpressionEngine site onto a new server and seem to have run into a roadblock. For the desired functionality, EE requires the AcceptPathInfo directive to be turned on, and for ...
3
votes
1answer
237 views

What's causing so many “httpd: <ul></ul>” entries in /var/log/messages?

On a low-powered VPS I maintain, which also functions as a production server, I keep an eye on logs to crisis-manage should a site get an influx of traffic or something goes haywire (tail a bunch of ...
3
votes
2answers
187 views

Upgrading PHP 5.3.6 to 5.3.8 (Windows)

Is there an easy way to upgrade from one PHP maintenance level to another in Windows (i.e. 5.3.6 to 5.3.8)? Or is the only option to rename my current install folder, and install a fresh copy? I ...
3
votes
1answer
2k views

“Unable to initialize module” fileinfo php-pecl-Fileinfo.x86_64

I have a brand new server server that I am trying to get setup up. This is a 64 bit machine that I can not install "fileinfo" or "memcache". I have uninstalled these and reinstalled them using yum ...
3
votes
1answer
136 views

Get apache2 load new PHP5

This server is running ubuntu 9.04, apache 2 and running running PHP 5.2.6-3ubuntu4.4 from the repository. I installed another a new version of PHP (5.3.1, compiled from source), I then replaced the ...
2
votes
2answers
18k views

How do I enable the IMAP functions in PHP?

I have a LAMP box running Ubuntu, Apache 2 and PHP5 with Slicehost. I'm a bit new to all this sysadmin stuff (I'm primarily a web developer). I need to use the IMAP functions in PHP, but they don't ...
2
votes
4answers
465 views

Why does my Linux Server not recognize “php” as a program?

I am in need of using PHP from the command line. When I type php .... The system says: -bash: php: command not found Now, I know for fact that PHP is up and running b/c it hosts my drupal ...
2
votes
4answers
3k views

APC does not load when calling PHP from cli

After installing APC on CentOS 5 via pecl install apc, APC does not load when PHP is called from the CLI (when called from apache, it loads without any problems). The error I get is: root@server ...
2
votes
3answers
6k views

Tips to backup ubuntu server

I have a Ubuntu server hosting a PHP5 / MySQL webapp. I also have another server (offsite) with a directory just for backups of my webapp server. Currently, I have a simple cron job which performs ...
2
votes
2answers
5k views

How to configure Apache on Amazon Elastic Beanstalk

My PHP5.3 application is currently running on a Windows 2003 server running XAMPP 1.7.7 I've decided it will be better if I can get it moved onto the cloud, and Amazon Elastic Beanstalk looks like the ...
2
votes
1answer
552 views

what does the with-layout=gnu option do?

I am compiling PHP 5.3.6 and the compile configure command I am using as a reference uses the --with-layout=GNU option. I have done some research but I can't seem to find a detail answer. Can ...
2
votes
1answer
14k views

Enable PHP DOM extension on centOS 5.5 without recompiling

I'm trying to install the Google Data PHP Library, and the install checker is telling me that DOM isn't installed. After some googling it appeared that I needed to install php-xml, but that was ...
2
votes
4answers
2k views

solr php extension fails to run on newest Debian Wheezy

I'm trying to use the Solr PHP extension on the recently-upgraded Debian Wheezy. It installs both from PECL and from sources flawlessly but instead of giving me expected functionality it gives me this ...
2
votes
3answers
2k views

Enabling phar on Dreamhost shared hosting?

So, i'm trying to use Silex on my dreamhost account and I'm getting an error Fatal error: Class 'Phar' not found in blah blah blah... when I try to include the Silex.phar file. When I look at ...
2
votes
3answers
5k views

Nginx + Php5-fpm not rendering php files

I've spent hours figuring out how to install Nginx + Ruby Enterprise Edition + PHP5-fpm and MYSQL, finally it is all installed and all seems to have started fine. But for some reason php files are ...
2
votes
1answer
609 views

Is there an equivalent to Debian's cli/php.ini on Redhat?

How do you configure the command line version of PHP to have different settings on a Redhat system? On Debian based systems, php has a separate command-line version config file: /etc/php5/cli. On ...
2
votes
2answers
8k views

How downgrade PHP 5.5 to 5.4 or 5.3 on centos6

I have server running centos 6, i recently upgraded the php on the server to version 5.5 and noticed that some of the scripts in laravel framework i use are breaking. i get this error Parse error: ...
2
votes
2answers
73 views

What packages do I need to install to serve php pages from apache2 on Fedora 17?

This seems like it should be easy to answer, but as a php newbie, I can't find out what exactly I need to install. Some sites recommend just httpd, php and php-common; other suggestions include ...
2
votes
3answers
1k views

php-fpm version 5.4 with nginx constantly restarting

I just upgraded my php version from 5.3.x to 5.4.x and since doing this - memory has dropped signifincantly! - however, I'm constantly getting these in my php5-fpm.log: [18-Sep-2012 15:11:34] ...
2
votes
1answer
520 views

XCache loses performance gain after a day or so

I'm having some performance problems with XCache and PHP5 running on a Ubuntu 8.04 server. A few Zend Framework applications peak at about 12MB of memory. General response time before Apache 2 can ...
2
votes
1answer
84 views

Secure against c99 and similar shells

I'm trying to secure my server as much as i can without limiting my options, so as a first step i've prevented dangerous functions with php disable_functions = "apache_child_terminate, apache_setenv, ...
2
votes
2answers
2k views

Upgrading PHP from version 5.3 to 5.4.7

Quickly so to speak I have noticed this topic around, I have searched and there are plenty of solutions. However these solutions do not work for me, not only that but I'm intending to learn more about ...
2
votes
2answers
155 views

I have a fresh VirtualServer running Ubuntu 12.04, how do I get a LAMP server running?

Although I have an overview of running commands like apt-get install apache2 what I don't know is what order I should run them in to get a LAMP server running. Also, I assume I should create a ...
2
votes
3answers
726 views

How to Kill a PHP process and delete the Uneraseable File?

I'm trying to delete a file on the server but the PHP is still busy on it and wont let me delete it... FTP says SORRY cant do: > DELE ml.txt < 550 ml.txt: Permission denied > PORT ...
2
votes
1answer
543 views

Is the Debian Lenny PHP5 package secure?

For instance I'm running the php5 package using apt-get install php5. The reported version is: PHP/5.2.6-1+lenny9 However, there's currently listed 53 vulnerabilities for PHP/5.2.6 on CVE: Long link ...
2
votes
1answer
799 views

PHP 5.3 Not Logging

I have set error_log = "/var/log/apache2/php_errors.log" and made sure errors were being logged. I have set the file to be owned by the www-data owner and group and even set the permissions to 777. I ...
2
votes
2answers
2k views

Installed php-mcrypt but it doesn't show up in phpinfo()

I'm trying to install php-mcrypt on a CentOS 5.4 but while the extensions appears to be installed, there's nothing about it when I do a phpinfo(). For example, you can see below that php-mcrypt ...
2
votes
2answers
2k views

Enabling Sqlite3 for php on fedora

I am trying to get php with sqlite working on my fedora server. In the phpinfo is see that ./configure was set with the option --without-sqlite3. From what I have read these means that I might have to ...
2
votes
1answer
2k views

Running php4 and php5 along side each other

I need to have both installed and running on the same server instance for a dev environment. They both need to handle the .php extension, I have read that this can be done by .htaccess set up but ...
2
votes
2answers
529 views

How do I get Apache to use a different local PHP.ini for different domains?

is there some sort of .htaccess directive. I dont have access to httpd.conf. I have php5 in a fastcgi/cgi module. Multiple domains. But for some reason all the domains are pointing to the first ...
2
votes
1answer
1k views

PECL APC install — ERROR: 'make' failed

I get the following error when running sudo pecl install apc. /var/tmp/APC/apc_cache.c: In function '_apc_cache_user_update': /var/tmp/APC/apc_cache.c:818: error: 'IS_CONSTANT_INDEX' undeclared ...
2
votes
2answers
6k views

Apache2: Server reached MaxClients setting, consider raising the MaxClients setting

I'm encountering issues on a dedicated Ubuntu 12.04 LTS (Apache/2.2.22), PHP 5.3 with APC. Every few hours I see this happen: [Fri Aug 17 15:36:51 2012] [error] server reached MaxClients setting, ...
2
votes
1answer
2k views

How to free PHP-FPM memory?

There are several discussions complaining high memory usage of PHP-FPM, without any practical approach to overcome. As I explored the problem with numerous tests, the problem is related to the age of ...
2
votes
4answers
3k views

apache with php fastcgi keeps going down

I have an apache2 server configured with MPM worker and php fast cgi. Lately the apache logs have been telling me that MaxClients is being reached frequently, even though it's already pretty high. ...
2
votes
3answers
7k views

php5-mcrypt install errors

Running Ubuntu 9.10 and I am trying to install the php5-mcrypt module is killing me softly. I am not sure what else to try. Anyone have any idea? Here is the error i get: sudo apt-get install ...
2
votes
1answer
236 views

Why are my php extensions being compiled for PHP4 and not PHP5

I'm trying to compile memcache for Dreamhost PS. The library is created but not shown in phpinfo. Apache logs says the library isn't loaded because "undefined symbol: OnUpdateInt in Unknown on line ...
2
votes
2answers
3k views

edit httpd.conf to run PHP5?

I've installed apache and the server runs fine. I then installed PHP5, and it gave me a warning that it failed to edit the needed apache files. I did some googling and I found an article that said I ...
2
votes
1answer
961 views

Unable to install php5.5 apcu module on Debian 6.0 server

Since APC is not supported by PHP 5.5 as an OP code cache I read that I can still use APC for user data which sounds good for me. It's called APCu and it should be compatible with the old APC. ...
2
votes
1answer
2k views

How to have multiple PHP on Webmin/Virtualmin

I've scoured the internet for 4 hours now trying to find how to get newer PHP Versions on Webmin. No luck! Ideally, how do you get PHP 5.5 on Webmin/Virtualmin? If this is not available yet the ...
2
votes
2answers
2k views

Does apache 2.4 have a hard limit on connections somewhere?

Im using Apache 2.4 with prefork. My MPM directives are set as follows: <IfModule mpm_prefork_module> MinSpareServers 200 MaxSpareServers 400 StartServers 200 ServerLimit 1300 MaxClients 1300 ...