1

Please help me to solve this issue:

CiviCRM Dashboard endless loading… + Warning: file_exists(): open_basedir restriction in effect.

Warning: file_exists(): open_basedir restriction in effect. File(/home/wp-includes/version.php) is not within the allowed path(s): (/home/user:/tmp:/var/tmp:/opt/php-5.5/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/user/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471

Above, I changed my real user login for “user”.

I use shared hosting by hostinger.com, where I have no access outside of public_html folder. It is not possible to access Linux system folders like: usr, /opt, /etc. Is it needed to CiviCRM to access that folders?

Apache 2.4, PHP 5.5.35, memory allocated 256 MB, MYSQL 5.6

I installed Wordpress 4.5.3 fast and easy by some graphic installer at the hosting panel. Then, I installed civicrm-4.7.8-wordpress.zip downloading it by the Wordpress plugin installer. CiviCRM installed and activated, I run civiCRM installer. CiviCRM Installer sad “Youŕe ready to install! - Database version and connection settings have been verified and look correct!” All requrements were Ok. Then, I pressed the button “Check Requirements and Install CiviCRM” without sample data. CiviCRM was “successfull” installed, but there was an error: no CiviCRM menus, Dashboard (endless) loading… … never finished. At the top, the permanent message: “Warning: file_exists(): open_basedir restriction in effect. File(/home/wp-includes/version.php) is not within the allowed path(s): (/home/user:/tmp:/var/tmp:/opt/php-5.5/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/user/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471”

“System Status: Error: Cron Not Running, Configure Default Mailbox, Complete Setup”.

Then, I uninstalled Wordpress, reinstalled it, and did some configurations every time I reinstalled it before install CiviCRM.

I edited the settings, media(miscellaneous), to only “wp-content/uploads” without quotes, or the respective temp folder, at any time a tried a new install, did logof, login again and a new CiviCRM install with other plugins disabled.

In wp-config.php, I edited line 62 by changing “define('WP_TEMP_DIR',dirname(FILE).'/wp-content/uploads');” for “DEFINE('WP_TEMP_DIR','../tmp')” or “define('WP_TEMP_DIR', dirname(FILE) . '/wp-content/temp/');” and simultaneously creating the respective temp or tmp folder. Hostinger accounts have no tmp folder by default.

Don’t matter what I do, CiviCRM installation always fails in Wordpress.

version.php

/** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ $wp_db_version = 36686;

/** * Holds the TinyMCE version * * @global string $tinymce_version */ $tinymce_version = '4310-20160418';

/** * Holds the required PHP version * * @global string $required_php_version */ $required_php_version = '5.2.4';

/** * Holds the required MySQL version * * @global string $required_mysql_version */ $required_mysql_version = '5.0';

$wp_local_package = 'pt_BR';

3
  • Looking at the file and the line in question, CRM_Utils_System_WordPress is simply checking for version.php. This file should be (based on the details above in: /home/user/public_html/wp-includes/version.php In your error message you referenced: /home/wp-includes/version.php That should not be returned at all, especially since later you refer to the path to CRM_Utils_System_WordPress as /home/user/public_html/wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php Can you verify the real path to wp-includes? Jun 28, 2016 at 21:25
  • Hello Kevin. Thank you for your help! The real path to version.php is: "public_html/wp/wp-includes/version.php" Wordpress was installed in directory '/public_html/wp" In Wordpress menu /settings/general/ wordpress address is filled correctly as: mydomain/wp It seems that CiviCRM ignores 'wp' directory. I don't know how to fix this.
    – survivor
    Jun 30, 2016 at 0:07
  • I use shared hosting by hostinger.com, where I have no access outside of public_html folder. It is not possible to access Linux system folders like: usr, /opt, /etc. Is it needed for CiviCRM to work by accessing that folders?
    – survivor
    Jul 12, 2016 at 19:23

1 Answer 1

1

As your comment details, WordPress is installed in it's own directory public_html/wp

Currently, CiviCRM has issues with WP in it's own directory as detailed here: https://wiki.civicrm.org/confluence/display/CRM/WordPress+installed+in+its+own+directory+issues

There are some patches, but at this time a standard install of CiviCRM will not work unless WP is installed in the webroot and not in it's own directory.

1
  • Ok. I removed wordpress and databank, reinstalled it at webroot and installed CiviCRM-4.7.8 in English. CiviCRM activated, I tried to enter Civi Dashboard to do the first settings. The same messange was showed again, at this time, without /wp subdirectory: "Warning: file_exists(): open_basedir restriction in effect. File(/home/wp-includes/version.php) is not within the allowed path(s): (/home/user:/tmp:/var/tmp:/opt/php-5.5/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 471"
    – survivor
    Jul 2, 2016 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.