Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Installation


Guest

Recommended Posts

Hello...

I'm trying to install OSCOMMERCE. I followed the instructions and now I'm on STEP 3.

I got the message: SQL FILE DOES NOT EXIST: /install/oscommerce.sql

 

The file is there...and rights are set to full (test mode)

 

Does anyone of you got the same problem ?

 

Thanks in advance..

 

Francisco

Link to comment
Share on other sites

I ran into the same problem. Are you running Apache or other web server? What I found was that because I was using the iPlanet web server not apache the application install was coded to use the Apache variables, like:

 

SCRIPT_FILENAME

 

If you aren't running Apache this variable doesn't exist. Instead of the following:

 

getenv(SCRIPT_FILENAME) you can replace with the equivalent PHP variable:

 

$_SERVER["SCRIPT_FILENAME"].

 

No idea why the developers of osCommerce use the less common Apache variables when anyone with php will have access to the php variables. I am going to take this up with them.

 

In short look through the files under /install and replace any "getenv" Apache variables with the PHP equivalent variable and you will be in luck. I changed all the getenv and ran the install and everything worked without a problem.

 

Hope this helps!

Link to comment
Share on other sites

  • 1 month later...
If you aren't running Apache this variable doesn't exist. Instead of the following:

 

getenv(SCRIPT_FILENAME) you can replace with the equivalent PHP variable:

 

$_SERVER["SCRIPT_FILENAME"].

Thanks Toddk! I also had the same problem on win 2000 + IIS (6.0 I think) and was going a bit loopy trying to find the problem.

 

Followed your advice and the database installed successfully. For any other OSC newbies (like me!) having the same problem on Win2k. I made the 2 changes shown below in install_3.php (catalog/install/templates/pages/install_3.php):

 

// replaced this:

// $script_filename = getenv('PATH_TRANSLATED');

// with this:

$script_filename = $_SERVER["PATH_TRANSLATED"];

 

if (empty($script_filename)) {

 

// And changed this:

// $script_filename = getenv('SCRIPT_FILENAME');

// to this:

$script_filename = $_SERVER["SCRIPT_FILENAME"];

}

 

Thanks again! :)

Link to comment
Share on other sites

  • 1 month later...

im trying to install and im having some problems. im at this step:

 

Database Import

 

A test connection made to the database was successful.

 

Please continue the installation process to execute the database import procedure.

 

It is important this procedure is not interrupted, otherwise the database may end up corrupt.

 

The file to import must be located and named at:

 

/usr/local/psa/home/vhosts/install/oscommerce.sql

 

 

and i cant get past it. what should be before /usr/local/psa/home/vhosts/install/oscommerce.sql ?

Link to comment
Share on other sites

  • 3 months later...

At that point you hit the 'Continue' button, because you've made a successful connection to the database. If something is going wrong there then let us know what exactly is happening, including full error messages.

 

Vger

im trying to install and im having some problems. im at this step:

 

Database Import

 

A test connection made to the database was successful.

 

Please continue the installation process to execute the database import procedure.

 

It is important this procedure is not interrupted, otherwise the database may end up corrupt.

 

The file to import must be located and named at:

 

/usr/local/psa/home/vhosts/install/oscommerce.sql

and i cant get past it. what should be before /usr/local/psa/home/vhosts/install/oscommerce.sql  ?

Link to comment
Share on other sites

Amazing you didn't get any more errors. Out of curiosity I tried to install osc on Win98 with Apache 1.38 and first had to change application.php to change the require('includes/functions/somefilename.php) to require('functions/somefilename.php) and in main_page.php the same thing with deleting templates/ in the require on line 31, 36, and 41 to get it working. It did install fine though.

 

Anyway, I find it peculiar that the webserver wants to find e.g. "usr/local/psa/home/vhosts/install/oscommerce.sql" whereas you are probably installing from the directory catalog? So I would think it should say: "usr/local/psa/home/vhosts/catalog/install/oscommerce.sql".

 

What happens if you change line 44 in install_3.php where the variable $sql_file is defined as: $dir_fs_www_root . 'install/oscommerce.sql'; and change it to:

$dir_fs_www_root . 'catalog/install/oscommerce.sql';

 

Just my 2 cents...

Link to comment
Share on other sites

I've tried now to do that change with several paths and im getting the same....

 

Look I uploaded the catalog directory as IS (no changes made to paths)

you can check the error

www.zeocomputers.com/catalog/install

 

Database is Username: stores

Database pswd id: test

Database name is: stores

 

I just create a DB as well so everything is set to someone to try :)

 

Please I want this to work!

 

If you have any suggestions (as above) let me know them

 

MSN [email protected]

Link to comment
Share on other sites

I tried and the error message indicates that PHP wants to find the file at: /usr/local/psa/home/vhosts/install/oscommerce.sql and obviously it is at /usr/local/psa/home/vhosts/catalog/install/oscommerce.sql

 

I have two suggestions:

 

1. change line 44 in install_3.php where the variable $sql_file is defined as: $sql_file = $dir_fs_www_root . 'install/oscommerce.sql';

and change it to the absolute path:

$sql_file = '/usr/local/psa/home/vhosts/catalog/install/oscommerce.sql';

 

2. make a folder "install" at root level, so: /usr/local/psa/home/vhosts/install and copy the file oscommerce.sql into that folder.

 

Hope this helps to get you through step 2/3.

Link to comment
Share on other sites

tried both unsuccesfully....

check the site now, it keeps looking for the file in the longer address now

 

