Page 1 of 1

Header/Session Issue after upgrade... Very difficult questio

Posted: Thu Jun 29, 2006 9:41 pm
by suicide
So my host upgraded my PHP to PHP Version 4.3.10

Now in the auction script i have, the "place bid" stop working... I just get a blank page when I click the "place bid" form button

The variables are sent in the address like:

placebid.php?LotID=90&LotTitle=1969%20Chevrolet%20Corvette&CurrBid=0


I have been reading all day and it may be something with the headers or session maybe?

If someone could take a quick look and maybe tell me what i need to enable/disable in PHP.INI to get my script working again I will happily buy you a beer!


Code: Select all

<?

?>
I tried moving the header statement to the top of the code but it still comes up blank.

Thank you for all your time! ANY help is appreciated!


Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Jun 30, 2006 1:43 am
by technofreak
Check what all changes have been made in PHP <your-current-version> to your <previous-version> and check whether you have used any similar codes and functions. If you have, then please quite those codes and ask for help, if you cannot solve it on your own :)

Posted: Fri Jun 30, 2006 7:59 am
by suicide
Not sure what the old version was... never thought to right it down and the host appearently didnt either

I did do some reading before my post on the subject and I saw that header handling and sessions were both effected, hence the title of the post :)

Im thinking its teh headers that is causing the output to be blank... Im hoping someone knows a quick fix if it is

Posted: Fri Jun 30, 2006 8:09 am
by thomas777neo
Hi

The best thing to do is it turn on the error reporting using the ini_set function. Then see if there are any obvious errors. You might have some functions that interact differently due to the version change.

Also, view the source of the page, make sure that nothing is echoed before the creation of sessions and sending of headers.

I had a small issue where there was a space on the first line of my code before the <?php tag, for example.

Posted: Fri Jun 30, 2006 8:14 am
by suicide
Nothing is in the page source when viewed....

I added ini_set(display_errors,1) ... (hoping thats what you meant... http://us3.php.net/ini_set seems hard to read to me with very little in examples :)


to the top of my page and it still didnt display anything (nothing in source too)

Thanks

Posted: Fri Jun 30, 2006 8:48 am
by thomas777neo
try this one

Code: Select all

<?php
ini_set("error_reporting","E_ALL & ~E_NOTICE");

ini_set("display_errors","On");
?>
If it does not work, debug your code one piece at a time. Until you find the culprit.

Posted: Fri Jun 30, 2006 9:00 am
by suicide
./sigh that doesnt work either...

thanks for trying man, i was all excited that it would give me a clue :)

not sure how to debug as it all looks valid (like i said it worked perfect till last upgrade).. guess ill start commenting out line by line or somethin...

If anyone else has any good ideas, I'm listening! :)

Posted: Fri Jun 30, 2006 1:04 pm
by suicide
Well i dont thin its the session as I can get a UID through them...

So that leaves headers? ANyone know what i can do about this?

maybe change something in php.ini?

Posted: Fri Jun 30, 2006 2:57 pm
by RobertGonzalez
A blank page after changing display_errors to 'On' means you have a Fatal Error in your script. This will more than likely be because the upgrade did not install some extensions or the extensions you were using before are no longer installed. So I would guess that your code was using a call to a function that existed in a previously installed extension and now that extension is not installed so the script is returning a FATAL ERROR notice of a call to an undefined function. Just a guess.

Posted: Fri Jun 30, 2006 3:19 pm
by suicide
i may be misreading what you said

but the page was blank before I added the ini_set display_errors

it became blank after the host upgraded php

Posted: Fri Jun 30, 2006 3:23 pm
by Benjamin

Code: Select all

$mail_tpl->load_file("css/notify.css", "Style");

        $mail_tpl->set_var("UserName", $db->f("user_login")); // <-- 195 missing )
        $mail_tpl->set_var("SiteName", SITE_NAME);
I fixed line 195, try it now.

Posted: Fri Jun 30, 2006 3:39 pm
by RobertGonzalez
suicide wrote:i may be misreading what you said

but the page was blank before I added the ini_set display_errors

it became blank after the host upgraded php
Regardless of when the blank page took place, if you change display_errors to On and it is still blank, then your script has a FATAL ERROR. Check astions post and see if that fixes it.

Posted: Fri Jun 30, 2006 4:01 pm
by suicide
astions! YOU FLIPPIN RULE!

Where am I sending these beers!?


Thank you all for your help, I appreciate it!!!

Posted: Sat Jul 01, 2006 9:03 am
by thomas777neo
lol, it always comes down to something simple.

didnt even think of double checking the code, cause you mentioned that it worked before.

Anyways, glad its fixed. cheers

Posted: Sat Jul 01, 2006 7:34 pm
by suicide
ya that is throwing me through a loop too.. but im not comp,aining cause it seems to work!


Thank again guys!