Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Install Problems


Guest

Recommended Posts

I just installed Version 2.1 of OsCommerce and I am getting:

Error.

 

Unable to determine Page Link.

 

At the bottom of the page.

 

I've poked around and have not been able to find what the problem is.

 

I'm running php 4.2.1 on FreeBSD 4.4 and apache 1.3.26

 

Any help would be appreciated.

 

George

Link to comment
Share on other sites

After I did that the install script is Quacking about register_globals being turned off.

 

I have them turned off on purpose on this server.

 

Are register_globals required to be on for MS1?

Link to comment
Share on other sites

I just installed 2.2 MS1 and get the following error:

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

My server has the globals off due to security reasons, and is running PHP 4.3.1. Is there a way around the globals off issue? Is there one ore two files I can add :

// Mimic Globals on:

extract($_COOKIE);

extract($_SERVER);

extract($_GET);

extract($_POST);

extract($_ENV);

extract($_REQUEST);

extract($_SESSION);

Or do I have to hit every file? Or is there a better solution altogether?

 

-berzerko

Link to comment
Share on other sites

Carey,

 

Have the same problem as you.

 

I have dealt with this register_global problem by using .htaccess

 

Create your .htaccess file in the directory your oscommerce files are located. Put this in that file:

 

php_value include_path /path_to_your_directory

php_flag register_globals on

 

Next if your server is running Apache you need to add this to your virtual server:

 

<Directory /path_to_your_directory>

AllowOverride All

</Directory>

 

After you do that it still probably won't work. My install still doesn't.

 

I just get a white screen

 

George

Link to comment
Share on other sites

Good News!

 

I looked through a handful of php files in the catalog folder and noticed : " require('includes/application_top.php');" was at the top of each file. So I went there, and around the 20th line I changed the code as follows

//  if (function_exists('ini_get')) {

//    ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

//  }

// alternate globals on code



 if (function_exists('ini_get')) {

   ini_get('register_globals') or include('globals_on.php');

} else {

exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

 }

And I added the file globals_on.php to the include file. globals_on.php contains the following code:

<?php

// Mimic Globals on:

extract($_COOKIE);

extract($_SERVER);

extract($_GET);

extract($_POST);

extract($_ENV);

extract($_REQUEST);

extract($_SESSION);

?>

Anyway the page shows up with lots of warnings at the top. But the page does show! Gota go now I have other problems I just updated my OS and this are going haywire. Otherwise I would put the warnings here. As soon as things are fixed I'll post them. Try this fix. maybe you can fine tune it while I'm away

 

-berzerko

Link to comment
Share on other sites

Back again. My new udpate turned off my Apache. Had me freaked for a couple of minutes.

 

Anyway, these are the errors I get at the top of the page.:

Warning : extract() [ function.extract ]: First argument should be an array in /Library/Apache2/htdocs/catalog/includes/globals_on.php on line 9

 

Warning : session_start() [ function.session-start ]: Cannot send session cookie - headers already sent by (output started at /Library/Apache2/htdocs/catalog/includes/globals_on.php:9) in /Library/Apache2/htdocs/catalog/includes/functions/sessions.php on line 67

 

Warning : session_start() [ function.session-start ]: Cannot send session cache limiter - headers already sent (output started at /Library/Apache2/htdocs/catalog/includes/globals_on.php:9) in /Library/Apache2/htdocs/catalog/includes/functions/sessions.php on line 67

 

Warning: Installation directory exists at: /Library/Apache2/htdocs/catalog/install. Please remove this directory for security reasons.

 

And this is the error I get at the bottom of the page:

 

Warning : Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

Link to comment
Share on other sites

Next Change, in globals_on.php You need to use the following code. Since the old style $HTTP_... variables are used

<?php

// Mimic Globals on:

//	extract($_SESSION);

//	extract($_COOKIE);

//	extract($_GET);

//	extract($_POST);

//	extract($_SERVER);

//  extract($_ENV);

extract($_REQUEST);



if (!empty($_SERVER)) { 

extract($_SERVER); 

} else if (!empty($HTTP_SERVER_VARS)) { 

extract($HTTP_SERVER_VARS); 

}



if (!empty($_ENV)) { 

extract($_ENV); 

} else if (!empty($HTTP_ENV_VARS)) { 

extract($HTTP_ENV_VARS); 

}



if (!empty($_COOKIE)) { 

extract($_COOKIE); 

} else if (!empty($HTTP_COOKIE_VARS)) { 

extract($HTTP_COOKIE_VARS); 

}



if (!empty($_POST)) { 

extract($_POST); 

} else if (!empty($HTTP_POST_VARS)) { 

extract($HTTP_POST_VARS); 

}



if (!empty($_SESSION)) { 

extract($_SESSION); 

} else if (!empty($HTTP_SESSION_VARS)) { 

extract($HTTP_SESSION_VARS); 

}



?>

 

Another problem has come up. Now all of the sudden I am getting the following error:

 

Warning : mysql_connect() [ function.mysql-connect ]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /Library/Apache2/htdocs/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

What's this all about?

Link to comment
Share on other sites

My mysql was also turned off.

 

It seemed to work for a second then I reloaded the page now I get:

 

Warning : main(includes/languages/.php) [ function.main ]: failed to create stream: No such file or directory in /Library/Apache2/htdocs/catalog/includes/application_top.php on line 243

 

Fatal error : main() [ function.main ]: Failed opening required 'includes/languages/.php' (include_path='.:/Library/PHP4/lib/php') in /Library/Apache2/htdocs/catalog/includes/application_top.php on line 243

 

now what?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...