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

2
votes
2answers
531 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
2k 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
1answer
3k views

Apache 2.4: mod_php vs php-fpm performance

There are plenty of old benchmarks on Apache mod_php vs nginx with php-fpm However, with version 2.4, Apache can use php-fpm. Are there any sensible benchmarks comparing mod_php with php-fpm (both ...
2
votes
2answers
7k 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
3k views

Setting php values in php-fpm confs instead of php.ini

I'd like to set values in php-fpm conf files what are normally set in php.ini. I'm using nginx. I've created the following setting, but I'm not sure if this would work. php_value[memory_limit] = 96M ...
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
237 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

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
3k views

How do I disable functions on servers for particular directories?

I want to disable some functions on server to improve security of server. I followed these steps: STEP: 1 Open php.ini file: vi /etc/php.ini STEP: 2 Find disable_functions and set new list as ...
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 ...
2
votes
2answers
217 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
2k 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
661 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
913 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
3k 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
236 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
570 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
2answers
480 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
795 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 ...
2
votes
1answer
925 views

How many fast-cgi processes to use with PHP-FPM and NginX

Does anyone know of a good source out there - or possibly can answer this in here - that can guide me as to how many Fast-cgi processes and Nginx processes I need to have running to serve a moderatly ...
2
votes
0answers
831 views

“echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message

One of my server (Ubuntu 12.04, 16CPU, 32GB RAM) runs the app section of my website (Nginx 1.1.19, PHP5-FPM, Php 5.3.10, Symfony2 Web Framework) Suddenly, users started getting HTTP 5** Errors. When ...
2
votes
0answers
106 views

How can I stop IIS 7.5 adding it's own redirect HTML to one issued by PHP?

I have an IIS 7.5 server configured with PHP 5.4.5 running through FastCgi. PHP is configured to return gzip encoded data if the client supports it. My problem is when I issue a 303 See Other header ...
2
votes
1answer
1k views

Session variables not persistent in PHP5/Apache2/Ubuntu12

I have a website that uses session variables (in PHP) to know if the visitor is entering the website or not. If he's new, then I redirect him to the detected language. But if he's not new, you let him ...
2
votes
0answers
316 views

nginx/php + zurmo, rewrite or internal redirection cycle

I am trying to get Zurmo CRM running on my Debian Jessie system on localhost. I couldn't find an example nginx config and the application needs to rewrite URLS, which I have done wrong. I also use ...
2
votes
1answer
282 views

Zend 1 on Ubuntu with MSSQL not working

Does anyone know how to solve the following issue? If not, does anyone know how to setup Zend 1 on Linux to communicate with msSQL server? We get the following error in the nginx logs when trying to ...
2
votes
1answer
337 views

PHP 5.2, Apache 2.2, Windows 8, PHP not parsing

I have an apache httpd 2.2 installation on windows 8 (using the installer, installed to C:/Program Files (x86)/Apache Software Foundation/Apache2.2) and a php 5.2 installation (using the .zip, ...
2
votes
1answer
434 views

Can't install php5-apc from dotdeb source in Debian 6

I can't install php5-apc: ~# apt-get install php5-apc Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that ...
2
votes
0answers
370 views

PHP + ImageMagick Performance Issues

Good Day, I have two environments: OpenVZ VPS and Pentium 4 local dev machine. They have all packages installed the same way. ImageMagick is compiled from sources without OpenMP support. When I run ...
2
votes
2answers
1k views

500 internal server error php long running process

I am trying to run a long php process and it ends with the 500 internal server error. It executes fine for about 8 mins. I have rebooted the machine after changing the php settings. PHP Config: ...
2
votes
0answers
248 views

php5-geoip performance issue

I installed the php5-geoip module on Ubuntu 10.04 via apt-get install php5-geoip. I've updated the geocities.dat library The production server performance decreased and load average is soaring. ...
2
votes
1answer
221 views

apache 2.2 with php 5.3 and miscrosoft sql 2008 crash

I am using Apache 2.2 with PHP 5.3 and Microsoft SQL Server 2008 on Windows Server 2008 64-bit. Every 3 to 5 hours, I get the error in the event viewer that Apache crashed for 20 seconds and then ...
2
votes
1answer
1k views

APC configuration on Ubuntu 10.4. Problem with apc.shm_size, apc.shm_segments and Apache

I installed apc on my ubuntu 10.4 vps today using the following lines. sudo apt-get install php-apc sudo /etc/init.d/apache2 restart While everything works fine. I encounter problems configuring ...
1
vote
3answers
741 views

Problems upgrading from PHP 5.1.6 to 5.2.9

I have a web server running Fedora Core 5 (yes, I know it's very old) and it was running PHP 5.1.6 so I downloaded and compiled the source for 5.2.9 and restarted the server and phpinfo() still ...
1
vote
5answers
893 views

CentOS replacement for PHP development machine?

I'm just starting learning Linux. I'm using CentOS 6.3 and i really like it. However I need PHP 5.4, currently not available for CentOS. I've read that CentOS, for its very own nature, doesn't update ...
1
vote
3answers
2k views

PHP 5.4.6 or 5.3.16 for production?

On php.net, we can read : All users of PHP are encouraged to upgrade to PHP 5.4.6, or at least 5.3.16. Does it mean that it is better to use 5.4.6 than 5.3.16, even for production ? I have heard that ...
1
vote
1answer
2k views

I cannot install APC

I have php 5.3.6 and ubuntu. I want to install APC. When I do the $ pecl install apc, I eventually get an error: In file included from /tmp/pear/temp/APC/apc.c:44:0: ...
1
vote
1answer
4k views

php5 fpm: how do you generate core dump from segfault?

Under load, my PHP5-fpm (on 32bit ubuntu 10.10) produces segfaults like the following: kernel: [4881937.884863] php5-fpm[2638]: segfault at 4204eb41 ip 0832d235 sp bfcea5e0 error 4 in ...
1
vote
5answers
7k views

How to compile PHP 5.3 CGI?

php-cgi seems to have vanished in PHP 5.3.1. I've tried both the --enable-cgi and --disable-cli flags for ./configure, but it doesn't create a binary under the sapi/cgi subdirectory.
1
vote
2answers
420 views

PHP add virtual host dynamically

I'm developing a PHP web application that, among other things, needs to allow the user to add, edit and delete Apache virtual host entries. (I'm Including a web-writable config file in my ...
1
vote
1answer
26k views

How to install php-xml and php-mbstring on PHP 5.4.9-4?

I have added the PHP5 to UBUNTU 12.04 sudo add-apt-repository ppa:ondrej/php5 -y and installed the PHP5 php5 php5-common php5-mysql php5-xmlrpc php5-cgi php5-curl php5-gd php5-cli php5-fpm php-apc ...
1
vote
4answers
7k views

How to install php-devel under CentOS 6.3 x64?

I'm trying to install php-devel on my CentOS 6.3 VPS and get a failed dependencies test. From phpinfos(): SYSTEM Linux 2.6.32-279.5.2.el6.x86_64 #1 x86_64 NTS error: Failed dependencies: ...
1
vote
1answer
1k views

PHPMyAdmin is being attacked

I am running a Debian server with PHP5, Apache 2.2.16 and PHPMyAdmin (I don't know how to check the version number), Logcheck and some other programs. Today Logcheck begin to attach multiple lines ...
1
vote
1answer
8k 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 ...
1
vote
2answers
539 views

Fedora 8 upgrade PHP > 5.2.4

One of my current company servers is using old Fedora 8 and web apps compatible with PHP 5.2.x. Currently the PHP version is 5.2.4. I would like to upgrade it minimum 5.2.5 so that Drupal-7 can be ...
1
vote
1answer
1k views

centos cron job running php file

I have a php file under php called test.php set to run every 5th minute of the hour. When ever I run the file manually (by going to the web browser and runnint the path) it works fine. But when the ...
1
vote
3answers
668 views

Can I log ALL Apache traffic?

I'm talking about all the traffic, including complete incoming and outgoing HTTP requests and responses. I'm using the latest Ubuntu, Apache2 and PHP, and need both the headers and the page data--the ...
1
vote
1answer
8k views

Can't find Role Services in Windows 7

I'm trying to install PHP on Windows 7 Home Premium using these instructions: Using FastCGI to Host PHP Applications on IIS 7 and a 1/3 of the way down on the page I have to do this: Server ...