Category Archives: Drupal

Parse error: syntax error, unexpected ‘(‘, expecting ‘)’

On accessing Drupal site I use to get following error:

Parse error: syntax error, unexpected ‘(‘, expecting ‘)’

Above error is mainly because of Drupal modules compatibility issue with php4.
In this case if you are on php4 server then you will need to run your application on php5 server.

If you are on php5 server and still you get the Parse error then in this case the fixed that worked for me was adding Handler to to the installation directory of Drupal.

To add handler create .htaccess file under installation directory and add following.

AddHandler application/x-httpd-php5 .php


contact@webhostingsupport.info

Post to Twitter

Drupal temporary URL

Most of the time a common question is asked, whether Drupal can be accessed with a temporary url ?

And the answer to it is yes, for this you will need to make few changes into your configuration file of Drupal and it will work perfectly as it on main domain url.

1) Eg: Drupal is installed on domain webhostingsupport.info and you want it to work on http://your-server-ip-address/~testing then you will need to make following changes.

 

i) Search for file settings.php under the installation directory of Drupal, it should be located

under ”sites/default/settings.php“

ii) Open settings.php in your favorite editor and look for $base_url = Previously it should be set

to “$base_url = http://webhostingsupport.info” change it to “$base_url = http://your-server-ip-address/~testing

save the file and exit it.

 

2) Now your drupal will work fine with temporary url, but accessing internal url will still give error.

to fix this edit the .htaccess file in the installation directory of drupal and make following changes.

i) add line RewriteBase /~username

Eg:

RewriteBase /~testing

 

 

And you are all done now.

 


contact@webhostingsupport.info

Post to Twitter

Drupal Clean URL error

On enabling Clean URL in Drupal I get error “Your system configuration does not currently support this feature”

FIX: I have created a .htaccess file under the installation directory of drupal and added following code and it fixed my issue.

root@Server [~]# nano .htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Aslo verify that apache module mod_rewrite.c is enabled on server.

That’s all


contact@webhostingsupport.info

Post to Twitter