The easiest script:

<?php echo 'hello';

Takes about 3 seconds to complete. There appears to become a in a major way interval Apache waits until it serves an internet page.

I attempted turning off anti-virus, crippling ipv6 and much more but Apache continues to be very slow. What must i do?

EDIT:

More information:

  • Apache 2.2
  • PHP 5.2
  • It's only dynamic PHP files. Static files (html) are offered instantly
  • It's nothing related to system specs, it's new PC

You will find couple of PHP notices in Apache error log:

[Thu Jul 01 08:37:21 2010] [error] [client 127.0.0.1] PHP Notice:  Undefined variable: ref in D:\\data\\o\\WebProjects\\elearning\\application\\modules\\clientarea\\controllers\\ViewController.php on line 578, referer: http://elearning/clientarea/view/course/teid/1/cid/1

It's generally recommended this issue is triggered because of your firewall interfering or by getting IPv6 enabled at the network connects, however individuals solutions did not fix the problem for me personally. It works out that automatically Home windows 7 hosts file at "C:WindowsSystem32driversetchosts" has this line said out:

# 127.0.0.1 localhost

During my situation, simply uncommenting this line transformed the localhost performance to what it really was said to be, rather than that annoying 3-5 second wait on every page load. Remember you need to run your text editor with administrator privileges to edit the hosts file.

Make use of the Task Manager to kill unnecessary processes.

Incidentally, you need to finish your script with ?>.