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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

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

Post 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]
Last edited by suicide on Fri Jun 30, 2006 5:20 pm, edited 2 times in total.
User avatar
technofreak
Forum Commoner
Posts: 74
Joined: Thu Jun 01, 2006 12:30 am
Location: Chennai, India
Contact:

Post 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 :)
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post 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
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post 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.
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post 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
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post 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.
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post 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! :)
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post 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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post 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
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post 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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post by suicide »

astions! YOU FLIPPIN RULE!

Where am I sending these beers!?


Thank you all for your help, I appreciate it!!!
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Post 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
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post by suicide »

ya that is throwing me through a loop too.. but im not comp,aining cause it seems to work!


Thank again guys!
Post Reply