Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

4.3.1 causing Unable to determine the page link


Guest

Recommended Posts

receiving the following error msg:

 

Error!

Unable to determine the page link!

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/public_html/xxxxxxx/includes/classes/email.php on line 71

 

Warning: Variable passed to each() is not an array or object in /home/public_html/xxxxxxx/includes/classes/email.php on line 72

 

Fatal error: Call to a member function on a non-object in /home/public_html/xxxxxxx/functions/general.php on line 970

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

php 4.3.1

 

works fine on my local test server using php 4.1.2

 

I have searched and read every thread on the 'Unable to determine the page link' problem occuring in other modules, but cannot find any info regarding the above error

 

anyone?????

Link to comment
Share on other sites

What where you trying to do when you got the error? I have been running PHP 4.3.1 all week on my development server and haven't had any problems.

Link to comment
Share on other sites

i had just finished adding some contributions, tested them locally (4.1.2) and then uploaded them to my 'test' folder on my server (4.3.1) and thats when the error showed up

 

contributions include Ians Gift Voucher/Credit Class (added the fix for that), Discount Coupons, Newsdesk, Affiliate Program, Attributes Mgr... nothing that touched email.php..

 

very strange

 

and again, it all works perfectly under 4.1.2 but doesnt like 4.3.1 (but then, who does :? )

Link to comment
Share on other sites

search for the

function reset

 

maybe then we will find your problem sooner, i haven't seen any problems with 4.3.1RC2 after 1,5 week

Maybe i'm lucky, but i'm still testing to find errors in osC with this php version etc...

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

the section of code its complaining about is:

 

$this->headers[] = 'MIME-Version: 1.0';

 

reset($headers);

while (list(,$value) = each($headers)) {

if (tep_not_null($value)) {

$this->headers[] = $value;

}

}

}

 

 

reset is defined as:

 

function reset() {

$this->_trail = array();

}

Link to comment
Share on other sites

On the line where it says:

 

reset($headers);

 

Change it to:

 

reset($this->headers);

 

And see if that fixes the problem.

Link to comment
Share on other sites

change those two variables has changed the error to:

 

Error!

Unable to determine the page link!

Fatal error: Call to a member function on a non-object in /home/public_html/xxxxxx/includes/functions/general.php on line 970

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

 

969 // Build the text version

970 $text = strip_tags($email_text);

971 if (EMAIL_USE_HTML == 'true') {

972 $message->add_html($email_text, $text);

973 } else {

974 $message->add_text($text);

975 }

Link to comment
Share on other sites

What where you doing when you got the error? And what does your phpinfo look like. There are a lot of places where general.php is called and the error can be outside that file. ;)

Link to comment
Share on other sites

Hi, I'm using PHP 4.3.1 too & getting an error message when I try to checkout.

Error!



Unable to determine the page link!



Query was empty - Query was empty



Query was empty



[TEP STOP]





Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

This is when it tries to access checkout_confirmation.php. What do I need to change to get this to work?

 

Thanks for your help.

Link to comment
Share on other sites

I was getting the same error after upgrading to PHP 4.3.1. After banging my head against the wall for a while I found this thread:

 

http://www.zenwarehouse.com/xoops2/modules..._id=327&forum=2

 

At least for me, it turns out it's related to user tracking code that had been added. I commented out the code and things are working spiffy now. However, I'd love to be able to continue tracking.

 

:bomb: Here's the questionable code (in application_top.php):

 

// user_tracking modications

if (!$referer_url) {

$referer_url = $_SERVER['HTTP_REFERER'];

tep_session_register('referer_url');

}

 

What do I need to change to get that working again? With the code in place the site bombs once then works upon refresh. Thanks in advance!

Adam

--------------------------------

got monkey? We do.

http://www.monkeygoods.com

Link to comment
Share on other sites

people continue to point to Ians thread which is a solution for the Credit Class/GC contribution and has nothing to do with the other problems being reported in this thread....

Link to comment
Share on other sites

  • 2 weeks later...

Yes i have to agree, ive ben going around in circles and keep gettign sent back to Ians GV thread.

 

I am having these issues on a plain version of osCommerce and the fault is occuring on default.php

Link to comment
Share on other sites

When I turned off the GV order total module, I noticed that I got a little further in the checkout_confirmation stuff...

 

but I've isolated my problem to this code:

 

  $any_out_of_stock = false;

 if (STOCK_CHECK == 'true') {

   for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

     if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {

       $any_out_of_stock = true;

     }

   }

 

Specifically, it appears to have a problem with the tep_check_stock function call...

 

Here is the error message I am getting now:

 

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

 

 

this is really a huge problem, because it is keeping me from having any checkouts. I'm going to look through the web CVS to see if anything has changed with the general.php (where tep_check_stock resides) or checkout_confirmation.php

 

Link to comment
Share on other sites

did you all try to debug it ?

 

There is somewhere a contribution for that

Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Link to comment
Share on other sites

I can absolutely say for a fact that the problem lies in the tep_check_stock function call (or one of the functions that are nested in that function. And it appears to be unique for the version of PHP on my production server, because it works perfectly fine on my development computer.

 

The temporary workaround is to turn off the "check stock on checkout" option in the configuration options. This will at least let me get through the sale for now.

 

In my debugging, I was first getting hung on the Gift Voucher problem, and I did Ian's fix and that whole problem went away. But then I noticed I was still getting hung up in the code and was able to identify this function. If anyone

 

I wonder if anyone else is having this problem... I'm also using php 4.3.0 and mysql 3.23.54. I'll try to debug this during after hours. Since it is only happening on my production server it is a little difficult for me to make a bunch of debug iterations during the day....

Link to comment
Share on other sites

the section of code its complaining about is (code)

 

Check that it is an array *before* using 'reset'

 

$this->headers[] = 'MIME-Version: 1.0';



if (is_array ($headers)) {

reset($headers); 

while (list(,$value) = each($headers)) { 

$this->headers[] = $value; 

} 

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...