Türkçe
English

Drupal is running slow on localhost@windows

gary the snail

Problem: Slow Drupal 6.x on Windows with over 30 contrib modules enabled. On Mac OS X and Linux, Drupal runs very fast but when i try to run same site under windows, it makes me cry.

I've tried hundreds of solutions but finally zend server ce was the correct solution. I was using xampp 1.7.3, then downgraded to 1.7.1 because of php 5.3 incompatible modules (such as imagecache). All problems fixed but performance. I prefer a portable server because when i have to reinstall windows, i don't want to backup my data, reinstall server software, reconfigure them and import/export databases. Zend sever is not portable but you won't need it to be portable, here is what you need to do:

  • If you have a working xampp stop apache server, if you don't, setup a new xampp server (possibly in D: drive or somewhere else except system partition)
  • Only mysql server must be run from xampp (mysql as service is preferred)
  • Download Zend Server Community Edition from http://www.zend.com/products/server-ce I prefer PHP 5.2.x version for compatibility with some modules.
  • Install Zend Sever into default location and default installation options (don't include mysql)(maybe you can include phpmyadmin)
  • If Zend Sever is running stop it. To do this, look at apache system tray icon
  • Edit Zend server httpd.conf to point your xampp htdocs folder. To do this change "DocumentRoot" entry in httpd.conf into your full xampp htdocs path. You can use backslashes.
  • Scroll down httpd.conf file and seek for an entry which starts with <Directory "C:\Program Files\Zend\Apache2\htdocs">. Change this path to your full xampp htdocs folder.
  • Under this Directory entry seek for "Allow Override None" line. Change this to "Allow Override All" for clean url's support.
  • Your sever is ready to go, mysql is running from xampp and you can start Zend server from apache system tray icon.
  • You can configure zend server from its own control panel which can be accessed from http://localhost:10081
  • Zend server hides php error messages and displays a HTTP500 internal server error page. To output php errors you must change a php directive. You can do this via Zend server control panel. Just go to Server setup > Directives > Error handling and logging. Just click on to output all php errors and warnings.
  • You can enable/disable all php extensions, and modify all php directives from this panel.
  • Don't forget to click "Restart PHP" button after you changed something.

That's all. After migrating Zend Server you will see a noticable performance boost. My last Drupal installation have 38 contrib modules enabled and admin/build/modules page loading time reduced to 1.5-2 seconds from 5-6 seconds. My machine is Core2 Duo 2.13 GHz, 2GB DDR3 RAM.

Don't worry about your server's portability. Mysql is still portable and you don't need to import/export or reconfigure your database server. When you want to reinstall your server, just install Zend Server with default options and change httpd.conf or replace with a preconfigured httpd.conf.

Good Luck.

Post new comment

You don't have to register to post comments but if you don't, you can't modify your comment later. You better register.
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.