Upgrade 2.4.3 to 3.0.0 error on home page

Hi, the web upgrade was successful, but when i try to open the home page, but the following error occurs:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/site/:/tmp:/usr/local/lib/php:./) in /home/site/www/ojs/lib/pkp/classes/file/FileManager.inc.php on line 347

There are no readable files in this directory tree. Are safe mode or open_basedir active?
Stack Trace:

File: /home/site/www/ojs/lib/pkp/classes/file/FileManager.inc.php line 352
Function: FileManager->mkdirtree("/", Null)

File: /home/site/www/ojs/lib/pkp/classes/file/FileManager.inc.php line 352
Function: FileManager->mkdirtree("/usageStats", Null)

File: /home/site/www/ojs/lib/pkp/plugins/generic/usageStats/PKPUsageStatsPlugin.inc.php line 583
Function: FileManager->mkdirtree("/usageStats/usageEventLogs")

File: /home/site/www/ojs/lib/pkp/plugins/generic/usageStats/PKPUsageStatsPlugin.inc.php line 306
Function: PKPUsageStatsPlugin->_writeUsageEventInLogFile(Array(16))

File: (unknown) line (unknown)
Function: PKPUsageStatsPlugin->logUsageEvent(“UsageEventPlugin::getUsageEvent”, Array(7))

File: /home/site/www/ojs/lib/pkp/classes/plugins/HookRegistry.inc.php line 102
Function: call_user_func(Array(2), “UsageEventPlugin::getUsageEvent”, Array(7))

File: /home/site/www/ojs/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php line 125
Function: HookRegistry::call(“UsageEventPlugin::getUsageEvent”, Array(7))

File: (unknown) line (unknown)
Function: PKPUsageEventPlugin->getUsageEvent(“TemplateManager::display”, Array(5))

File: /home/site/www/ojs/lib/pkp/classes/plugins/HookRegistry.inc.php line 102
Function: call_user_func(Array(2), “TemplateManager::display”, Array(5))

File: /home/site/www/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php line 773
Function: HookRegistry::call(“TemplateManager::display”, Array(5))

File: /home/site/www/ojs/pages/index/IndexHandler.inc.php line 79
Function: PKPTemplateManager->display(“frontend/pages/indexJournal.tpl”)

File: (unknown) line (unknown)
Function: IndexHandler->index(Array(0), Object(Request))

File: /home/site/www/ojs/lib/pkp/classes/core/PKPRouter.inc.php line 372
Function: call_user_func(Array(2), Array(0), Object(Request))

File: /home/site/www/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 228
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)

File: /home/site/www/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))

File: /home/site/www/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 227
Function: Dispatcher->dispatch(Object(Request))

File: /home/site/www/ojs/index.php line 68
Function: PKPApplication->execute()

Hi @brcorreabr

Take a look in this topic, it is about what you are facing with open_basedir:

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi, I took a look,

I tried this → pkp/pkp-lib#2364 Drop file existence check before minification settin… · pkp/pkp-lib@0e1ac9e · GitHub
With this → pkp/pkp-lib#2364 Fix file existence checks for JS inclusion · pkp/pkp-lib@7820368 · GitHub

But I still have the same problem.

Have you checked your file permissions? Not only chmod but chown either.

There is other similar thread with your log error:

I hope it helps.

Regards,
Israel Cefrin
Public Knowledge Project Team

I set permissions with the help of FAQ ([…]Depending on which API you are using (mod_php/SAPI or CGI/FastCGI), permissions should be set as follows.[…]), I’m using FPM/FastCGI so I have to use CGI/FastCGI I think. But nothing changes.

To test I set chmod 777 to all ojs folder
and in chown (ojs folder): drwxrwxrwx 19 site site 4096 Oct 6 11:01 ojs

Below the ojs folder content chown:

drwxrwxrwx 6 site site 12288 Oct 9 22:00 cache
drwxrwxrwx 28 site site 4096 Oct 4 14:33 classes
-rwxrwxrwx 1 site site 15635 Oct 9 20:16 config.inc.php
-rwxrwxrwx 1 site site 14497 Oct 4 14:33 config.TEMPLATE.inc.php
drwxrwxrwx 9 site site 4096 Oct 4 14:34 controllers
drwxrwxrwx 3 site site 4096 Oct 4 14:34 dbscripts
drwxrwxrwx 4 site site 4096 Oct 4 14:35 docs
-rwxrwxrwx 1 site site 1150 Oct 4 14:33 favicon.ico
-rwxrwxrwx 1 site site 2981 Oct 4 14:33 index.php
drwxrwxrwx 5 site site 4096 Oct 4 14:35 js
drwxrwxrwx 3 site site 4096 Oct 4 14:35 lib
drwxrwxrwx 38 site site 4096 Oct 4 14:57 locale
drwxrwxrwx 27 site site 4096 Oct 4 14:57 pages
drwxrwxrwx 17 site site 4096 Oct 4 14:59 plugins
drwxrwxrwx 4 site site 4096 Oct 4 15:13 public
-rwxrwxrwx 1 site site 2034 Oct 4 14:33 README.md
drwxrwxrwx 2 site site 4096 Oct 4 15:13 registry
-rwxrwxrwx 1 site site 32 Oct 4 14:33 robots.txt
drwxrwxrwx 6 site site 4096 Oct 4 15:13 rt
drwxrwxrwx 2 site site 4096 Oct 4 15:13 styles
drwxrwxrwx 5 site site 4096 Oct 4 15:18 submissoes
drwxrwxrwx 18 site site 4096 Oct 4 15:14 templates
drwxrwxrwx 2 site site 4096 Oct 4 15:14 tools

p.s. But nothing changes.

Hi @brcorreabr

It’s not just a question of numerical permissions (e.g. 755, read/write, etc.) but also file ownership.
I ask you to check again the FAQ. Unfortunately, as Alec said, it’s hard for us to give specific guidance on this beyond what’s documented there, as server environments are very diverse.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi,

I tested all ownerships and permissions in all files and directories, and nothing changes.
But when I change the files_dir = /www/ojs/submissoes to /home/site/www/ojs/submissoes, the home page dont shows any errors now. =D

Ty for your help.

1 Like

Hi @brcorreabr,

Are you using OJS 3.0.0? If so, I’d strongly suggest working with the most recent release (currently 3.0.2, though 3.1.0 will come out soon).

Regards,
Alec Smecher
Public Knowledge Project Team