Nixser.com


Nixser.com

Webdev, Internet, Blog, Tech Tips, iPhone, and more!

osCommerce Installation (without register_globals).

Today, I did an osCommerce installation on my web space. Pretty straight forward process in a nutshell, a little bit of patching needs to be done your web server has disabled “register_globals” variable in php.ini. It can be easily solved, not a big problem at all.

First, download your copy of osCommerce. Upload to your server, best if you’ve got SSH access, upload the archive to your web root, and extract it there. If not, extract the archive on your local system, and upload the extracted files with your FTP login. Refer to following pre-requisites check.

  1. To check if your web host/server has “register_globals” enabled.
    Simply upload a php file with this line of code inside, to your web root directory.
    [code][/code]
    Name the file whateveryoulike.php, and then browse it in http://yourdomain.com/whateveryoulike.php

    Notice the PHP Core section. Look for variable “register_globals”, if both the Master and Local Value are Off, that means it is not enabled.

  2. To check if your web host/server has “allow_call_time_pass_reference” enabled.
    Also check your phpinfo(); , the first entry under PHP Core.

    Take note of your server settings, and we will go to mysql database creation first. Most of the hosting servers have mysql database server installed. All you need to do is create an empty database, a database user, and user password. If you have no access to Tools like Cpanel, or phpMyAdmin, you have to contact your server admin to enable one for you.

Now here’s various situations.

  1. Your host/server has “register_globals” enabled.
    Easiest of all, just simply browse to http://yourdomain.com/install/ , if you extract/upload the files in your web root directory. Or, http://yourdomain.com/path-to-osc/install/, if you have it under a new directory in your web root.
  2. Your host/server has “register_globals” disabled, but “allow_call_time_pass_reference” enabled.
    Before doing anything, you should confirm that your Apache web server has “AllowOverrides” enabled. You need to check with your server admin. If it is enabled, then by adding a .htaccess file in your installation directory will do the trick. These lines need to be added in the file.
    [code]
    php_value register_globals 1
    [/code]
    After uploaded the .htaccess file, you can check with your phpinfo(); again, the Local Value of “register_globals” should be On now.
  3. Your host/server has “register_globals” disabled, there’s no way to go around.
    This is my case, I had to apply the Register Globals patch from osCommerce contributions. I use Version 1.5. Just follow the instruction in the archive file, it’s just simply replacing a few files.

Solutions above should get you to the installation screen successfully. Once you there, you’re considered safe. Look at this wonderful How-To, found in osCommerce knowledge base. The next thing you need to do, is to get familiar with features, and functions.

I’m in the middle of tuning my installed version, will be back with some other useful tips hopefully.

Sat, October 21 2006 » E-commerce, WWW

3 Responses

  1. david April 11 2007 @ 7:58 pm

    You seem to know what you are talking about. So I have a question born of frustration.

    Where, what, how about the patch file?

    How is the patch installed?

    Where is the patch installed?

    Everyone on the net seems to think that this is universally known, and does not need to be mentioned.

    Could you advice?

  2. Yien Bin April 12 2007 @ 1:26 am

    Hi David. This is the URL for the patch.
    http://www.oscommerce.com/community/contributions,2097

    You will be getting a zip file: register_globals_v1.5.zip
    After you unzip it, you will see a subfolder name “patch_instructions”, all info you need is inside that folder. The files are without any extension, so in Windows you might need to right click those and open with Notepad.

  3. david April 12 2007 @ 3:08 am

    Hi Yien,

    I did not realise that the icons are download links on that page. I had been clicking on the links on the left of the page and seeing nothing.

    Thanks for the help.

    Sorry for the trouble.

Leave a Reply