Jump to content

No file logged to fix? Open_basedir restriction in effect


ghost_mutt

Recommended Posts

 

Hi all. We have a lot of these in our logs from Prestahop installations (sensitive info redacted).

I've seen several similar posts in the forum where the log points to a specific PHP file to find the problem. Ours however doesn't seem to highlight which Prestashop file is causing the issue - can anyone advise how we trouble shoot this please?

Thanks,
GM

[Tue Aug 24 13:19:09.823400 2021]

[proxy_fcgi:error]

[pid 9917:tid 140241117591296]
[client IP ADDRESS:0] AH01071: Got error 'PHP message: PHP Warning:

Unknown: open_basedir restriction in effect.

File(D:\\inetpub\\DOMAIN.com\\logs\\php_errors\\DOMAIN.com\\php_error.log)
is not within the allowed path(s):

(/home/USER/webapps/APP-NAME:/var/lib/php/session:/tmp) in Unknown on line 0\n',
referer: https://DOMAIN.com/category/product-name.html
Link to comment
Share on other sites

5 hours ago, ComGrafPL said:

Try this:

 

Hi - thanks for responding.

I have seen this - but as per my original post you will see that my error log isn't pointing to any specific file to amend. Most other cases of this I've seen have a php file mentioned where there error is, but not sure where the code should be changed in this case as there is no file name.

Link to comment
Share on other sites

@ghost_mutt

What is your PrestaShop version and which server you are using linux or Windows. Your message , seemed to me you are using windows server.

Will you try to enable the debug mode, and then check if there is any error indicated. If any error you can post here. We or other community member will try to help you.

Our this article will guide you how to enable debug mode https://classydevs.com/guide-how-can-we-fix-error-500-in-prestashop/

 

Thank you

Link to comment
Share on other sites

2 minutes ago, SmartDataSoft said:

@ghost_mutt

What is your PrestaShop version and which server you are using linux or Windows. Your message , seemed to me you are using windows server.

Will you try to enable the debug mode, and then check if there is any error indicated. If any error you can post here. We or other community member will try to help you.

Our this article will guide you how to enable debug mode https://classydevs.com/guide-how-can-we-fix-error-500-in-prestashop/

 

Thank you

 

Hi @SmartDataSoft thanks for responding also.

PS is version 1.7.7.2 running on a Apache/NGINX hybrid managed via Runcloud - although you are right that many of these sort of posts seems to revolve around IIS. It's also worth noting these errors are only showing in the Apache log and not NGINX log.

 

Currently trying to snag this for someone on a live server but will have to clone and stage to run debug mode. Frustrating as most these other posts seem to pinpoint the file in the log. Unless...

var/lib/php/session:/tmp)

is referring to a PHP class/method?

Link to comment
Share on other sites

Hello, It is not pointing class or method. It is the server session storage path. Normally in apache server from php settings the session folder need to adjust in some server.  

https://stackoverflow.com/questions/4927850/location-for-session-files-in-apache-php

When adjust the session folder path , site work fine for many . I am not NGINX expert so do not know where it need to point the session location.

 

Thank you

Link to comment
Share on other sites

Hi @SmartDataSoft thanks for continuing to help with this 🙂 . Your info has been useful in pinpointing the issue.

I've discussed this further with my server tech and we can now see the issue.

Prestashop is trying write to a log file outside the web home path which is restricted for security reasons. Whilst it is possible to add the folder it wants access to as an additional open_basedir it does raise some questions about security and why it wants to write here rather than within it's own installed path.

Is it possible to change the Prestashop log path rather than having to change valid security settings on our server?

Thanks.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...