close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem with Open_basedir restriction

Thread began 1/04/2010 8:06 am by jonathan.meilleur385477 | Last modified 1/14/2010 4:02 pm by Eric Mittman | 2690 views | 6 replies |

jonathan.meilleur385477

Problem with Open_basedir restriction

Hi, I've search about the problem I have on your forum but cannot figure how to fix it.

Here is the PHP message :

Warning: main() [function.main]: open_basedir restriction in effect. File(/WA_eCart_Definition_PHP.php) is not within the allowed path(s): (/var/www/vhosts/seconcept.com/httpdocs:/tmp) in /var/www/vhosts/seconcept.com/httpdocs/WA_eCart/seconcept_PHP.php on line 2

Warning: main(WA_eCart_Definition_PHP.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/seconcept.com/httpdocs/WA_eCart/seconcept_PHP.php on line 2

Fatal error: main() [function.require]: Failed opening required 'WA_eCart_Definition_PHP.php' (include_path='.:') in /var/www/vhosts/seconcept.com/httpdocs/WA_eCart/seconcept_PHP.php on line 2

Thanks for your answer and your great products!

Sign in to reply to this post

JBWebWorks

if you run phpinfo()

the setting for
open_basedir should be

Local Value-----Master Value
no value--------no value

Sign in to reply to this post

Eric Mittman

The error: 'open_basedir restriction in effect' indicates that the open_basedir setting in the php.ini is turned on which is used to restrict the locations that include files can be placed on the server.

If a file is uploaded to the server outside the locations specified by the open_basedir directive, you will receive that message. More information can be found here:
features.safe-mode

Sign in to reply to this post

jonathan.meilleur385477

Thanks for your answers.

I looked with the hosting compagny and they said taht we cannot put the server php's in safe mode "off".
They want to protect the database of other clients.

Is there a solution to solve the problem?

Thanks

Sign in to reply to this post

Eric Mittman

This is very unusual for the host to not allow safe mode to be disabled, according to the php documentation in php 5 this is deprecated and will not be available in php 6:

Safe Mode is deprecated in PHP 5.3.0 and is removed in PHP 6.0.0.

When the open basedir restriction is in effect you can only include files that are within the location specified in this setting. It looks like it may be the temp file in your webroot that is allowed:

/var/www/vhosts/seconcept.com/httpdocs:/tmp

To know for sure you can create a php info page by adding this line of code to the top of any php page:

php:
<?php phpinfo(); ?>



Look for the setting here, it is open_basedir. You should see the allowed paths in here, you will need to put any of the files that you want to include in here and adjust the paths accordingly.

Sign in to reply to this post

jonathan.meilleur385477

I tried everything and nothing is working..

I've run phpinfo() and you're both right, the path is really:
/var/www/vhosts/seconcept.com/httpdocs:/tmp
and the master value is :
"no value"

So, I've created a folder (tmp) on the server and dragged all the files in it changed the path in my php files and nothing have changed...

What can I really do??

Thanks again

Sign in to reply to this post

Eric Mittman

You will need to discuss this with your hosting provider because you will not be able to use any other folder for the includes. If they will not allow safe mode to be turned off then they might have some info for you on how you can make use of the directory that is in the openbase dir setting. If your host does not allow for include files to be used in php scripts I would suggest looking for another host.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...