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

23
votes
6answers
44k views

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
9
votes
4answers
13k views

nginx + PHP-FPM = “permission denied” error 13 in nginx log; configuration mistake?

I've got nginx 0.7x + PHP-FPM running under PHP 5.2.10 on one RHEL5 server, but trying to duplicate that setup under the bundled-in PHP-FPM in PHP 5.3.3 on a second server, I'm having some trouble ...
8
votes
2answers
11k views

Installing imagick PHP extension on Ubuntu

I'm trying to install the imagick pecl extension on my Ubuntu server and am getting the below error. I've installed the ImageMagick rpm using aptitude already and the pecl extension is version 2.3.0. ...
8
votes
2answers
15k views

PHP exit status 255: what does it mean?

I recently compiled a php 5.2.9 binary, and I tried to execute some php scripts with it. I can execute some scripts without problems, but one of them halts its execution midway, exiting with no errors ...
8
votes
3answers
3k views

apache2 and php5: module or filter

What the difference between the php5 module (libapache2-mod-php5) and the php5 filter module (libapache2-mod-php5filter) for apache2? Which one should I use in which environment?
7
votes
1answer
374 views

How is this even possible? PHP memory error — allowed memory size / bytes exhausted

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1540673 bytes) in /home/appdev/glicious/Nutrition.php on line 41 If you haven't noticed, 134217728 is two orders of ...
7
votes
5answers
7k views

Optimize apache for 10K+ wordpress views a day on 2GB RAM E6500 CPU

I have a dedicated server with apache/php on ubuntu serving my Wordpress blog with about 10K+ pageviews a day. I have W3TC plug in installed with APC. But every now and then server stop responding or ...
7
votes
2answers
2k views

Error When Installing PHP5 on IIS6

I am trying to install PHP on my Windows Server 2003 machine that is using IIS6. I followed this guide for installing it, including using the binaries of fastCGI. I think I did everything correctly, ...
7
votes
1answer
8k views

Where is php.ini-development on Ubuntu LAMP?

On my development machine I run Ubuntu 10.04.1 LTS. Following the official documentation, I used the following command to install Apache, MySQL and PHP in one go: sudo tasksel install lamp-server ...
7
votes
2answers
4k views

pecl install mongo - keeps compiling with wrong module API

Working with Ubuntu 12.04 here, nginx and php5-fpm I had mongo working well on php 5.3, then I added the ondrej/php5 ppa and updated to php5.4. It kept GD and CURL extensions, but not mongo. I ...
6
votes
2answers
4k views

Running phpmyadmin and suphp

I have a Debian Lenny web server. It is running apache2 with libapache2-mod-suphp. Unfortunately, suphp makes impossible to use phpmyadmin, as phpmyadmin is installed in /usr/share/phpmyadmin and ...
6
votes
2answers
6k views

configure: error: Cannot find php-config. Please use --with-php-config=PATH

I'm trying to install a program called phraseanet. I ran the ./configure command and run into this error: configure: error: Cannot find php-config. Please use --with-php-config=PATH I am using ...
6
votes
4answers
739 views

Apache Never runs after configuring eAccelerator and FastCGI

I recently configured accelerator and fastcgi with apache using: http://secure-ubuntu-server.blogspot.com/2009/07/howto-performance-tuning-of-lamp-and.html Now my Apache never starts. Logs shows: ...
5
votes
3answers
10k views

PHP installation on IIS: ISAPI or CGI?

I'm running IIS6 on Windows Server 2k3, and currently have PHP installed as a ISAPI module. We're about to upgrade our environment to PHP 5.3.0, and this made me wonder whether I should stick with the ...
5
votes
1answer
5k views

How is memcache distributed?

I've got memcache running on 5 web servers all of which are on the host list in php and which are load balanced on the front end. So since memcached is supposed to be distributed the php client will ...
5
votes
6answers
773 views

smallest possible linux installation with apache

I want to setup a linux vm with apache and php and mysql support, which version of linux should I pick up. I dont have a good bandwidth, preferably a smaller ISO of the installer is also appreciated.
5
votes
4answers
14k views

Downgrade PHP 5.4 to 5.3 in Debian

I had to do a Debian dist-upgrade on my server... in the process, PHP got upgraded to 5.4. We use ioncube which only supports up to 5.3 atm, and I'm having some trouble finding how to downgrade to ...
5
votes
3answers
9k views

Howto install php 5.2.17 on centos 6 x86_64

Does anyone know how to install php 5.2.17 on a 64bit centos 6 install? I've got a old legacy system that requires php 5.2.17, but centos 6 only supports php 5.3. I've installed repo's such as ...
5
votes
1answer
894 views

Apache 2.4 with PHP-FPM .htaccess redirection

I have Apache 2.4 set up with PHP-FPM on a server. To pass from Apache to PHP-FPM I use the following: ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9001/hosting_files/site.com/admin_secure/$1 ...
4
votes
2answers
8k views

