Tag Archives: Drupal

Setting Up Multiple Websites on Windows 8 with XAMPP

Setting Up Multiple Websites on Windows 8 with XAMPP

1) Add the lines as below to the file: C:\Windows\System32\drivers\etc\hosts

127.0.0.1 localhost
127.0.0.1 site1.local
127.0.0.1 site2.local
127.0.0.1 site3.local

2) Add the lines as below to the file: C:\xampp\apache\conf\httpd

Listen 127.0.0.1:80
NameVirtualHost 127.0.0.1
Listen 80
<VirtualHost *:80>
DocumentRoot “C:/xampp/htdocs”
ServerName localhost:80
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “C:/xampp/htdocs/drupal”
ServerName site1.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “C:/xampp/htdocs/drupal”
ServerName site2.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “C:/xampp/htdocs/drupal”
ServerName site3.local
</VirtualHost>

2) restart Apache.

Now, you can visit C:/xampp/htdocs/drupal by:

localhost/drupal
site1.local
site2.local
site3.local

Configure clean URLs

The below is from https://drupal.org/node/15365

Drupal 7.x
In Drupal 7, the installer tests for compatibility with Clean URLs as a part of the installation process. If the environment is tested as compatible with Clean URLs, it will be enabled as part of the installation process and no further action is required to enable Clean URLs.

If you need to enable Clean URLs post installation, Drupal will run the clean URL test automatically when you navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata), show the results, and allow you to save configuration.

You can enable or disable it at a later time by following these steps:

1.Navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata)
2.Wait for the automated Clean URLs test to run.
3.Check or uncheck the Enable clean URLs checkbox
4.Click “Save configuration”
Even if Clean URLs are successfully enabled at install-time, if you have a dedicated server you may still want to follow the steps (below) to enable the more efficient httpd.conf rewrite method for clean URLs. If you choose to do that, you might want to turn off Clean URLs while you are working on the server.

Drupal 7: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows.

I installed SimpleTest and tried to test “User Create”, but it shows:

An error has occurred.
Please continue to the error page

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=226&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {simpletest} (test_id, test_class, status, message, message_group, function, line, file) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 13 [:db_insert_placeholder_1] => UserCreateTestCase [:db_insert_placeholder_2] => exception [:db_insert_placeholder_3] => <em>PDOException</em>: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {simpletest} (test_id, test_class, status, message, message_group, function, line, file) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] =&gt; 13 [:db_insert_placeholder_1] =&gt; UserCreateTestCase [:db_insert_placeholder_2] =&gt; pass [:db_insert_placeholder_3] =&gt; Created role of name: vYiUvQV4, id: 4 [:db_insert_placeholder_4] =&gt; Role [:db_insert_placeholder_5] =&gt; UserCreateTestCase-&gt;testUserAdd() [:db_insert_placeholder_6] =&gt; 1728 [:db_insert_placeholder_7] =&gt; /xxxxxxxx/public_html/modules/user/user.test ) in <em>DrupalTestCase-&gt;assert()</em> (line <em>157</em> of <em>/xxxxxxxx/public_html/modules/simpletest/drupal_web_test_case.php</em>). [:db_insert_placeholder_4] => Uncaught exception [:db_insert_placeholder_5] => PDOStatement->execute() [:db_insert_placeholder_6] => 2139 [:db_insert_placeholder_7] => /xxxxxxxx/public_html/includes/database/database.inc ) in DrupalTestCase->assert() (line 157 of /xxxxxxxx/public_html/modules/simpletest/drupal_web_test_case.php).