cavern Posted October 25, 2007 Posted October 25, 2007 I've always wondered why osCommerce doesn't have a more dynamic configure.php page for how robust it actually is. Like others, I tend to test the cart in house before uploading it to wherever I need to run the store. Sure going in to change the config.php file isn't that hard, but what if your dedicated box (or shared) has the exact same setup, minus the URL changes? Its rather annoying to go and change URLs, paths, etc each time you move or upload the files. I came up with this, and it works perfectly for me, sub domains, folders past root, doesnt matter. Current osCommerce Code: define('HTTP_SERVER', 'http://yoururlhere'); define('HTTPS_SERVER', 'http://yoururlhere'); define('HTTP_COOKIE_DOMAIN', 'domainname'); define('HTTPS_COOKIE_DOMAIN', 'domainname'); define('DIR_FS_CATALOG', '/var/www/html/catalog/'); My new code: $domainurl = "http://" . $_SERVER['SERVER_NAME']; $domainname = $_SERVER['SERVER_NAME']; define('HTTP_SERVER', $domainurl); define('HTTPS_SERVER', $domainurl); define('HTTP_COOKIE_DOMAIN', $domainname); define('HTTPS_COOKIE_DOMAIN', $domainname); define('DIR_FS_CATALOG', $_SERVER['DOCUMENT_ROOT'] . '/catalog/'); This allows me to upload directly to my dedicated box, and I never have to touch the configure.php. Granted some people need to change their SQL information, but I have it include a file thats NOT in the public web section with all the proper information, then use variables to feed it. Just my .2 cents, enjoy!
Brian-Bear Posted February 21, 2008 Posted February 21, 2008 I can get this to work ok on catalogue/includes/configure.php. But cannot figure out what catalogue/admin/includes/configure.php. should be Can anyone help with configure file for admin in rc1, showing what needs to be altered. Is there any drawback to using this?
adam777 Posted February 25, 2008 Posted February 25, 2008 but I have it include a file thats NOT in the public web section with all the proper information Is there a private oscommerce forum/section?
Brian-Bear Posted February 25, 2008 Posted February 25, 2008 can you post it up? but delete or xxxx out sensitive information
mloeffen Posted March 2, 2008 Posted March 2, 2008 I personally rather use my own configure.php next to the one of the production store in 'catalog/includes/local'. In the oscommerce-download is a readme there that states This directory contains local configuration information. It also must contain a file named configure.php that can be used to override the defaults set in application_top.php Remember to execute PHP commands the file needs to start with <?php and end with ?> Before you upload to the site, simply remove your catalog/includes/local/configure.php and you're done. Just my 2 cts
♥FWR Media Posted March 3, 2008 Posted March 3, 2008 I've always wondered why osCommerce doesn't have a more dynamic configure.php page for how robust it actually is. It is robust .. it works .. yours doesn't. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.