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

13
votes
3answers
42k views

nginx errors “recv() failed (104: Connection reset by peer) while reading response header from upstream”

I have a server which was working ok until 3rd Oct 2013 at 10:50am when it began to intermittently return "502 Bad Gateway" errors to the client. Approximately 4 out of 5 browser requests succeed but ...
5
votes
3answers
2k views

PHP as CGI or Apache Module?

I've always believed that PHP works better installed as an Apache module, but recently, someone on a local forum pointed out that running PHP as CGI is better security-wise. I've done some googling ...
3
votes
3answers
11k views

Alias using Nginx causing phpMyAdmin login endless loop

Recently I've been trying to set up a web server using Nginx (I normally use Apache). However I've ran into a problem trying to set phpMyAdmin up on an alias. The alias correctly takes you too the ...
3
votes
1answer
1k views

Cent OS upgrade PHP

I'm in the midst of resolving a bunch of security issues on a clients server to get them compliant with credit card laws and such. The first order of business is getting php from 5.2.14 to 5.2.16. ...
10
votes
3answers
19k views

Change default from address from Postfix from www-data to something else

Setting up Postfix and Apache/PHP on an Ubuntu server. Mail's now going out ok with the proper domain name, but the local part display name is always "www-data" as I'm assuming Postfix uses the name ...
9
votes
4answers
71k views

How do I enable SQLite on Linux/Apache/PHP?

To enable SQLite on my Windows/Apache/PHP setup, I uncomment the following lines in the php.ini file and restart Apache: extension=php_pdo.dll extension=php_pdo_sqlite.dll Now I have a VPS with ...
6
votes
3answers
8k views

How to use FastCGI globally and Basic Auth in sublocations in nginx?

I recently deployed my first nginx setup and everything works really nice, except the location parsing is driving me nuts. I have a simple php fastcgi setup like this: location ~ \.php { if (!-e ...
5
votes
1answer
4k views

How do I decode this WordPress hack? [closed]

I found an offending string in a client's WordPress-powered website, and I just want to know what it does. ...
3
votes
4answers
5k views

CentOS - PHP - Yum Install with Custom ./configure params

I have successfully configured and compiled php on my dev server, and works great, but after talking to a sysadmin buddy, he informed that custom compiles of the latest builds are not recommended for ...
1
vote
1answer
9k views

Apache: How to switch to CGI/FastCGI Server API?

I've installed the mod_fastcgi on my Apache and put LoadModule into my httpd.conf file. When I do a phpinfo(), mod_fastcgi is in the loaded modules section, but the server API still shows up as ...
9
votes
4answers
38k views

How to --enable-dom without recompiling PHP?

From the output of phpinfo(), --disable-dom are included the configure command. How do I change it to --enable-dom without recompiling PHP? Edit: I'm using Fedora 10. The PHP i'm using is the one ...
5
votes
5answers
3k views

Apache on Windows in production environment? Why not?

"Everyone" know that Apache is for Linux/Unix and on Windows IIS is the way to go. However, I'm not a pro at Linux and it would be an enormous relief for me to use just the same setup in the ...
4
votes
3answers
19k views

How to configure a real domain name for sender address

I tried to sending out an email using php mail() function but it failed somehow, complaining that a real domain name is required. The following is observed in the maillog: sendmail 4984 r25984: ...
4
votes
3answers
16k views

Apache executes HTML, but not PHP; PHP CLI works

I am running php 5.3.3 on rhel 6.2 with Apache 2.2.15 and am failing to get PHP code interpreted by Apache. There are no errors (in the system log, httpd/error_log, or php_errors.log) - I have ...
3
votes
2answers
6k views

PHP + Apache long wait time

I've run into a bit of a brick wall with troubleshooting my dedicated websever. Recently, my website spiked with the amount of request/per second and it crashed. The box original had 8GB of RAM, 8 ...
3
votes
1answer
3k views

Different PHP-configs in Nginx

I have a web-server running multiple server (virtual hosts) using nginx and fastcgi passing to a unix-socket. What I want to accomplish is a set-up with beta.example.com and live.example.com, where ...
3
votes
2answers
12k views

What is nginx equalant for my htaccess mod_rewrite?

Previously i was using linode VPS running Apache for my CodeIgniter website. Today i installed nginx and my website landing page is coming but the other pages that is using htaccess for rewriting URL ...
3
votes
5answers
811 views

Good starting resources for system administration

I'm a PHP web developer and I'd like to start learning more about system administration and was wondering if anyone had any good resources/starting points to look at. I have an old computer I can ...
2
votes
3answers
425 views

How do I improve the performance of my Drupal site with a lot of concurrent users?

I have a Drupal site that may receive a very high hit rate on launch. We've rented a very beefy server for the initial launch, after which we'll downscale. The server has a Xeon E5-2670 8 core ...
2
votes
1answer
555 views

Why HTTP sniffers aren't able to capture PHP generated HTTP traffic?

I can't get why HTTP Analyzer (I prefer this one because it is capable of decoding SSL encoded data transfered through HTTPS) isn't able to capture PHP generated HTTP traffic. It capture HTTP traffic ...
2
votes
1answer
113 views

Dedicated Server emails ending up in Junk

I have a dedicated server that works fine. Recently I added a new domain with a new dedicated IP address. The emails from the webserver gets sent out from the primary IP address which is different ...
2
votes
4answers
7k views

Recommended method to upgrade PHP 5.1.6 to 5.2.x on CentOS 5.4

It's been awhile since this type of question was asked here. Perhaps the recommended solution has changed. I have a CentOS 5.4 mail server running RoundCube webmail. By default, RoundCube expects PHP ...
1
vote
0answers
133 views

Handling multiple server blocks in nginx configuration

I am working on setting up a proxy server for my application.The use case is I want a specific set of requests to be redirect to say abc.com and rest of the request to be redirected to xyz.com. Eg:If ...
1
vote
1answer
3k views

How can Django/WSGI and PHP share / on Apache?

I have a server running an established PHP site, as well as some Django apps. Currently, a VirtualHost set up for PHP listens on port 80, and requests to certain directories are proxied to a ...
0
votes
1answer
104 views

What options do I have, to replace Apache web server? [closed]

I need a web server that runs php and does not create so many processes (today I checked the running processes list and there were like 90 of them called 'httpd', 300kb each), I only know these but I ...
0
votes
1answer
1k views

APC File Cache not working but user cache is fine [closed]

I have just got a VPS (with cPanel/WHM) to test what gains i could get in my application with using apc file cache AND user cache. So firstly I got the PHP 5.3 compiled in as a DSO (apache module). ...
0
votes
4answers
2k views

Which free antivirus can I use for a php application?

I need to analyze the files uploaded to my site. What options do I have? I'm in a dedicated, so I can install things on Linux. Is it normal for a site to analyze every file uploaded? Can this be done ...
0
votes
1answer
2k views

Configrue Exim Sendmail for relay

I have a VPS server at UltraHosting.com and requires that I use "Smart Relay" when sendning emails. However I cannot send mail using the php mail() function. Here is an article they have on Smart ...
0
votes
4answers
165 views

LAMP Staging Server with linux users

I need to have a mirror server of my production server so that I can test everything on that server first before implementing on production. To mirror production server I need to copy current PHP ...
7
votes
3answers
2k views

linux: one apache two php versions. possible?

it seems that some of my php applications require php 5.2 and some require php 5.3. is there a way to configure apache (v2.2.14) that one virtualhost will work with one php library and a different ...
4
votes
2answers
186 views

Recompiled PHP, now Apache not parsing PHP files

I recompiled PHP earlier today, now when you access PHP pages in a browser, Apache displays its source code instead of parsing it. Do I need to reset some configuration or recompile Apache? This is ...
3
votes
0answers
256 views

LDAP over TLS fails to connect, Schannel Alert 48

I am trying to use PHP to edit users in active directory through LDAP. My test machine is using a simple WAMP setup and is NOT connected to the windows domain. This machine can connect to LDAP on the ...
3
votes
2answers
885 views

install php on linux from 1and1 VPS

I am experienced in PHP, but I have never installed it. We have just upgraded onto a VPS from 1and1 and now we need to upgrade php ourselves apparently. We want to go from 5.1.4 to the latest, but ...
3
votes
2answers
6k views

How to downgrade a certain ubuntu 10.04 package (php) back to karmic?

I've updated from 9.10 to 10.04, but unfortunately the PHP provided with 10.04 is not yet supported by zend optimizer. As far as I understand, I need to somehow replace the PHP 5.3 package provided ...
2
votes
1answer
340 views

Apache : with Googlebot connections, a single process takes all server memory

Following Unbelievable issue : a single apache process takes 4 GB of memory I post as a new question because I was able to identify the fact that it happens when the client connecting is Googlebot. ...
2
votes
2answers
2k views

Getting rid of “Welcome to nginx!”

I've just setup nginx on my Ubuntu staging machince. Entering http://192.168.1.1./index.php works like a charm and loads the index.php file i've put in the /var/www/public_html folder. ...
2
votes
2answers
1k views

Failed installing APC?

I am trying to install APC on a gentoo with php 5.2 Here teh full command i Lanched: mkdir /home/APC-php cd /home/APC-php wget http://pecl.php.net/get/APC tar -xzvf APC cd APC-3.1.9 ...
2
votes
9answers
7k views

CronTab: Not running my PHP scripts?

final edit: i have moved this to http://serverfault.com/questions/168662/406-error-with-get-cron-job EDIT 4: i am getting a 406 error page with this cron! here is the crontab (copied from cPanel): ...
2
votes
3answers
3k views

Millions of files in php's tmp error - how to delete? [closed]

I've got a tmp-folder with 14 million php session files in my home directory. At least that's what I think it is, it's not like I could ls it or anything. I've tried using find with the -exec rm {} ...
1
vote
2answers
576 views

Installing php-fpm over php version missmatched

I have PHP installed by yum from the base @updates repository on Centos 6.3: php x86_64 5.3.3-14.el6_3 @updates 3.5 M I would like to install php-fpm version 5.3 because our web software works ...
1
vote
1answer
198 views

only django work in presence of mod_wsgi , PHP not working

I am using PHP with apache2 and MySQL on a rackspace server, it is unmanaged cluoud hosting. I am hosting multiple sites using virtual host. Now i want to use Django on it. A site needs django so I ...
1
vote
2answers
413 views

heavy load on mysql

i have dedicated server with very good configuation like 16 gb ram etc but i am facing heavy load from mysql i am running a music wesbite however only one database is running and 5-10 pages are only ...
1
vote
1answer
1k views

Downgrade PHP to 5.3 on Fedora 17

I'm trying to downgrade PHP to 5.3 on Fedora 17. Using yum downgrade I can only get as low as 5.4.1 (instead of 5.4.3). How can I install 5.3 using yum? I'm following the details at ...
1
vote
1answer
308 views

MongoDB not replicating properly

I am using mongoDB for my application hosted on 3 amazon instances. I have a got a Primary Node with highest priority (100) and 2 Secondaries with priority 99 and 98. A few days ago I started getting ...
1
vote
2answers
238 views

php.ini seems to be completely ignored

I'm working on a Dreamhost VPS, so I don't know if that has anything to do with this: The include_path entry in the php.ini file seems to be completely ignored. There are several php.ini files ...
1
vote
2answers
166 views

Apache security

I've been reading up on server/apache security and I've run into a contradiction. I read that you shouldn't serve any files that aren't inside Apache's scope, but I've been told that you should keep ...
1
vote
2answers
5k views

Apache, virtual hosts, and default sender for sendmail

So here's my issue...I have two sites hosted on one machine using apache's virtual hosts. I want to send emails from the two different sites (domain.com and domain2.com) using the appropriate email ...
1
vote
1answer
558 views

Apache / PHP server delaying for a minute before responding

Am having the strangest issue with an apache/PHP instance (PHP 5.2 in this case), where it will take over a minute to respond to a request. The PHP profiling is saying it's taking less than a second ...
1
vote
1answer
763 views

Intermittent error 404 during higher loads. (nginx/php/apc/mysql)

I have a 4 cpu core VPS with 4GB ram. It is running Ubuntu 10.04 with nginx/0.7.65, PHP 5.3.2, and MySQL. I use php5-fpm for the communication to nginx. I also have php5-apc complimenting with php ...
1
vote
1answer
3k views

Loading JSON in PHP53: ZVAL_DELREF in Unknown on line 0

I'm trying to loading JSON into the new-installed PHP5.3.1 on a CentOS server. Previously there was a PHP5.1 or near and due to the latest version of WordPress I had to upgrade the PHP. I tried to ...