• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

7.5.3 OSCommerce doesn't work ! - Warning: file_exists():

D

djround

Guest
Hi all,

Just updated to 7.5.3 on an almost vanilla server and tried to install OS Commerce from the application vault but this is what I get... Have a look at http://www.cheaptunes.co.uk/oscommerce/

Warning: file_exists(): open_basedir restriction in effect. File(/home/httpd/vhosts/cheaptunes.co.uk/httpdocs/oscommerce/install) is not within the allowed path(s): (/home/httpd/vhosts/cheaptunes.co.uk/httpdocs:/tmp) in /var/www/vhosts/cheaptunes.co.uk/httpdocs/oscommerce/includes/header.php on line 15

Ive tried installing it using the default settings, custom settings everything but with no effect on the error.

Anyone got any ideas?
 
This is common for oscommerce.

You will need to edit or create a vhost.conf file and put it in the domain conf directory.

<Directory /home/httpd/vhosts/domain.com/httpdocs>
php_admin_value safe_mode 0
php_admin_value open_basedir /home/httpd/vhosts/domain.com/httpdocs:/tmp
</Directory>
You may or may not need the :/tmp

Then from the shell command line:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

Lastly, restart Apache.
 
Fantastic thats a great help...

this is my new vhost.conf file:

<Directory /home/httpd/vhosts/cheaptunes.co.uk/httpdocs>
php_admin_value safe_mode 0
php_admin_value open_basedir /
</Directory>

I had to add the open_basedir line to get it to work..

BUT I still have a problem... Have another look at the domain again:

http://www.cheaptunes.co.uk/oscommerce/

Now when Plesk is installing all the images and links it is missing the www. prefix of the domain. An example of this the OSCommerce logo in the top left of the screen. The <img tag in the html is pointing to:

http://cheaptunes.co.uk/oscommerce/images/oscommerce.gif

but the image is really at:

http://www.cheaptunes.co.uk/oscommerce/images/oscommerce.gif

Soooo close :) Is it my open_basedir statement?

Thanks for your help.
 
Sorry, I forgot the one line.

Do you really want to give access to / ?? You would be better to put the path to the domain's httpdocs folder and /tmp if needed.

With Plesk, the 'www.' is optional when browsing. Are you concerned about that for esthetics?
 
hmmmm it only works when I use this vhost.conf:

<Directory /home/httpd/vhosts/cheaptunes.co.uk/httpdocs>
php_admin_value safe_mode 0
php_admin_value open_basedir /
</Directory>

I know what you mean about setting the base directoy to / but nothing else works, not even your earlier suggestions including :/tmp :confused:

Yeah I need plesk to install OSCommerce to www.cheaptunes.co.uk/oscommerce not cheaptunes.co.uk/oscommerce because Im running external dns with an automated system. Ive manually input an A record for cheaptunes.co.uk but that was only for testing. It works at the moment so Im just about there...

Thanks for your help James - I really appreciate it...

Ive got more plesk\oscommerce problems now concerning file(): errors but I'll start a new thread for that to try and help document this problem and keep the thread relevant.

Thanks again
 
Ah, so it's not esthetics then. You'll probably end up using rewrite rules in either vhost.conf or .htaccess to add 'www.' if it doesn't exist in {HTTP_HOST}.

Unfortunately, I don't have an exact example code to give you at the moment, and since I have been up for about 48 hours, I'm too tired to think about it now.
 
Time to hit them sheets my freind ;)

Thanks for your help... Job well done! ;)
 
Back
Top