Upload the /catalog and sub-directories to your server.

The files and directory structure must be uploaded to your web server. This can accomplished in several different ways. Use whatever method is most familiar to you, i.e., unzipping the zip archive to your local computer and using your favorite FTP program to upload those files, or using SSH to tar/unzip on your server to avoid the tedium of downloading and re-uploading.

The files can be uploaded to the document root, or any other subdirectory, like /catalog.

Note: If you are using FTP to upload files, you must upload all PHP files in ASCII mode, not binary. In our examples, we upload the files to the /catalog subdirectory.

If you have never looked at the oscommerce archive before, the basic directory structure looks like this:

       osCommerce2.2MS1.zip
             /catalog
                /admin

First, upload the /catalog directory and all the directories and files it contains to your document root (public_html or www). When you are finished uploading, your basic directory tree should look like this:

           /public_html
              /catalog
                  /admin
                       /images
                       /includes
                  /download
                  /images
                  /includes
                  /install

Set the permissions on /catalog/includes/configure.php and /catalog/admin/includes/configure.php to chmod 777 if on a Unix/Linux system.

Setting file permissions correctly will allow the installation script to write to the configure.php files. So, after they are uploaded you can use telnet, ssh, or your favorite FTP client to set the file permissions. CHMOD 777 will set the correct permissions for installation. If on a Windows based system, you will not need to change file permissions yet. Using phpMyAdmin or other tool, create your database and user, and assign that user to the database.

This section provides instructions using phpMyAdmin to create a database and user, and assign that user to the database. These steps are necessary BEFORE you run the install script. Note:You do not need to create the database beforehand if your MySQL account has permissions to create new databases.

 1. On the opening screen of phpMyAdmin, under the MySql heading, you will see a text box. Enter the name of your database here, and click the create button. This creates your database.
 2. Click the Home link in the left frame. Then click the users link. On the next page, select the database that you want to assign this user to. Enter the host name (usually localhost), enter the username, and password. Check all the privileges available and click go. This creates the user and assigns the user to the correct db.

Note: Many virtual hosts do not allow this type of access through phpmyadmin, and instead provide you with another way to create your databases and users through your hosting control panel. Check with your host. Run the install script, filling in all the required information.

The install script is included in the osCommerce package and is located in the /catalog/install directory. Open your web browser, and point it to http://yourserver.com/catalog/install/index.php and the installer will begin. Replace ‘yourserver’ with your domain name or ip address. This will start the osCommerce installation script.

See the steps below to complete the installation script:

 1. Select the 'New Install' button
 2. Next, check the "import catalog database" and "automatic configuration" checkboxes.
 3. Make sure all the Webserver Information on this page is correct in section 2
 4. Next, enter your correct database information in section 3 of the install page
 5. Click the "Continue" Button
 6. Next, the script will confirm a connection to your database, if it all works, click the continue button. If you get an error, you have made a mistake in your database info. Click the back button and correct your mistake.
 7. Next, you will get a confirmation of successful database import. Click the continue button.
 8. Next, the install script will attempt to access your configure.php files. If the permissions are wrong, you will get error messages, and a "Retry" button. Set the permissions correctly and retry.
 9. The next page has more options. This is step 2 of the installation. Enter the correct web server information.
10. If you want to enable SSL, check the checkbox, and confirm that all info is correct.
11. If you are on shared hosting, make sure the "persistent connections" box is unchecked.
12. Choose to store sessions as files or in the database and click continue.
13. You have reached the conclusion of the install script. Before you continue, click each button, "Catalog" and "Administration Tool" to test the install.

Re-set the permissions on /catalog/includes/configure.php and /catalog/admin/includes/configure.php to chmod644

This is important to ensure security of your configuration. CHMOD 644 the above files. This can be done through telnet, ssh, or an FTP client. If on a Windows server, you will need to right click the configure.php files and select 'properties' in the context menu. Once on the properties page, check the 'Read Only' chekbox, click Apply, and OK. Set the permissions on /catalog/images dir to 777

In order to properly upload images through the admin section, the images directory must have world writable permissions set. CHMOD 777 this directory. Create the dir /catalog/admin/backups and set the permissions to 777

In your /catalog/admin directory, create the subdirectory /backups and set the permissions to 777. This will allow you to use the database backup function without receiving error messages. With this permissions configuration, it is not secure to keep backups on your server. You should download the backup to your local computer, and never store the backup on the web server. Optional Password protect your /catalog/admin dir using .htaccess

Your admin section should be password protected. The easiest way to do this is to use .htpasswd and .htaccess to secure the directory. If you are not sure how to do this, please follow the procedure outlined below:

        AuthType Basic
        AuthName "Locked Area"
        AuthUserFile /home/youraccount/.htpasswds/admin/passwd
        require valid-user

See Also .htaccess Instructions Add to your DirectoryIndex statement and include the following : index.php This can be done in the Apache httpd.conf file if you have root access, or can be done in an .htaccess file in your /catalog dir.

This is the .htaccess method for adding the DirectoryIndex statement.

 1. Create a plain text file using a text editor.
 2. Add this statement : DirectoryIndex index.php index.htm index.html
 3. Save the file as .htaccess (note the period before the h)
 4. Upload it to your /catalog directory

This tells the server to look for index.php as the index page in the /catalog directory, so you can access your catalog by the url http://www.yoursite.com/catalog/ instead of having to include the filename like this http://www.yoursite.com/catalog/index.php. Delete your /catalog/install directory

Congratulations, you have completed all the necessary steps to successfully installing OSCommerce on your web server. You should be able to access your catalog at http://yoursite.com/catalog and your admin at http://yoursite.com/catalog/admin .

 
installing_via_ftp.txt · Last modified: 2007/12/28 20:47 by michael_s
Host with the osCMax experts
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki