I made a manual setup on a dedicated server with ISPConfig3. ISPConfig 3 is an open source hosting panel. So the installation could bee seen like a "hosting server like" setup.
The application was installed into a subdirectory "v3" of the webroot of one website e.g. example.com/v3/
Full path is: /var/www/clients/client1/web1/web/v3/
or via a symbolic link: /var/www/example.com/web/v3/
The virtual host is setup properly, and serving an (other) website on the website-root folder ~/web/
The installation was running smooth.
After a click on the "Go to administration button" (Url: http://example.com/v3/admin/index.php) a error report below was displayed. (Which was already send to newscoop-bug@sourcefabric.org.)
As a result of the error report I was asked to make a forum post about this issue.
Here we go, first the Error report:
Newscoop has encountered a problem. ________________________________________________________________________
Please take a minute to send us an email.
Simply copy and paste the error report below and send it to: newscoop-bug@sourcefabric.org.
Error ID: 2:Newscoop:4.0.2:Loader.php:198 Error String: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php//var/www/clients/client1/web1/web/v3/application/controllers/helpers/FlashMessenger.php) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/EXAMPLE.COM/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client1/web1/web/v1/oc-content/uploads:/var/www/clients/client1/web1/web/v1/oc-content/plugins/printpdf/tcpdf/cache:/var/www/clients/client1/web1/web/v1/oc-content/uploads) Time: Mon, 30 Jul 2012 06:32:33 +0200 Backtrace: {closure}() called at [:] is_readable() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Loader.php:198] Zend_Loader::isReadable() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Loader/PluginLoader.php:389] Zend_Loader_PluginLoader::load() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Controller/Action/HelperBroker.php:366] Zend_Controller_Action_HelperBroker::_loadHelper() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Controller/Action/HelperBroker.php:155] Zend_Controller_Action_HelperBroker::getStaticHelper() called at [/var/www/clients/client1/web1/web/v3/application/modules/admin/Bootstrap.php:126] Admin_Bootstrap::_initFlashMessenger() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:667] Zend_Application_Bootstrap_BootstrapAbstract::_executeResource() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:620] Zend_Application_Bootstrap_BootstrapAbstract::_bootstrap() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:584] Zend_Application_Bootstrap_BootstrapAbstract::bootstrap() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Resource/Modules.php:107] Zend_Application_Resource_Modules::init() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:681] Zend_Application_Bootstrap_BootstrapAbstract::_executeResource() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:624] Zend_Application_Bootstrap_BootstrapAbstract::_bootstrap() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application/Bootstrap/BootstrapAbstract.php:584] Zend_Application_Bootstrap_BootstrapAbstract::bootstrap() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Application.php:355] Zend_Application::bootstrap() called at [/var/www/clients/client1/web1/web/v3/public/index.php:4] require_once() called at [/var/www/clients/client1/web1/web/v3/admin.php:4]
Some more additional information gathered from log files: ACCESS.LOG
123.123.123.123 - - [30/Jul/2012:06:32:33 +0200] "GET /v3/admin/index.php HTTP/1.1 " 200 970 "http://example.com/v3/install/index.php" "Mozilla/5.0 (X11; Linu x i686 on x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1" 123.123.123.123 - - [30/Jul/2012:06:33:17 +0200] "GET /v3/admin/index.php HTTP/1.1 " 200 970 "http://smartsiamweb.com/v3/install/index.php" "Mozilla/5.0 (X11; Linu x i686 on x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1" 123.123.123.123 - - [30/Jul/2012:06:35:26 +0200] "GET /v3/admin/index.php HTTP/1.1 " 200 970 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20100101 F irefox/14.0.1" 123.123.123.123 - - [30/Jul/2012:06:37:02 +0200] "GET /v3/admin/index.php HTTP/1.1 " 200 970 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20100101 F irefox/14.0.1" 123.123.123.123 - - [30/Jul/2012:06:37:50 +0200] "GET /v3/admin/index.php HTTP/1.1 " 500 20 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20100101 Fi refox/14.0.1"
No related entry (In fact, the last entry in error log occured a long time before the installation of Newscoop)
Remarks: Detailed environment information have been provided with the original error report.
I got a first recommendation to comment open_basedir in php.ini, an idea i really not like for security reasons.
A solution might be to allow all necessary directories for this website in openbasedir, but which directories need to be accessed outsite /var/www/newscoop (or in this case /var/www/clients/client1/web1/web/) I currently allow access to following directories via open_basedir:
Posts: 1,526Member, Administrator, Sourcefabric Team
you didn't set up properly:
is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/EXAMPLE.COM/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client1/web1/web/v1/oc-content/uploads:/var/www/clients/client1/web1/web/v1/oc-content/plugins/printpdf/tcpdf/cache:/var/www/clients/client1/web1/web/v1/oc-content/uploads)
there is no /usr/share/php
Post edited by Andrey Podshivalov at 2012-07-31 11:47:40
You are referencing to the error message, before /usr/share/php/ was added to allowed path. (as a result of the error message)
Please have a look to your email, I have send you a special link. Anyway, any other website on this server does not require /usr/share/php/ in the allowed path.
I believe that this issue is inside the application, The link in the error message (/usr/share/php//var/www/clients/client1/web1/web/v3/application/controllers/helpers/FlashMessenger.php) makes no sense.
Where is that link constructed? Where does the // come from? Why is there a reference to a not existing file "FlashMessenger.php" in the error message?
Posts: 1,526Member, Administrator, Sourcefabric Team
is_readable() called at [/var/www/clients/client1/web1/web/v3/library/Zend/Loader.php:198]
it's form Zend Framework. As you can see it just tries to check files with different paths. I've tested with php_admin_value open_basedir /tmp:/var/www/newscoop:/usr/share/pear:/usr/share/php
Here the new error report, this time installed in "web12"
Newscoop has encountered a problem.
Please take a minute to send us an email.
Simply copy and paste the error report below and send it to: newscoop-bug@sourcefabric.org.
Thank you. Error Report Error ID: 2:Newscoop:4.0.2:Loader.php:198 Error String: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/pear//var/www/clients/client1/web12/web/application/controllers/helpers/FlashMessenger.php) is not within the allowed path(s): (/var/www/clients/client1/web12/web:/var/www/clients/client1/web12/tmp:/var/www/example.com/web:/srv/www/example.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/usr/bin/php:/usr/bin:/usr/share/php:/usr/share/pear) Time: Wed, 01 Aug 2012 13:43:15 +0200 Backtrace:
{closure}() called at [:] is_readable() called at [/var/www/clients/client1/web12/web/library/Zend/Loader.php:198] Zend_Loader::isReadable() called at [/var/www/clients/client1/web12/web/library/Zend/Loader/PluginLoader.php:389] Zend_Loader_PluginLoader::load() called at [/var/www/clients/client1/web12/web/library/Zend/Controller/Action/HelperBroker.php:366] Zend_Controller_Action_HelperBroker::_loadHelper() called at [/var/www/clients/client1/web12/web/library/Zend/Controller/Action/HelperBroker.php:155] Zend_Controller_Action_HelperBroker::getStaticHelper() called at [/var/www/clients/client1/web12/web/application/modules/admin/Bootstrap.php:126] Admin_Bootstrap::_initFlashMessenger() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:667] Zend_Application_Bootstrap_BootstrapAbstract::_executeResource() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:620] Zend_Application_Bootstrap_BootstrapAbstract::_bootstrap() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:584] Zend_Application_Bootstrap_BootstrapAbstract::bootstrap() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Resource/Modules.php:107] Zend_Application_Resource_Modules::init() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:681] Zend_Application_Bootstrap_BootstrapAbstract::_executeResource() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:624] Zend_Application_Bootstrap_BootstrapAbstract::_bootstrap() called at [/var/www/clients/client1/web12/web/library/Zend/Application/Bootstrap/BootstrapAbstract.php:584] Zend_Application_Bootstrap_BootstrapAbstract::bootstrap() called at [/var/www/clients/client1/web12/web/library/Zend/Application.php:355] Zend_Application::bootstrap() called at [/var/www/clients/client1/web12/web/public/index.php:4] require_once() called at [/var/www/clients/client1/web12/web/admin.php:4]