This is a discussion on PHP file slow, same file in HTML faster within the PHP General forums, part of the PHP Programming Forums category; All .php files are displayed in 10 seconds (aprox). Example: test.php <html><body>hello world&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
All .php files are displayed in 10 seconds (aprox).
Example: test.php <html><body>hello world</body></html> But, the same file with extension html (test.html), is displayed in 1 second. The system is: - RHEL 5 - PHP 5.1 - Apache I apreciate your help. Toroscani |
|
|||
|
parsing the file for php before displaying it, if there is no php in the
file dont label it .php <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?> -- If at first you dont succeed try try try again If at first you do succeed try not to look surprised _ ""Jose Toroscani Hernandez"" <toroscani@gmail.com> wrote in message news:55ad9f850711261816j43269366t53f5e4c0612b0944@ mail.gmail.com... > All .php files are displayed in 10 seconds (aprox). > Example: test.php > <html><body>hello world</body></html> > > But, the same file with extension html (test.html), is displayed in 1 second. > > > The system is: > - RHEL 5 > - PHP 5.1 > - Apache > > I apreciate your help. > > Toroscani > |
|
|||
|
Jose Toroscani Hernandez wrote:
> All .php files are displayed in 10 seconds (aprox). > Example: test.php > <html><body>hello world</body></html> > > But, the same file with extension html (test.html), is displayed in 1 second. > > > The system is: > - RHEL 5 > - PHP 5.1 > - Apache > > I apreciate your help. There is probably some initialisation that PHP is doing that slowing things down. I find that usually this kind of thing is caused by DNS lookups and the like, but it could be any number of things. If you have a modular build, try disabling all the PHP extensions and ensure that a minimal system is quick then enable the extensions one by one and see where it goes bang. HTH Col |
![]() |
| Thread Tools | |
| Display Modes | |
|
|