Forum Moderators: coopster

Message Too Old, No Replies

PHP as a CGI or Apache Module?

Which is better for database-driven site?

         

dbr1066

1:22 am on Mar 15, 2004 (gmt 0)

10+ Year Member



I'm moving my large site (+10,000 pages) from static html to database-driven PHP. My web host runs PHP as a CGI. I gather from the PHP manual that this slows down PHP and may cause performance issues - especially with high traffic and database calls.

Should I be concerned about this? Should I look for a host that has PHP set up as an Apache module (or should I go to a dedicated server)? Any input greatly appreciated, as I'm new to PHP.

Thanks

jatar_k

4:00 am on Mar 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it's not so much the number of pages as it is the amount of traffic that will give you the answer.

As a module makes a huge difference, at load it makes a bigger difference. Is dedicated viable for you?

dbr1066

6:06 am on Mar 15, 2004 (gmt 0)

10+ Year Member



Hi jatar_k

Yes, dedicated is an option. I'd been considering whether it was time to go with a dedicated solution anyway, and this may just decide it for me.

I don't think my server load is high, but the site gets over 100,000 page views daily. Not too many database calls *yet*, but I'm heading towards putting as much of the site as possible into a mysql database.

Sounds like the best thing might be to monitor how the site poerforms under the current setup with PHP running as CGI, and if it starts to show slower perfomance, move to a new dedicated setupo with PHP running as an Apache module.

percentages

6:38 am on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>the site gets over 100,000 page views daily

Move to dedicated.....100,000 page views daily should easily finacially justify it, and you will be amazed at how different the environment is.

I'm actually surprized you found a shared host that will support 100,000 page views per day? That is a significant volume in any environment and VPS or shared hosts don't usually appreciate it.

dbr1066

2:15 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



>>I'm actually surprized you found a shared host that will support 100,000 page views per day? That is a significant volume in any environment and VPS or shared hosts don't usually appreciate it. <<

Its not a shared host, its a "managed server" - which basically means I'm on a server by myself, but I don't have root access and no ability to determine how the server is set up (for example I can't choose whether PHP runs as an Apache module or under CGI, as it is currently set up).

percentages

2:33 pm on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Okay......let's talk turkey! You can be on a dedicated server for $150 per month.....and have what the heck you like installed.

For $250 per month you can have a managed dedicated server, built to your specs, and managed to your desires.

I assumed you were on VPS currently (bad assumption) as you seem to be limited. I don't fully understand why your current host is limiting you....but, if they are, and won't budge then it is time to move on :)

dbr1066

3:59 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



Hi percentages,

Yes, I think some form of dedicated is where I'll have to go. I've looked at Rackspace, Serverbeach, Superb, OLM, and Aplus. All seem reasonable.

I know you're really high of Rackspace, do you or anyone else have feedback on the other dedicated hosts I mention?