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
198 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
597 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
840 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
235 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
529 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
472 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
780 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
922 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
1answer
557 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
1answer
6k views

nginx / php-fpm error logging

I'm trying to figure out where the PHP errors are going in my setup. I'm running nginx as the reverse proxy to PHP-FPM, but I'm not seeing the various E_NOTICE or E_WARNING messages my app is ...
2
votes
0answers
233 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
258 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
0answers
321 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
382 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
348 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
0answers
223 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
212 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 ...
2
votes
1answer
47 views

pear creates old directory after php compilation

I have deleted /usr/local/php5.3 and compiled PHP 5.3.1 in directory /usr/local/php5.3.1. After installtion pear creates its pear.conf in /usr/local/php5.3/etc. I always thought that compiling in ...
2
votes
3answers
6k 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 ...
1
vote
3answers
702 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
870 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
5answers
6k 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
336 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
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
4answers
6k 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
3k 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
2answers
496 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
621 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
7k 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 ...
1
vote
3answers
3k views

How can I install PHP5 on Fedora Core 5?

I'm trying to install PHP5 from source on FC5 and everything is configures and compiles fine. When I try to run php however I receive the following errors. PHP Warning: PHP Startup: mysql: Unable to ...
1
vote
1answer
5k 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
1answer
6k 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 ...
1
vote
1answer
3k views

How can I protect files on my NGiNX server?

I am trying to protect files on my server (multiple types), with NGiNX and PHP. Basically I want people to have to sign in to the website if they want to access those static files like images. ...
1
vote
1answer
1k 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. ...
1
vote
2answers
147 views

Visits from an ISP have 3x in two days, am I being DDoS?

My Google Analytics shows a very high increase of traffic from one ISP, being all unique visits coming from the same ISP and all of them using IE9/8/7/6. I'm getting 32% new (unique) visits, but now ...
1
vote
2answers
1k views

Ack! Upgrading Debian from Lenny to Squeeze has killed PHP!

Today I did a dist-upgrade from Lenny to Squeeze (I've done this before on many other servers without much trouble), and most everything seems to work except for PHP. Sites that use PHP just show the ...
1
vote
1answer
4k views

Debian Lenny apt-get install php5-cli Unmet dependencies help?

first time poster - long time reader and learner. Have been trying in vain for 2 weeks now to sort out a messed up PHP5.3 install on a Debian 5 (lenny) box. Each time I attempt to apt-get install ...
1
vote
4answers
8k views

“trying to connect via tcp://localhost:3306” problem with php mysql setup

I have installed the WAMp server on my windows XP machine. When I am trying to connect to DB it give the following error. Warning: mysql_connect() [function.mysql-connect]: [2002] No connection ...
1
vote
1answer
375 views

nginx 404 instead of 403 for empty directory

I have the following config for my nginx server: server { listen 80 default_server; server_name example.com www.example.com; root /var/www/example.com/web; index index.php ...
1
vote
2answers
465 views

Install php53 on CentOS 5.10 without httpd dependency

I would like to install php53 on CentOS 5.10 64-bit without the httpd dependency. The reason being the production server has a custom compiled binary of a newer version of httpd. Is installing php53 ...
1
vote
2answers
844 views

PHP mysqlnd on Debian 6

I've installed php5-mysqlnd via: apt-get install php5-mysqlnd This is a brand new virgin Debian install with just apache2 and php5 via: apt-get install apache2 echo "deb ...
1
vote
3answers
462 views

Upgrade to the latest php by aptitude

I'm install php5 by aptitude, but php release the new version and recommend we upgrade. But I unwant to compile the new version by myself. How to upgrade the php to the newest version by aptitude?
1
vote
1answer
155 views

missing config files when compiling a php extension

I do the phpize.. When I reach the ./configure It tells me it can fins the php-config (configure: error: Cannot find php-config. Please use --with-php-config=PATH) I assume it means a file named ...
1
vote
1answer
1k views

Mounting an S3 bucket onto a AWS Ubuntu instance issues

i'm using s3fuse to mount an s3 bucket onto ubuntu, so that i can take advantage of the storage space. here are some environment info: System Info: Linux ip-xxx-xxx-xxx-xxx 2.6.38-8-virtual ...