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

35
votes
7answers
68k 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.
10
votes
4answers
15k 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 ...
10
votes
2answers
12k 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. ...
9
votes
2answers
19k 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 ...
9
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 ...
8
votes
5answers
8k 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 ...
8
votes
1answer
9k 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 ...
8
votes
3answers
4k 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
381 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
2answers
3k 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, ...
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
4answers
18k 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 ...
6
votes
2answers
7k 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
761 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
11k 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
6answers
984 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
1answer
6k 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
3answers
6k 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 ...
5
votes
3answers
11k 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
2k 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 ...
5
votes
1answer
2k views

PHP5-FPM does not create unix socket directory within /var/run

I've set up my php5-fpm to bind to a unix domain socket within /var/run/php5-fpm. /etc/php5/fpm/pool.d/www.conf listen = /var/run/php5-fpm/$pool.sock The problem is that it will not automatically ...
4
votes
2answers
12k 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
8k 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
11k 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
9k 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
29k 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
2k 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
418 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
3k 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
2k 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 => ...
4
votes
2answers
1k 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
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
412 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
2answers
6k views

Error installing APC in apache2 VPS with php-5.5.1

When I install APC: pecl install apc I'm getting this error: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. ...
3
votes
1answer
1k views

PHP5-FPM and 'ondemand'

I've set up a server with Nginx and PHP5-FPM, and things are running fine. However, as I add more and more sites to the server I see that the memory usage steadily increases, and I've come to the ...
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
9k 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
4answers
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. ...
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
717 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
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. ...
3
votes
1answer
425 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
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
1answer
3k 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
233 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. ...