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
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
241 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
284 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
2answers
534 views

Ubuntu install php5-ffmpeg

When I try to install php5-ffmpeg: apt-get install php5-ffmpeg I get an error: The following packages have unmet dependencies: php5-ffmpeg : Depends: phpapi-20090626+lfs As I understand my ...
3
votes
1answer
207 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
184 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
134 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
4answers
421 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
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
4k 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
4answers
1k 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
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
2k views

How to add a pool to FPM (nginx) without reload/restart fpm itself?

Im building an environment (on a ubuntu 10.04.02 machine) to handle a website with many (should support at least 1000) subdomains, each of them served by a different FPM pool, with a different user. ...
2
votes
1answer
13k 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
1answer
378 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
7k 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
72 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
2answers
2k views

Installing php5-imagick in Ubuntu 12.04 w/ ondrej packages results in dependency error

I've been trying to setup an Ubuntu 12.04 VM that is running PHP 5.4 with the imagick module. All the results I find on google say to use the ondrej packages, which for the most part works perfectly. ...
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
79 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
1k 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
701 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
474 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
759 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
1k 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
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
525 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
226 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
5k 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
5k views

too many 408 error codes in access log

Apache access log is showing too many 408 error codes,nearly 400 per day. x-x-x-x - - [25/Apr/2012:22:43:06 -0600] "-" 408 0 "-" "-" there are around 400 of these kind of request from different ip ...
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
3answers
6k 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
230 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
1k 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
1k 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 ...
2
votes
2answers
168 views

What are these zero-length files created by Apache in the tmp directory?

Any ideas on why apache (httpd) creates these files in /tmp? I'm on Redhat 5.5 and Apache 2.2, mpm-prefork. -rw-------. 1 apache apache 0 Aug 14 12:46 filec1puD5 -rw-------. 1 apache apache ...
2
votes
2answers
1k views

How to install latest version of imagick on centos 5.8 64bit using bash

How can I download and install latest version of imagick on centos 5.8 64bit using bash for php 5.4. >yum info php Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * ...
2
votes
2answers
499 views

How can I override mod-php5's .php mapping to php4-cgi per VirtualHost or Directory?

I am running Debian Linux with apache2 and libapache2-mod-php5 5.3.3-7. I have one VirtualHost which requires php4. So I researched and compiled php4-cgi. However, I cannot seem to: Override ...
2
votes
3answers
704 views

Unknown Apache2 + PHP5 FastCGI 500 error .. caused by search engine bots?

My Ubuntu server is configured with Apache 2.2.8 and PHP 5.2.4-2ubuntu5.18 in FastCGI mode. Everything works well, except I am seeing 500 errors that only seem to come from bots accessing the server.. ...
2
votes
3answers
2k views

Linux SUSE - How to install PHP 5.3.x on SUSE?

I'm trying to install php 5.3.x on Suse/linux platform, but whenever I install and check it with phpinfo(); it shows php 5.2. Any idea how to deal with it? please provide the detailed instructions. ...
2
votes
1answer
232 views

PHP APC MAJOR Fragmentation Issues?

So I have been using memcached to cache lots of data that was the result of queries to the database. Everything left at default, and on average I stored < 40MB in memcache. I used memcache.php to ...
2
votes
1answer
466 views

php4 and php5 together, same extension, restrict 4 to a folder

Is there any way I could have php 4 and 5 installed in the same server, while keeping the same ".php" extension for both, and making it so only a specific folder (+subfolders) in the server run under ...
2
votes
4answers
2k 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
2answers
462 views

Why do I get a PHP 5.2.6 segmentation fault when using PDO_SQlite?

This is an installation on ModWest's shared hosting. I have enabled both PDO and PDO_sqlite on the server and phpinfo() verifies both are running. When I access PDO itself, I'm fine, and getting a ...
2
votes
2answers
751 views

date.timezone PHP error

I'm getting the infamous PHP timezone error: PHP Warning: PHP Startup: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the ...