suPHP and OSCommerce

Most customers have got to grips with suPHP and the necessary changes this well. However one thing we didn’t reference in our earlier post about suPHP, was a permissions error in OSCommerce.

OSCommerce issues a warning if the user that PHP is running under is able to edit the configuration files. Obviously now we have suPHP the PHP user is your own username, and you probably need to be able to edit that file!

In your OSCommerce installation open up:
includes/application_top.php

Near the bottom you will find the following code, change the line in red from true to false to hide the warning:

define('WARN_INSTALL_EXISTENCE', 'true');
define('WARN_CONFIG_WRITEABLE', 'true');
define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
define('WARN_SESSION_AUTO_START', 'true');
define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

2 Comments

Football Gifts

Thanks for this.

What are the drawbacks with changing this to to ‘false’?

BetterWebSpace

This should only be used where suPHP is being used, under suPHP the code that the webserver runs to execute your code is run under your user account (rather than that of the webserver) and naturally your user account should be able to edit the config files (or you wouldn’t be able to setup the software!).

Leave a Reply

Your email address will not be published. Required fields are marked *