OsCommerce installation on Windows XP

Uit DeVliegendeWiki

Ga naar: navigatie, zoeken
  • Apache, MySQL & PHP: At earlier trials, I got Apache, MySQL and PHP already installed on my laptop. It was not trivial to get these to work together, since certain versions of any of these programs refused to work together with certain versions of any one other component of these three.
  • Source code: Starting point is the file oscommerce_2.2ms2_060817 which is a release of osCommerce from August 17, 2006, sometimes referred to as the osCommerce Core. Although I first want to set up a Dutch store, the osCommerce Core files are in English only.
  • Place files: After downloading and unzipping, only the directory catalog is needed. In my case, I had to place in in C:\Apache\Apache2\htdocs.

Create MySQL database I manually have to create a database in MySQL, with a corresponding user + password. See MySQL for details.

Configure osCommerce

  • Start the installation by opening http://localhost/catalog
  • New installation - Please customize the new installation with the following options: Choosed both Import Catalog Database + Automatic Configuration.
New Installation - Database Import
Label Value Comments
Database Server localhost Without slashes or anything like that
Username MySQL User name This is the MySQL user name that I had configured earlier. If the osCommerce site is e.g., about cars, I might call the database CarBase
Persistent connection (Checked) Checked for I plan to develop on only one machine (David Mercer, osCommerce: Professional Edition, p. 43).

Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Certain versions of MySQL have some conflicts with certain versions of PHP. The suggested solution of upgrading your MySQL client, doesn't seem to make much sense. What did work for me, is setting the password in another way using set password for xyz@locahlost = OLD_PASSWORD('password'); with password replaced with the actual password.

Continuing with the installation procedure:

New Installation - Please enter the web server information
Label Value Comments
WWW Address http://localhost/catalog In my case, osCommerce just comes up with the right values. Maybe you only need to check for errors here, like in case when you run multiple web servers and/or multiple instances of osCommerce on machine (not my idea of fun).
Webserver Root Directory C:/Apache/Apache2/htdocs/catalog/ Again, I guess that normally, I only need to review this value, not enter here something myself.
HTTP Cookie Domain: localhost Again, I suspect that this should be filled in already correctly. If this is not the case, that would be cause for concern.
HTTP Cookie Path: /catalog/ Again, this should be OK already

If everything wend OK, you can now choose between options: Catalog and Administrative Tool. The former is useful right now for testing purposes. After choosing it, you should see the basic shop layout plus probably a bunch of warnings and/or errors. Here are some of them.

Warnings after clicking Catalog
Warning Comments
Warning: session_start() [function.session-start]: open(/tmp\sess_...) failed: No such file or directory (2) in C:\Apache...\sessions.php' on line 97 According to http://forums.oscommerce.com/lofiversion/index.php?t132465.html, the trick is to edit the last line in both of the configure.php files. On my machine, I found them at
  • htdocs/catalog/includes/configure.php, and
  • htdocs/catalog/admin/includes/configure.php.

As you can see from this, the directory structure is kind of duplicated: The 'normal' catalog structure, and an admin structure. In both cases, at the last tine I had to enter mysqlas value.

Warning: Installation directory exists at: C:/Apache/Apache2/htdocs/catalog/install. Please remove this directory for security reasons. It seems a common practice amongst PHP web based applications to have an installation directory as part of the package structure, which has to be removed after installation.

Solution: Remove the damn directory.

Warning: I am able to write to the configuration file: C:/Apache/Apache2/htdocs/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file. This seems to be as well a common practice for PHP web based applications. Actually a nice courtesy of osCommerce to check for this, since it's an easy security risk: Just enter \\localhost\catalog\includes\configure.php in the address bar and you have access to the file.

Ehh, on Linux, this would probably be simple to fix. Right now, I don't know how to fix this under Windows.

Warning: The session directory does not exist: /tmp. Sessions will not work until this directory is created. Solution: Create the damn directory as
Persoonlijke instellingen