New Installation

 

Database Import

 

The following error has occurred:

 

SQL file does not exist: /usr/local/psa/home/vhosts/usr/local/psa/home/vhosts/catalog/install/oscommerce.sql

 

 

any idea?

Link to comment
Share on other sites

Hi

 

They way I did it completely bypasses the need for the install program.

 

Try downloading phpMyAdmin

 

Upload that to your site.

 

Browse to and run the oscommerce.sql file from inside of phpMyAdmin. (click on the database name and scroll down the page)

 

That should set up your tables and stuff.

 

Try the install again.

 

If that does not work, try editing the 2 configure files in each "includes" directorys (one in admin, one in catalog) and add in all the server info in the right fields. You can find help with this on the forum.

 

Only thing I can suggest?

 

Toby

Link to comment
Share on other sites

Strange, even though you changed it to an absolute path:

 

$sql_file = '/usr/local/psa/home/vhosts/catalog/install/oscommerce.sql';

 

it puts the root directory in front of it?

 

If that is correct then $sql_file = 'catalog/install/oscommerce.sql'; should work, since for some strange reason it puts the root directory in front of the absolute path itself...

Link to comment
Share on other sites

  • 4 months later...

I hate to bring up an old thread, but I've tried everything on this thread

 

I have replaced the lines of code, like what is mentioned, but now I get a blank page instead of the error message. Does anybody have any idea?

 

Thanks

Link to comment
Share on other sites

  • 1 year later...

Toddk, thank you very much for that. After changing those functions in two places it worked PERFECT! You saved the day. Why on Earth do they provide a windows version and not make these changes so people don't waste so much time on something so simple?!

 

Thanks again,

D

Link to comment
Share on other sites

  • 1 month later...

Hello,

I had the same problem and its solved, i am using windows xp sp2 with IIS 6 and PHP Version 5.1.4,

I read here on on post here that said this:

 

Thanks Toddk! I also had the same problem on win 2000 + IIS (6.0 I think) and was going a bit loopy trying to find the problem.

 

Followed your advice and the database installed successfully. For any other OSC newbies (like me!) having the same problem on Win2k. I made the 2 changes shown below in install_3.php (catalog/install/templates/pages/install_3.php):

 

// replaced this:

// $script_filename = getenv('PATH_TRANSLATED');

// with this:

$script_filename = $_SERVER["PATH_TRANSLATED"];

 

if (empty($script_filename)) {

 

// And changed this:

// $script_filename = getenv('SCRIPT_FILENAME');

// to this:

$script_filename = $_SERVER["SCRIPT_FILENAME"];

}

 

With that, part of the problem was solved insted of saying "SQL file does not exist: /install/oscommerce.sql" it display the following, "SQL file does not exist: "C:/install/oscommerce.sql", so that was not the directory in the server where the files was, the solution i use was to change the following thing from up there.

 

$script_filename = $_SERVER["PATH_TRANSLATED"];

 

to this

$script_filename = $_SERVER["ORIG_PATH_TRANSLATED"];

 

try doing what is quoted and than if dont work just remplace

$_SERVER["PATH_TRANSLATED"]

with

$_SERVER["ORIG_PATH_TRANSLATED"]

Link to comment
Share on other sites

  • 1 month later...
Hello,

I had the same problem and its solved, i am using windows xp sp2 with IIS 6 and PHP Version 5.1.4,

I read here on on post here that said this:

With that, part of the problem was solved insted of saying "SQL file does not exist: /install/oscommerce.sql" it display the following, "SQL file does not exist: "C:/install/oscommerce.sql", so that was not the directory in the server where the files was, the solution i use was to change the following thing from up there.

to this

$script_filename = $_SERVER["ORIG_PATH_TRANSLATED"];

 

try doing what is quoted and than if dont work just remplace

$_SERVER["PATH_TRANSLATED"]

with

$_SERVER["ORIG_PATH_TRANSLATED"]

 

SCARBON, THANK YOU. I had a hard time to understand your English, but once I figured it out, you were correct!!!! Thank you for the post! I am using a WIMP config via IIS 7 and this resolved the issue (use ORIG_PATH_TRANSLATED instead of PATH_TRANSLATED.

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
SCARBON, THANK YOU. I had a hard time to understand your English, but once I figured it out, you were correct!!!! Thank you for the post! I am using a WIMP config via IIS 7 and this resolved the issue (use ORIG_PATH_TRANSLATED instead of PATH_TRANSLATED.

 

hey i tried all the things as you stated to change the script, it seems to be able to detect the sql and created the tables but then it just never give me error or confirmation after that and it just showing a screen with

 

New Installation

 

Database Import

 

and it just stop there. anyone can help me on that ? thanks.

Link to comment
Share on other sites

  • 4 weeks later...

After uploading files to Apache server when I tried to install I got massege " FATEL ERROR: Register_global is disable in php.ini, please enable it"

 

Can some one help me where I will get php.ini file and how to enable it.

Link to comment
Share on other sites

  • 1 month later...
After uploading files to Apache server when I tried to install I got massege " FATEL ERROR: Register_global is disable in php.ini, please enable it"

 

Can some one help me where I will get php.ini file and how to enable it.

 

 

1) go to the c:/windows/php.ini

 

2) Open the file with notepad

 

3) Browse the pages until u find register_global or go to the edit menu and copy and paste register_global to find

 

4) register_global=off and change it to on

 

5) Save the file

 

6) Make the same procedure for the php.ini which is installed in your php directory

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...