Hi all,

I am getting HTTP Error 500 when I try to install Drupal. When I look at the log this is what I see...

[error] [client xxx.xx.xxx.xxx] PHP Warning: getcwd() has been disabled for security reasons in /var/www/vhosts/mysite.com/httpdocs/drupal/index.php on line 17

[error] [client xxx.xx.xxx.xxx] PHP Warning: require_once() [function.require-once]: Unable to access /includes/bootstrap.inc in /var/www/vhosts/mysite.com/httpdocs/drupal/index.php on line 19

[error] [client xxx.xx.xxx.xxx] PHP Warning: require_once(/includes/bootstrap.inc) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/drupal/index.php on line 19

[error] [client xxx.xx.xxx.xxx] PHP Fatal error: require_once() [function.require]: Failed opening required '/includes/bootstrap.inc' (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/drupal/index.php on line 19

My host also has PHP Safe Mode set to "On", and I get this with both 6.1 and 7.12 versions of Drupal.

What could be the problem?

Thanks :)

Comments

TMDHosting’s picture

Try adding this to your settings.php or index.php file:

ini_set('include_path', '/var/www/vhosts/mysite.com/httpdocs/drupal');

This should set the include path and the script will not search in:

/includes

but:

/var/www/vhosts/mysite.com/httpdocs/drupal/includes

The path to the drupal root folder in the ini_set you may double check if you have modified the error in order to hide your domain or any other info.

audioslave’s picture

thanks TMDHosting. that solved my initial problem :)

but now i'm getting this error...

Warning: get_defined_functions() has been disabled for security reasons in drupal_find_theme_functions() (line 1128 of /var/www/vhosts/mysite.com/httpdocs/drup/includes/theme.inc).

TMDHosting’s picture

Hello,

That function should be enabled from your server administrators though.

If you are hosting the website on a dedicated server or VPS remove the get_defined_functions string from the disable_functions at php.ini. This should resolve the problem.

If you are using shared hosting package only the server administrators will have the required access to resolve that problem.

Ranieri Machado’s picture

I have been using this solution many times:

Edit all .php files in the Drupal root and change

define('DRUPAL_ROOT', getcwd());
by
define('DRUPAL_ROOT', 'www');

Where www is the path for the root. In the case of this post is "/var/www/vhosts/mysite.com/httpdocs/drupal"
So it would be :

define('DRUPAL_ROOT', '/var/www/vhosts/mysite.com/httpdocs/drupal');

The files to be edited are:
authorize.php
cron.php
index.php
install.php
update.php
xmlrpc.php