Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to determine the page link


mibu

Recommended Posts

Hi!

 

When a new customer creates an account, he doesn't get the Create_account_success message, but only the error notification:

 

"Unable to determine the page link!"

 

While the account ist nevertheless created correctly, the error message ist confusing.

 

What can be wrong?

 

I' ve already searched the forum for this error message and found many results, but they all seem to rely to different problem.

 

I have register_globals turned ON and search_engine_friendly_urls=false.

 

 

mibu

Link to comment
Share on other sites

Could be a problem with the SSL settings. Look at includes/configure.php and check that you have everything set right. If you have problems with this, please post the contents of this file -- without the database info -- and we'll take a look.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I have SSL turned off. My configure.php looks like this:

 

  define('HTTP_SERVER', 'http://quantenleser.de'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'quantenleser.de');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/kn27zt3/htdocs/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Link to comment
Share on other sites

Is the error message in English? Could you please cut and paste the exact error message. Sorry, but my Internet connection is so slow right now that I couldn't get through the process to check it for myself.

 

If the error message is "Error! Unable to determine the page link!", in English, that is a hard-coded error message in the tep_href_link function in html_output.php. That message only occurs when a generated page link is empty (has not been set.)

 

If that is the case, create_account.php is not generating a link to the success page. Your configure.php looks correct, so that's probably not it. Does your host have safe mode set? If not, it's probably some weird setting. I'll try to take more of a look at the code later.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I took another look at the code. This is a straight-forward redirect to FILENAME_CREATE_ACCOUNT_SUCCESS. It should only fail if that constant has not been defined in includes/filenames.php. You might want to check there first. Also make sure that the file create_account_success.php actually exists.

 

If you have not made any modifications to these files then this is not an osCommerce problem. Please check to see if your server has cURL installed, and that safe mode is off. Both of these will cause fatal errors of this type. Check with your hosting service if this site is being hosted for you.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 2 weeks later...

it is my opinion that there is a bug somewhere in html_output.php or product_info.php and index.php...but more than anything, i believe it is html_output

the error only occurs when it's searching for page references cpath

when i turn on SEF, all pages work fine except product_info.php which shows unable to determine page link at the bottom where the footer goes.

Link to comment
Share on other sites

Have you made changes to html_output.php? If you have, back up the file and reload the original version. If the problem goes away when you do that, at least you know what file the problem is in.

 

If not, have you made any changes to create_account.php? The problem definitely occurs there; I just created an account to test it out. At least I hope that I created an account; my German is barely adequate. The Create Account page is hitting the redirect and stopping with the error message rather than redirecting to create_account_success.php. Since the redirect (in the original code) is hard-coded, this would either have to be a change to the redirect in create_account.php or a change to tep_redirect or tep_href_link. The original code in create_account.php should look like this:

      tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

Have you added anything (like the Guest Account Contribution) that adds to or replaces this line?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 2 weeks later...

I started getting this error on an intermittent basis after a standard install. I'm new to OSCommerce and can't say whether this will work for other people, but I've found a solution which works for me (so far).

 

The problem is that in PHP 4.3.0 there is a bug which causes $PHP_SELF and $SCRIPT_NAME not to be filled

(See http://bugs.php.net/bug.php?id=21261 for details)

 

I used the quick-and-dirty at bugs.php.net as follows:

 

I put this code right at the end of /catalog/includes/functions/general.php and also /catalog/admin/includes/functions/general.php (all this does is put the php.net fix in a function). Put the code immediately before the final ?>

 

 

 

  function tep_fix_scriptname()
  {
 $_SERVER['SCRIPT_NAME'] = substr($_SERVER['PATH_TRANSLATED'],
                                strlen($_SERVER['DOCUMENT_ROOT']));
if (substr($_SERVER['SCRIPT_NAME'], 0, 2) == '//') {
   $_SERVER['SCRIPT_NAME'] = substr($_SERVER['SCRIPT_NAME'], 1);
}

$PHP_SELF =
$SCRIPT_NAME =
$_SERVER['PHP_SELF'] =
$_SERVER['SCRIPT_NAME'];
$fixed_file_name = $SCRIPT_NAME;
return $fixed_file_name;
}

 

Then I did a global search and replace of the whole app changing all occurrences of

 

basename($PHP_SELF)

 

to

 

basename(tep_fix_scriptname())

 

since most of the errors seemed to occur when the first expression was passed as an argument to tep_href_link (a null value for this argument causes tep_not_null to return false).

 

This seems to have cleaned up the problem, although it is specific to this version of PHP as far as I know. I still need to go through the code and check for other instances of $PHP_SELF (and decide what to do with them).

 

Hope this helps someone,

 

Caroline

Link to comment
Share on other sites

Hi!

 

When a new customer creates an account, he doesn't get the Create_account_success message, but only the error notification:

 

"Unable to determine the page link!"

 

While the account ist nevertheless created correctly, the error message ist confusing.

 

What can be wrong?

 

I' ve already searched the forum for this error message and found many results, but they all seem to rely to different problem.

 

I have register_globals turned ON and search_engine_friendly_urls=false.

 

 

mibu

I have the same problem after I downloaded and installed a contribution here called Guest Account.

 

Please help!!!

 

Or........let me know of a easy Guest Account contribution. I have tried PWA, the Rurchase Without Account but I did not get that to work.

 

Many customers leave the shops because of this registration module. In future OSC there should be an option using a Guest Account THAT WORKS.

 

Messages that appears when people uses guest account:

 

Error!

 

Unable to determine the page link!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...