Re: PHP slowness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerard wrote:
> Hi Brent,
> 
>>I noticed  you have your error_reporting level set really high (2039),
>>which is pretty close to everything. That may be fine on a development
>>server, but I wouldn't set it that high on a production server. I'd be
>>curious what you log looks like. Perhaps this is causing your slowness,
>>perhaps not.
>>
> 
> This is obviously not it, I changed the reporting level to nothing and still
> no go.
> 
> 
>>Also, you seem to use the short open tag style '<?'. Not that it's
>>causing your problem, but for compatibility you should probably use the
>>long style '<?php'.
>>
> 
> Thanks for the tip, I'll keep that in mind.
> 
> Update on the issue:
> I just upgraded to PHP5 in an attempt to get the speed under control, it
> didn't work.
> What I did notice is that even www.debuginc.com/test2.php (which has NO code
> in it at ALL, only text) takes 5 seconds to load! Upon closer investigation,
> it seems that with both PHP4 and PHP5, any page that ends on .php takes 5
> seconds doing NOTHING before it starts to process and actually load...
> What could delay any given .php page for 5 seconds on both PHP4 and PHP5? It

Are you using auto_prepend_file in your php.ini?  It will load up the
named file before *every* php script and could be your culprit.  Yes,
it's been around since PHP4 too.

> doesn't seem to make any sense. I already removed unused CGI modules from
> the Apache load process, but still a 5 second delay.
> 
> Another interesting note; if you click from page to page fast enough, it
> doesn't take as long to load. For some reason, after the initial 5 second
> startup hic, it loads consequent pages smoothly. If you wait for 10 seconds
> and then click a link, it loads for 5 seconds again.

That seems backward to me, but maybe that's just because I don't
understand Apache well enough (Rasmus, where are you? :)  Does Apache
cache the content of CGI scripts and/or is it able to look for the
compiled script in memory?

I would expect script startup time would decrease for scripts running
through the Apache module, but not the CGI.  Or am I missing something here?

> 
> I don't get this, especially since it seems to affect both PHP4 and PHP5...
> 
> - Gerard
> 


-- 
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux