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
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 ...
2
votes
1answer
643 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
836 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
2k 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
537 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
3k 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
4k views

Installing SSH2 on Windows Server using PHP5.5 VC11NTS

for the past few days i've been aching my brain on installing the SSH2 Connection on PHP. My current setup is VC11 Non thread safe, which I have downloaded the appropriate zip folders on the PECL ...
2
votes
1answer
4k 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
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
4k 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
239 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
2k 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
3k 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
5k views

php-fpm Bad file descriptor errors

I'm using php-fpm with customer separate pools. Sometimes page are freezing, then showing 500 internal server error, and I'm getting such errors in error log: [11-Feb-2013 22:12:39] ERROR: unable to ...
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
226 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
726 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
997 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
592 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
486 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
807 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
927 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
2answers
107 views

206 Partial Content returned with Content-Length: 0

I'm serving large audio files on an Apache server using mod_xsendfile (version >= 0.10). The files are served fine when I use header( 'HTTP/1.1 200 OK' ); However, those files are served in full. ...
2
votes
0answers
2k 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
2answers
763 views

Nginx server block not working

Disclaimer: Just to clarify, I'm completely new to Linux, but I've configured everything via google searches and personal research. I've got a Debian Wheezy server with LEMP stack that I intend to ...
2
votes
0answers
144 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
0answers
512 views

SuexecUserGroup not working in Apache 2.4

I have upgraded my PHP from version 5.3 to 5.4 via yum which requires upgrading Apache from version 2.2 to 2.4. After doing configuration, it turns out that the userid and groupid is still using the ...
2
votes
1answer
2k 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
364 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
299 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
346 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
463 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
393 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
3answers
2k 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
256 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
229 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
758 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
915 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.