OSCOMMERCE after ART updates

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

OSCOMMERCE after ART updates

Unread post by jmackenz »

Howdy,

I had an oscommerce implementation running prior to doing the ART updates on PHP etc, which now appears to be out of commission.

I'm getting the following when attempting to get to the administration page
[client 24.58.134.201] PHP Warning: main() [<a href='function.main'>function.main</a>]: open_basedir restriction in effect. File(/usr/share/pear/includes/languages/english/) is not within the allowed path(s): (/var/www/vhosts/oldforgepewter.com/httpdocs:/tmp) in /var/www/vhosts/oldforgepewter.com/httpdocs/store/admin/includes/application_top.php on line 142
[client 24.58.134.201] PHP Warning: main(includes/languages/english/) [<a href='function.main'>function.main</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/oldforgepewter.com/httpdocs/store/admin/includes/application_top.php on line 142
[client 24.58.134.201] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/oldforgepewter.com/httpdocs/store/admin/includes/application_top.php on line 142
[client 24.58.134.201] PHP Fatal error: Cannot re-assign $this in /var/www/vhosts/oldforgepewter.com/httpdocs/store/admin/includes/classes/upload.php on line 31
When attempting to go to a category, it just goes back to main page and states the following in the log :
[Sat Mar 17 11:31:50 2007] [error] [client 24.58.134.201] Directory index forbidden by rule: /var/www/vhosts/oldforgepewter.com/httpdocs/store/
The Store can be found @ www.oldfogepewter.com/store

Any help is most greatly appreciated.

Thanks
- John
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

PHP 5 is much more strict about path enforcement than 4 was. I think this has been covered in other threads, and as I recall, oscommerce was one of those packages (at least in the past) that was not compatible with PHP 5+ in general. I'm sure thats been resolved by now, but you may need to update to a newer version.
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Unread post by jmackenz »

Is there a way to upgrade the entire application repository entry of oscommerce, rather than just updating on a per domain basis?
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Unread post by jmackenz »

Thanks to scotts comment, I went searching for oscommerce php 5 on google and found this :

http://forums.oscommerce.com/lofiversio ... 77004.html
1: Change in php.ini
register_globals = On
register_long_arrays = On

2: Change in catalog/admin/includes/classes/upload.php
on line 31 change

$this = null;

to

//$this = null;
Did this, restared httpd , works great.[/url]
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Unread post by jmackenz »

also found out about a bug with mysql > 4.1 .

http://www.unitedforums.co.uk/vb/archiv ... -7424.html has a quick change that fixes it.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

It looks like you need to add /usr/share/pear to your open_basedir path.
Lemonbit Internet Dedicated Server Management
jmackenz
Forum Regular
Forum Regular
Posts: 116
Joined: Tue Jan 23, 2007 10:18 am

Unread post by jmackenz »

Had already tried that through the vhost httpd.conf , hadn't helped, the above steps took care of it though.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: OSCOMMERCE error

Unread post by coolemail »

Hi All,

I have a customer who is having difficulty in uploading files to a test domain, before migrating it across.

The errors they are getting are:
[Mon Jul 20 10:27:03 2009] [error] [client 88.174.12.194] PHP Warning: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/home/httpd/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputExtra.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/subdomains/test/httpdocs:/tmp) in /var/www/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputData.php on line 2657

[Mon Jul 20 10:28:15 2009] [error] [client 88.174.12.194] PHP Warning: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/home/httpd/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputExtra.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/subdomains/test/httpdocs:/tmp) in /var/www/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputData.php on line 2657, referer: http://test.domain.com/

[Mon Jul 20 10:28:16 2009] [error] [client 88.174.12.194] File does not exist: /var/www/vhosts/domain.com/subdomains/test/httpdocs/shopimages/products/thumbnails/dvd.thumb.jpg, referer: http://test.domain.com/section.php?xSec=40

[Mon Jul 20 10:29:41 2009] [error] [client 88.174.12.194] PHP Warning: file_exists() [<a href='function.file-exists'>function.file-exists</a>]: open_basedir restriction in effect. File(/home/httpd/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputExtra.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/subdomains/test/httpdocs:/tmp) in /var/www/vhosts/domain.com/subdomains/test/httpdocs/routines/cartOutputData.php on line 2657, referer: http://test.domain.com/section.php?xSec=40
I was going to make the changes suggested by jmackenz above (thank you for the comprehensive follow-up with help on what sorted it for you). But the dates of this thread, and the associated links, are really old, and I'm not sure if this would be best practice now.

If they upload via the website, it fails. If they upload via ftp, it works fine. Interestingly, when I upload an item via the website, it works fine.

I'm not sure what they might be trying to do which is causing the errors above.

Does someone have advice on whether I want to change the php.ini file to the settings suggested, despite this being an old thread?

Can anyone advise, please?
Highland
Forum Regular
Forum Regular
Posts: 674
Joined: Mon Apr 10, 2006 12:55 pm

Re: OSCOMMERCE after ART updates

Unread post by Highland »

I wouldn't edit php.ini, as this is global to everyone. But you can create a conf/vhost.conf file to make the changes. open_basedir is inherently restrictive so you can expand it or disable it on a per-domain basis.
"Its not a mac. I run linux... I'm actually cool." - scott
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: OSCOMMERCE after ART updates

Unread post by coolemail »

Thank you Highland for that help. I was not aware I could do that on a per-domain basis.
Post Reply