osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

SQL file does not exist:

This is a discussion on SQL file does not exist: within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; Here's a fix for this little nightmare: In the install pages (/catalog/install/templates/pages/) install_2.php & install_3.php & install_5.php you see: Code: ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Installation Help

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-29-2004, 08:44 AM
Lurker
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
spearhead
Default SQL file does not exist:

Here's a fix for this little nightmare:

In the install pages (/catalog/install/templates/pages/)

install_2.php & install_3.php & install_5.php

you see:

Code:
$script_filename = getenv('PATH_TRANSLATED');
change to:

Code:
$script_filename = realpath($_SERVER['PHP_SELF']);

In install_5.php also change:

Code:
for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) {
to

Code:
for ($i=0, $n=sizeof($dir_fs_www_root_array)-2; $i<$n; $i++) {
AND in install_7.php change this:

Code:
$dir_fs_document_root = $HTTP_POST_VARS['DIR_FS_DOCUMENT_ROOT'];
  if ((substr($dir_fs_document_root, -2) != '/') && (substr($dir_fs_document_root, -2) != '/')) {
    $where = strrpos($dir_fs_document_root, '\\');
    if (is_string($where) && !$where) {
      $dir_fs_document_root .= '/';
    } else {
      $dir_fs_document_root .= '\\';
    }
  }
to this:

Code:
$script_filename = realpath($_SERVER['PHP_SELF']);
  if (empty($script_filename)) {
    $script_filename = getenv('SCRIPT_FILENAME');
  }

  $script_filename = str_replace('\\', '/', $script_filename);
  $script_filename = str_replace('//', '/', $script_filename);

  $dir_fs_www_root_array = explode('/', dirname($script_filename));
  $dir_fs_www_root = array();
  for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) {
    $dir_fs_www_root[] = $dir_fs_www_root_array[$i];
  }
  $dir_fs_document_root = implode('/', $dir_fs_www_root) . '/';
Hopefully this solves the install issues based on improper ENV values. This is based on testing with:

Apache 1.3.xx
PHP 4.3.2
MySQL 3.xx
RedHat 7.3 (Using Ensim 3.1 virtual hosting)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
files to edit don't exist on our server - there's more bbw osCMax v2 Customization/Mods 9 02-17-2006 06:33 AM
Subcategories won't show when produts exist RickChase osCommerce 2.2 Modification Help 2 07-13-2004 12:57 AM
The sessions directory does not exist jrglass osCommerce 2.2 Installation Help 1 04-30-2003 11:22 PM
Directories (admin/catalog etc.) do not exist ? mmkay osCommerce 2.2 Installation Help 7 03-10-2003 08:50 PM
SQL file does not exist dino osCommerce 2.2 Installation Help 4 03-04-2003 02:11 PM


All times are GMT -8. The time now is 04:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design