php - error: Cannot find OpenSSL's <evp.h>

Im trying to recompile PHP, but ./configure fails at : configure: error: Cannot find OpenSSL's <evp.h> I have LibSSL 1.0.0, LibSSL 0.9.8, LibSSL-Dev, OpenSSL installed. ...
4
votes
5answers
7k views

What causes PHP pages to consistently download instead of running normally

I'm running a Ubuntu Server on a VM, to test out different web forum solutions. I have set up a ~/public_html/ to be accessible with the apache2 web server, and that works fine. However when I go to ...
4
votes
5answers
10k views

Upgrade Centos 5 tot PHP 5.2 or 5.3 [recommended way?]

We are using Zend Framework and in version 2, php 5.2 will be the minimum requirement. We love CentOS and we'd like to keep using it, but PHP 5.1 just won't do anymore when developing web applications ...
4
votes
2answers
8k views

How can i enable byte range request?

How can i enable byte range request? While pod casting on itunes it gives an error message "There is a problem with your feed. Your episodes are hosted on a server which doesn’t support byte-range ...
4
votes
1answer
26k views

Correct PHP5 DLL for Apache 2.2?

I have installed Apache 2.2.14 (Win32) on a Windows XP machine and am trying to add the latest PHP module. I downloaded the ZIP file from here labeled "VC9 x86 Non Thread Safe" and extracted to my ...
4
votes
2answers
904 views

Why are DNS lookups not respecting /etc/nsswitch.conf & /etc/host.conf?

I have an issue where hostnames are being looked up from DNS even though they are present in /etc/hosts. I have the following configured: /etc/host.conf: order hosts,bind /etc/nsswitch.conf: ...
4
votes
2answers
293 views

Installing PHP on linux

I'm trying to setup php with oci8 support. I think I've configured all correctly before starting with oci, here is how I tried to start the install : ./configure -prefix=/common_share/APACHE/server ...
4
votes
1answer
2k views

After compile install php 5.3.1, I can not find my php.ini file

my compile configuration: ./configure \ --with-fpm \ --with-libevent=shared,/usr/lib \ --with-mcrypt \ --with-zlib \ --with-curl \ --enable-mbstring \ --with-openssl \ --with-mysql \ ...
4
votes
3answers
4k views

Install php-mssql in CentOS 6.2

I have a server running CentOS 6.2 with Plesk 10.4. When I SSH in, and try and install ms-sql extension it says "No package php-mssql available." I can't seem to find much on Google for this, and I ...
4
votes
3answers
1k views

php5-gd shows in “php -i | grep -i gd” but not in phpinfo();

I am trying to enable GD in my installation of Apache2, PHP5 and MySQL on my Ubuntu server. I installed php5-gd with: apt-get install php5-gd And when I run php -i I get: gd GD Support => ...
3
votes
5answers
22k views

Find (or enable?!) php.ini on Ubuntu 10.10

Hiho! Today I leave my comfort zone and want to edit my php.ini file and... guest what? It doesn't exist! $ php --ini Configuration File (php.ini) Path: /usr/local/lib Loaded Configuration File: ...
3
votes
4answers
368 views

How can I get PHP on my local computer system? [closed]

How can I test out PHP scripts on my local computer before uploading them? I'm a bit new to this so sorry for the simplicity. My domain provider's installed PHP version is 5.2.2 if that helps. EDIT: ...
3
votes
4answers
5k views

Can I run PHP 5.3 and PHP 5.2 on the same server with Apache?

I just curious if there's a way I can set up my development box so that I can have some sites running PHP 5.3 and some with PHP 5.2, and that I can switch between them fairly painlessly.
3
votes
5answers
2k views

apache-user & root access

I want to develop few scripts in php that will invoke following commands; using exec() function service network restart crontab -u root /xyz/abc/fjs/crontab etc. The issue is that Apache executes ...
3
votes
3answers
4k views

Why is this mod_rewrite RewriteRule directive not working in the .htaccess file?

I've got a site that was hosted on a linux el cheapo hosting service that I'm migrating to my Mac OS X 10.5 Leopard Server server running Apache 2.2.8 & PHP 5.2.5 w/rewrite_module enabled and ...
3
votes
3answers
6k views

Exclude a specific repo from YUM Update

I am doing a system wide yum update on RHEL 5.5 and the IUS EPEL repository is throwing a missing dependency error: php53-mcrypt-5.3.3-4.ius.el5.x86_64 from installed has depsolving problems --> ...
3
votes
2answers
6k views

Couldn't find package php5-fpm

I'm trying to set up nginx with PHP5 and MySQL on my production VPS. The reason I chose nginx over Apache was because the VPS isn't high spec. nginx is installed, and is successfully serving static ...
3
votes
2answers
1k 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
1k 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
635 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
381 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
3answers
5k 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
2answers
4k 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
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
222 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
1answer
1k 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
873 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
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 ...