Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping Cart and logging in users not working


technoboy18

Recommended Posts

Hi guys,

 

I am running WampServer (PHP version 5.3.0 and mysql 5.1.63). These are the following steps that I do to get the installation:

 

1. Unzip the source downloaded from website (2.2.rc2)

2. I place the content in my www folder..

3. I create database called oscommerce in phpmyadmin (option selected collation)

4. I complete the installation process:

Database Server: localhost

Username: root

Password:

Database name: oscommerce

 

5. Database imported correctly.

6. WWW address: http://localhost/catalog/

7. Webserver Root Directory: C:/wamp/www/catalog/

8. I fill out the name of the shop and i get the following: The installation and configuration was successful!

9. I click on Catalog and I get following errors:

 

Deprecated: Function eregi() is deprecated in C:\wamp\www\catalog\includes\classes\language.php on line 87

Warning: Installation directory exists at: C:/wamp/www/catalog/install. Please remove this directory for security reasons.

Warning: I am able to write to the configuration file: C:/wamp/www/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

I change the error notification in includes/application_top.php and admin/includes/application_top.php

from

//set the level of error reporting
 error_reporting(E_ALL & ~E_NOTICE);

 

to:

//set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

 

I change the configure.php file to read only to get rid of that second error and I remove the catalog install folder to get rid of the last error.

 

Problem I have is that when I click on a product the shopping cart does not get updated.It keeps taking me to the page where it says "Your Shopping Cart is empty!"

 

Also user registered appears in my customers list when I access through admin section but that user can't log in..

 

I checked forum but no one seemed to have the same problem.

 

This is how my configure.php file looks:

<?php
 define('HTTP_SERVER', 'http://localhost');
 define('HTTPS_SERVER', 'http://localhost');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'http://localhost');
 define('HTTPS_COOKIE_DOMAIN', 'http://localhost');
 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', 'C:/wamp/www/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'root');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'oscommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

I also tried with force cookie option but still no luck.

 

Any help would be appreciated.

 

Thanks

Mark

Link to comment
Share on other sites

Problem solved.

 

I decided to downgrade version of PHP from 5.3.0 to 5.2.5 and that solved all the errors I was getting.

 

Fix for people using WampServer 2.0i to run osCOMMERCE:

 

On Add-on page download 5.2.5 and that should solve the problems if they happen.

 

http://www.wampserver.com/en/addons_php.php

 

Shopping cart works fine so does customer log-ins.

 

Thank everyone I hope this helps someone.

 

Mark

Link to comment
Share on other sites

Problem solved.

 

I decided to downgrade version of PHP from 5.3.0 to 5.2.5 and that solved all the errors I was getting.

 

Fix for people using WampServer 2.0i to run osCOMMERCE:

 

On Add-on page download 5.2.5 and that should solve the problems if they happen.

 

http://www.wampserve.../addons_php.php

 

Shopping cart works fine so does customer log-ins.

 

Thank everyone I hope this helps someone.

 

Mark

 

 

 

There is an updated osc 2.2RC2A with the regex fixes in place

http://github.com/osCommerce/oscommerce2

Nic

 

 

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Thanks for giving your solution, too many don't bother wink.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jon,

 

I recently installed the same setup you have going and had the exact same issue. I had been searching all over without success until I stubled upon this stead, so THANKS!

 

One more question; I still have not been able to get rid of the last message so could you provide some instructions.

 

 Warning: I am able to write to the configuration file: C:/wamp/www/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

I already removed the install folder and I am unsure of how to edit the user permissions of a file.

 

Thanks for whatever help you can provide.

Link to comment
Share on other sites

Using Windowz Explorer navigate to the file C:\wamp\www\catalog\includes\configure.php

 

<right-click> on the file.

 

In the context menu that appears choose "Properties"

 

In the dialogue box that appears check the box to the left of "Read only"

 

Click "Apply" then "OK"

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Hi all,

 

I appear to be having the same problem now with everything updated, I am unable to log in to my shop or place any items in my cart while I test on my wamp server. Im using the latest php 5.3.0 mysql 5.1.36 apache 2.2.11. If I go back a version or 2 in php then it works, very weird..

 

I figure that since I have updated everything as per the thread, Im a bit concerned that with any future php changes, as to how this will affect the store etc. I dont want to downgrade my php version Im using coz all it will do is hide the inevitable errors and problems that will arise... I hope this is making sense Ive been staring at code for the last few hours and Im nearly over it LOL.

 

If anyone can decipher my mumblings and offer any suggestions that would be greatly appreciated.

 

Cheers!

Link to comment
Share on other sites

Hi all,

 

In reply to my previous post, I found this little obscure titbit fix while hunting through the forums and the net and the fix seems to be working.

 

In catalog/includes/configure.php

 

I changed replaced any instance of the word localhost with 127.0.0.1 and ended up with the following snippet of my config file, I also made sure curl was active in the php extensions for 5.3.0 on my wamp server.

 

 

define('HTTP_SERVER', 'http://127.0.0.1');

define('HTTPS_SERVER', 'http://127.0.0.1');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', '127.0.0.1');

define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');

define('HTTP_COOKIE_PATH', '/catalog6/');

define('HTTPS_COOKIE_PATH', '/catalog6/');

define('DIR_WS_HTTP_CATALOG', '/catalog6/');

define('DIR_WS_HTTPS_CATALOG', '/catalog6/');

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', 'H:/wamp/www/catalog6/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', '127.0.0.1');

 

 

 

I hope this helps, as this seems to have fixed my shopping cart and customer login problem.

 

Cheers!

Link to comment
Share on other sites

  • 2 months later...

I just wanted add that for those pulling their hair out with MAMP. This is the problem I was dealing with. If the shopping cart/login is not working, go into preferences and select 5.2 for php.

 

Hope this saves someone some time.

 

 

Problem solved.

 

I decided to downgrade version of PHP from 5.3.0 to 5.2.5 and that solved all the errors I was getting.

 

Fix for people using WampServer 2.0i to run osCOMMERCE:

 

On Add-on page download 5.2.5 and that should solve the problems if they happen.

 

http://www.wampserver.com/en/addons_php.php

 

Shopping cart works fine so does customer log-ins.

 

Thank everyone I hope this helps someone.

 

Mark

Link to comment
Share on other sites

  • 1 month later...

Hi all,

 

In reply to my previous post, I found this little obscure titbit fix while hunting through the forums and the net and the fix seems to be working.

 

In catalog/includes/configure.php

 

I changed replaced any instance of the word localhost with 127.0.0.1 and ended up with the following snippet of my config file, I also made sure curl was active in the php extensions for 5.3.0 on my wamp server.

 

 

define('HTTP_SERVER', 'http://127.0.0.1');

define('HTTPS_SERVER', 'http://127.0.0.1');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', '127.0.0.1');

define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');

define('HTTP_COOKIE_PATH', '/catalog6/');

define('HTTPS_COOKIE_PATH', '/catalog6/');

define('DIR_WS_HTTP_CATALOG', '/catalog6/');

define('DIR_WS_HTTPS_CATALOG', '/catalog6/');

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', 'H:/wamp/www/catalog6/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', '127.0.0.1');

 

 

 

I hope this helps, as this seems to have fixed my shopping cart and customer login problem.

 

Cheers!

 

 

This was a GREAT! posting, I have been fighting this issue for about a week now and nobody seem to have the answer but using the IP address instead of localhost resolved the issue right away.....THANK YOU SO VERY MUCH....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...