Latest News: (loading..)

Archived

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

trembita

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

12 posts in this topic

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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??

Share this post


Link to post
Share on other sites
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!!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

 

;)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites