Nginx and PHP 5.3

vps

#1

I switch my server over to nginx because I needed the extra stability and reliability if my sites start to pick up as expected. Also I was looking forward to setting up nginx and having lower memory usage than what I was getting with apache.

First off, I saw no difference in memory usage except for the fact that looking at the graph in the panel nginx showed a solid steady line for ram usage compared to the spiked looking graph for apache.

I tried everything I could to try and bring down the memory usage but it would not budge anywhere below 700MB.

Finally I noticed that nginx was running php5.2 and not php5.3. In the panel the outdated php5.2 is the only supported option for nginx. I found a section in the dreamhost wiki that explained how to switch nginx over to PHP5.3 and I followed the steps to do so.

All seemed well and my server was now using PHP5.3 and memory usage dropped to a solid 150MB.

The only problem I have now is that every time I reboot the server it starts back up with PHP5.2

if I use the following command to restart PHP however it switch’s over to PHP5.3

How do I make my server use PHP5.3 automatically after a reboot? I thought maybe I could setup a cron job to run the command after a reboot, but I’m unable to setup a cron job to run as my admin user.