ggorman Posted February 28, 2005 Share Posted February 28, 2005 Ok, I'm stumped. I've been reading and searching the site for a couple of days. This is the MS2 standard release. Everything works just fine, but I can't add items to the cart. I suspect it's a configuration problem so any ideas are welcome. This is for a new server that doesn't have a DNS entry yet, you have to use the IP address. Any ideas are welcome. Greg Apache/2.0.52 (Debian GNU/Linux) mod_perl/1.99_14 Perl/v5.8.4 mod_python/3.1.3 Python/2.3.4 PHP/4.3.10-2 mod_ssl/2.0.52 OpenSSL/0.9.7e Server at 209.34.96.75 Port 80 Catalog/Configure.php <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://209.34.96.75'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://209.34.96.75'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', '209.34.96.75'); define('HTTPS_COOKIE_DOMAIN', '209.34.96.75'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/var/www/html/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'oscommerce'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Link to comment Share on other sites More sharing options...
ggorman Posted March 1, 2005 Author Share Posted March 1, 2005 After pounding on this for a long time I hit on an idea. Our main site is session-based and so is osCommerce. So, I created a separate Apache Virtural Server for the store and now it all works. Its' because the store uses PHP session_start() and my site already had a session running and had already output a whole bunch of stuff. I don't want to dig around and figure out how to rip out or make the OSC session stuff compatible with ours, so a vitural server might work OK. Just for documentation purposes, here is how you do virtual servers in Apache2 and Debian: /etc/apache2/sites-available/default NameVirtualHost *:80 <VirtualHost *:80> ServerName asaserver php_value auto_prepend_file /var/www/html/global/header.php php_value auto_append_file /var/www/html/global/footer.php php_value register_globals On ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place #RedirectMatch ^/$ /apache2-default/ </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> /etc/apache2/sites-available/store <VirtualHost *:80> ServerName store.asaserver php_value register_globals On ServerAdmin webmaster@localhost DocumentRoot /var/www/catalog <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/catalog> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place #RedirectMatch ^/$ /apache2-default/ </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/store.error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/store.access.log combined ServerSignature On Alias /icons/ "/usr/share/apache2/icons/" <Directory "/usr/share/apache2/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> For Debian, you have to create symlinks from the 'sites-enabled' directory to the files in the 'sites-available' directory and restart Apache2 for them to appear. Access the store by 'http://store.asaserver" and the regular site by "http://asaserver" ... but don't try it. This system isn't in the DNS. Eventually we'll change 'asaserver' to our real DNS name. The other good thing about this is that you now can turn register_globals on only for the store if your site doesn't require it (unfortunately ours does). Greg Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.