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
2answers
2k views

Setup PHP/MYSQL for chrooted jail (jailkit)

I'm running Ubuntu, with PHP5-FPM, mysql & Nginx I've just setup a chrooted jail with jailkit. Now I need to work out how to setup my php and mysql to work within the jail. Google search doesn't ...
3
votes
2answers
2k views

Apache + PHP in paths with accented letters

I'm not able to run a PHP enabled web site under Apache on Windows XP if the path to DOCUMENT_ROOT contains accented letters. I'm not referring to the script file names themselves but to any folder in ...
3
votes
1answer
6k 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
1answer
842 views

APC and “apc.gc_ttl” :: How Low is Too Low?

I currently have my apc.gc_ttl set to 600 to help keep fragmentation down. Since apc.gc_ttl just sets the time on cache for garbage collection, I don't see any harm in keeping it this low. However, ...
3
votes
1answer
495 views

How to disallow use of disable_functions in?

I'm obviously not the first one to have this problem, but I cannot not find an answer to this situation. I want to lock down PHP a bit, more specifically the use of disable_functions. The environment ...
3
votes
2answers
5k views

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

I am trying to setup my machine with pecl_http and memcache and in both cases, I get similar errors. This is on MAC OS X 10.7.3 (lion) and I also have XCODE installed on it. I also installed Zend ...
3
votes
3answers
6k views

apache not displaying php pages, offering them for download instead

we are trying to setup apache (apache 2 in this case, although apache does the same thing) and html pages display just fine, however, any php pages linked into buttons on the front page are offered ...
3
votes
3answers
2k views

Apache: How can I serve JavaScript via PHP?

I want to serve my JavaScript files via a PHP script. An example would be: If I were to request a JavaScript file called dir/my_file.js The server should redirect the request to a handler script ...
3
votes
1answer
6k views

Downgrading PHP 5.4 to 5.3 on CentOS 6.5?

I am trying to downgrade PHP from 5.5.8 to 5.3.x. I have tried this but it dint work for me. yum downgrade php The error I have got is Loaded plugins: fastestmirror, refresh-packagekit, ...
3
votes
1answer
255 views

How to monitor multiple sites using one copy of apc.php?

Regarding my particular APC setup: APC 3.1.9 PHP 5.3.3/fCGI/SuEXEC Apache 2.2.15 CentOS 6.3 I would like to keep only one copy of apc.php that can be accessed via any of the vhosts on the server. ...
3
votes
3answers
3k 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. ...
3
votes
4answers
4k 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
2k 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
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
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 ...
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
4k 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
12k 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
2k 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
258 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
303 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
191 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
138 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 ...
3
votes
3answers
10k 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
4answers
521 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
1answer
16k 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
5k 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
1answer
8k views

Unable to install PHP-FPM on Apache (Failed to connect to FastCGI server)

I have been having problem installing php-fpm for use with apache2-mpm-worker. This is the guide that I am following. According to the guide's Step 5, Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi ...
2
votes
1answer
634 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
10k views

How do you completely purge Apache, MySQL, PHP, and phpMyAdmin on Ubuntu? [closed]

I really need to completely purge my web server on Ubuntu 12.04. I have tried sudo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin (which ...
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
3k 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
2answers
3k 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
823 views

How to Upgrade to PHP 5.5 on Windows Server 2008

What is the proper way to upgrade from PHP Version 5.4.32 to PHP Version 5.5.22 on Windows? All that I can find is how to to install. PHP is already running on Windows Server 2008 R2 64 bit alongside ...
2
votes
2answers
3k views

PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so'

I have updated my php from 5.3.3 to 5.4.31. I have a Debian 6 Squeeze. PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/apc.so' - /usr/lib/php5/20100525/apc.so: ...
2
votes
1answer
739 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
11k 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
74 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
2k 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
8answers
12k views

Apache is not interpreting .PHP files

I recently downloaded OpenSUSE OS version 11.4 from the site to use it as a server..In order to do that I downloaded the server edition that has Apache/2.2.17 and PHP5 downloaded by default.....Ok ...
2
votes
1answer
598 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
3answers
7k views

Update from PHP 5.3 to 5.4 on CentOS 6.3 while keeping Plesk [closed]

I need to update the servers PHP version, but when I try to remove the old php to install the new PHP 5.4 via yum it wants to remove the whole plesk suite which I want to keep. I followed this guide ...
2
votes
1answer
85 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
8k 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
2answers
156 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
1answer
2k views

Disable DNS Caching PHP

I need to get the latest A records of a DNS in a script. The script is doing some monitoring operations. The Default TTL of DNS record is 5 minutes, but the monitoring script is running every minute. ...
2
votes
3answers
753 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 ...