Jump to content



Photo
- - - - -

Unable to determine the page link!Function used: tep_href_link('', '', 'NONSSL')


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1   trembita

trembita
  • Members
  • 83 posts

Posted 13 August 2008 - 14:36

After moving to another hoster I got a message in my Admin panel:

Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL')

what`s wrong?

Edited by trembita, 13 August 2008 - 14:37.


#2   zatrafftar

zatrafftar
  • Members
  • 6 posts

Posted 15 August 2008 - 10:16

same problem for me

#3   spooks

spooks
  • Members
  • 7,017 posts

Posted 15 August 2008 - 10:49

could be missing $PHP_SELF set in application_top, or failure to call application_top
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#4   ulefos10

ulefos10
  • Members
  • 20 posts

Posted 15 August 2008 - 10:51

same problem for me


Hi
Before following any of what is below please BACK UP as i am not a webmaster and have very little knowlege of what im doing, this is only instructions from my web hosting company

I had the same problem, i did get a message through from my web server saying they were making changes. They said to do the following changes to mysite

Please make sure you have the following lines in an .htaccess file in your root directory

php_flag register_globals on
php_flag register_long_arrays on

Also check line 31 of admin/includes/classes/upload.php and change
$this = null;
to:
//$this = null;


I did the first part and it worked couldnt find line 31 so i didnt do this part

Like i said i have little knowlege but i hope this helps

#5   spooks

spooks
  • Members
  • 7,017 posts

Posted 15 August 2008 - 11:03

setting register_globals on is a security risk & is generally only needed with old versions of osC, don't do it unless you really have to.
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#6 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,518 posts

Posted 15 August 2008 - 11:13

After moving to another hoster I got a message in my Admin panel:

Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL')

what`s wrong?

Be sure the Search Engine Friendly option in admin->Configuration->My Store is turned off.

Jack

#7   ulefos10

ulefos10
  • Members
  • 20 posts

Posted 15 August 2008 - 12:06

setting register_globals on is a security risk & is generally only needed with old versions of osC, don't do it unless you really have to.



now I,m really confused, what would the risk be for my security??

#8   spooks

spooks
  • Members
  • 7,017 posts

Posted 15 August 2008 - 12:36

now I,m really confused, what would the risk be for my security??



I thought it was common knowledge? Did you not wonder why most host have it off by default?

Some of the issues are:

user is able to set variable within url ie set $paid=true
user is able to call includes pages with url

there is more, just search.

If you thing this is fine, keep it on!!
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#9   zatrafftar

zatrafftar
  • Members
  • 6 posts

Posted 15 August 2008 - 15:54

found the solution for my problem:
added these lines to .htaccess in cofigure.php

php_flag register_globals on
php_flag display_errors on
php_flag register_long_arrays on

works like a charm for me.

#10   satish

satish
  • Members
  • 5,350 posts

Posted 15 August 2008 - 16:09

Solution:
$request_type value is getting lost when we are in the function function tep_href_link in html_output.php.

So the way out is in that function write
// set the type of request (secure or not)
$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

This will take care.

Satish
Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

Check My About US For who am I and what My company does.

#11   spooks

spooks
  • Members
  • 7,017 posts

Posted 16 August 2008 - 10:26

As it happens I have just had this occur on one of my sites!!

The specific error is that $PHP_SELF becomes a null value as due to the altered search engine friendly url causing $HTTP_SERVER_VARS['PHP_SELF'] to give the same result as getenv('PATH_INFO') and the search engine friendly urls function removes getenv('PATH_INFO') from $PHP_SELF so $PHP_SELF = NULL hence error.

Turning off search engine friendly url obviously will cure this, if you wish to leave it on this should fix (no guarantee!!)

in application_top.php

find (94)

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);

add after:

if (($PHP_SELF == '') || (strlen(trim($PHP_SELF)) == 0)) $PHP_SELF = rtrim(str_replace(array( getenv('PATH_INFO'),getenv('QUERY_STRING')) , '', $_SERVER['REQUEST_URI']), '?');

Of course there may some other bug in this that will no doubt turn up!

/wink.gif' class='bbc_emoticon' alt=';)' />
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#12   lubo

lubo
  • Members
  • 3 posts

Posted 18 November 2008 - 20:40

After moving to another hoster I got a message in my Admin panel:

Unable to determine the page link! Function used: tep_href_link('', '', 'NONSSL')

what`s wrong?



For me worked this:

make sure that all your $HTTP_SERVER_VARS is changed to $_SERVER (use some text editor which supports find-replace function)
also my advice is to search whole OSC directory for $HTTP_GET_VARS and replace with $_GET and also the same with $HTTP_POST_VARS replacement with $_POST. This seems to be not compatible with PHP 4 and less..

Lubomir Herko