This is a discussion on session_start problems with FireFox on Mac within the PHP General forums, part of the PHP Programming Forums category; Sorry if this is the wrong place to ask this question... if so please help me figure out where to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Sorry if this is the wrong place to ask this question... if so please
help me figure out where to ask it. I've asked on FireFox forums and was told it was a PHP problem and to ask the developers of PHP. I have a PHP website that freezes in Firefox on a Mac. Every other browser/operating system combination I have tested is fine. I've narrowed down the problem to having to do with "session_start", which is the session tracking mechanism for php. When I comment out session_start, the site works (but of course my site now becomes state-less). Again, the problem is ONLY on FireFox on a Mac. It works fine on FireFox on a PC. Any ideas as to what could be causing the problem with FireFox on Mac and not on PC? (Safari on Mac works fine) Thanks, Terry |
|
|||
|
On Jan 11, 10:34*am, phpde...@dedicatedmanagers.com (Terry Calie)
wrote: > Sorry if this is the wrong place to ask this question... if so please > help me figure out where to ask it. *I've asked on FireFox forums and > was told it was a PHP problem and to ask the developers of PHP. > > I have a PHP website that freezes in Firefox on a Mac. *Every other > browser/operating system combination I have tested is fine. *I've > narrowed down the problem to having to do with "session_start", which is > the session tracking mechanism for php. > > When I comment out session_start, the site works (but of course my site > now becomes state-less). *Again, the problem is ONLY on FireFox on a > Mac. *It works fine on FireFox on a PC. > > Any ideas as to what could be causing the problem with FireFox on Mac > and not on PC? *(Safari on Mac works fine) > > Thanks, > Terry Could you post an example of what you are trying to accomplish please. I've worked in FireFox and I've never had a problem with session_start not working. Ill do the best i can, Kendal Knabe |
|
|||
|
With a problem like that, code and a web page are very helpful to
track it down. I'm willing to take a look at what I can with my Mac & firefox, and see what I can sort out :) I just need more info.. On Jan 11, 2008, at 11:34 AM, Terry Calie wrote: > Sorry if this is the wrong place to ask this question... if so > please help me figure out where to ask it. I've asked on FireFox > forums and was told it was a PHP problem and to ask the developers > of PHP. > > I have a PHP website that freezes in Firefox on a Mac. Every other > browser/operating system combination I have tested is fine. I've > narrowed down the problem to having to do with "session_start", > which is the session tracking mechanism for php. > > When I comment out session_start, the site works (but of course my > site now becomes state-less). Again, the problem is ONLY on FireFox > on a Mac. It works fine on FireFox on a PC. > > Any ideas as to what could be causing the problem with FireFox on > Mac and not on PC? (Safari on Mac works fine) > > Thanks, > Terry > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com japruim@raoset.com |
|
|||
|
On Jan 11, 2008 11:53 AM, Jason Pruim <japruim@raoset.com> wrote:
> With a problem like that, code and a web page are very helpful to > track it down. I'm willing to take a look at what I can with my Mac & > firefox, and see what I can sort out :) > > I just need more info.. > > > > On Jan 11, 2008, at 11:34 AM, Terry Calie wrote: > > > Sorry if this is the wrong place to ask this question... if so > > please help me figure out where to ask it. I've asked on FireFox > > forums and was told it was a PHP problem and to ask the developers > > of PHP. > > > > I have a PHP website that freezes in Firefox on a Mac. Every other > > browser/operating system combination I have tested is fine. I've > > narrowed down the problem to having to do with "session_start", > > which is the session tracking mechanism for php. > > > > When I comment out session_start, the site works (but of course my > > site now becomes state-less). Again, the problem is ONLY on FireFox > > on a Mac. It works fine on FireFox on a PC. > > > > Any ideas as to what could be causing the problem with FireFox on > > Mac and not on PC? (Safari on Mac works fine) Terry, I had seen your posts before (I'm a Mozilla developer as well), but I didn't see mention of a version. What Mac FF version are you using, and what plugins do you have installed? Try disabling all plugins, restarting Firefox, and seeing if it will work for you then. -- </Dan> Daniel P. Brown Senior Unix Geek and #1 Rated "Year's Coolest Guy" By Self Since Nineteen-Seventy-[mumble]. |
|
|||
|
Install Live HTTP Headers and see what headers are being sent.
Then search for those headers and FireFox Mac issues online. On Fri, January 11, 2008 10:34 am, Terry Calie wrote: > Sorry if this is the wrong place to ask this question... if so please > help me figure out where to ask it. I've asked on FireFox forums and > was told it was a PHP problem and to ask the developers of PHP. > > I have a PHP website that freezes in Firefox on a Mac. Every other > browser/operating system combination I have tested is fine. I've > narrowed down the problem to having to do with "session_start", which > is > the session tracking mechanism for php. > > When I comment out session_start, the site works (but of course my > site > now becomes state-less). Again, the problem is ONLY on FireFox on a > Mac. It works fine on FireFox on a PC. > > Any ideas as to what could be causing the problem with FireFox on Mac > and not on PC? (Safari on Mac works fine) > > Thanks, > Terry > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? |
|
|||
|
Hey... thanks for the replies. I installed the headers feature that
Richard suggested and found that no headers were output. I started to transfer my php to another site to see if the problem replicated and I wasn't able to recreate the problem. It turns out that I "require" a file before the session_start that had one stupid character of whitespace at the end of it. When I transferred the php to recreate the problem, I replaced the "require" call with the actual code - eliminating the whitespace at the end of the file, so the problem didn't replicate. It took me a long time to figure out that was the problem. What a killer! To illustrate my php goes like this: index.php ========= <?php code code require "index2.php" code ?> index2.php ======== <?php code code code ?> <whitespace character> The <whitespace character> is actually just an extra newline "\n" at the end of the file. So that gets output to the browser before the headers and apparently doesn't lock up any browsers except FireFox on a Mac. Thanks for the help. Just your courtesy in responses got me thinking in a new direction. Terry Richard Lynch wrote: > Install Live HTTP Headers and see what headers are being sent. > > Then search for those headers and FireFox Mac issues online. > > On Fri, January 11, 2008 10:34 am, Terry Calie wrote: > >> Sorry if this is the wrong place to ask this question... if so please >> help me figure out where to ask it. I've asked on FireFox forums and >> was told it was a PHP problem and to ask the developers of PHP. >> >> I have a PHP website that freezes in Firefox on a Mac. Every other >> browser/operating system combination I have tested is fine. I've >> narrowed down the problem to having to do with "session_start", which >> is >> the session tracking mechanism for php. >> >> When I comment out session_start, the site works (but of course my >> site >> now becomes state-less). Again, the problem is ONLY on FireFox on a >> Mac. It works fine on FireFox on a PC. >> >> Any ideas as to what could be causing the problem with FireFox on Mac >> and not on PC? (Safari on Mac works fine) >> >> Thanks, >> Terry >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > > > |
|
|||
|
Terry Calie wrote:
> Hey... thanks for the replies. I installed the headers feature that > Richard suggested and found that no headers were output. > I started to transfer my php to another site to see if the problem > replicated and I wasn't able to recreate the problem. > It turns out that I "require" a file before the session_start that had > one stupid character of whitespace at the end of it. When I transferred > the php to recreate the problem, I replaced the "require" call with the > actual code - eliminating the whitespace at the end of the file, so the > problem didn't replicate. It took me a long time to figure out that was > the problem. What a killer! > You may use ob_clean() just before the header() to get rid of the extra whitespaces. -- Regards, Anup Shukla |
|
|||
|
Terry Calie schreef:
.... > > To illustrate my php goes like this: > > index.php > ========= > <?php > code > code > require "index2.php" > code > ?> > > index2.php > ======== > <?php > code > code > code > ?> > <whitespace character> .... to avoid this in future never add the closing php bracket to the end of the php file (unless you explicitly want to output something after the code in question - which is almost never the case), it is not required. e.g. --------- >8 info.php ---------------- <?php phpinfo(); --------- >8 info.php ---------------- |
|
|||
|
Jochem Maas wrote:
>> ?> >> <whitespace character> > ... > to avoid this in future never add the closing php bracket to the end of > the php file (unless you explicitly want to output something after the > code in question - which is almost never the case), it is not required. > > e.g. > --------- >8 info.php ---------------- > <?php > > phpinfo(); > --------- >8 info.php ---------------- I didn't know that. Does the underlying engine in PHP provide the otherwise missing tag? Does the described problem only happen with FF on Mac or does it affect other browsers on other OSes? Ulex |
|
|||
|
Europus schreef:
> Jochem Maas wrote: > >>> ?> >>> <whitespace character> >> ... >> to avoid this in future never add the closing php bracket to the end of >> the php file (unless you explicitly want to output something after the >> code in question - which is almost never the case), it is not required. >> >> e.g. >> --------- >8 info.php ---------------- >> <?php >> >> phpinfo(); >> --------- >8 info.php ---------------- > > I didn't know that. Does the underlying engine in PHP provide the > otherwise missing tag? the tag is not missing as such - the tag denotes the end of string that php parses - it's quite logical to assume that the end of a file means the same thing (especially when you consider that any file you include/require must specify '<?php' to 'awaken' the php parser) > Does the described problem only happen with > FF on Mac or does it affect other browsers on other OSes? I have never seen this problem effect just one browser on on platform - afaic it's a general problem that effects all browsers - you can't send out HTTP headers after HTTP content ... now it maybe that some browsers these days see fit to ignore white space before the headers (or maybe just ignore a "\n") but I doubt it ... honestly I can't see how php would even send the headers after the "\n" had been output ... either you error logging level is too low, your not reading the error log or you have error suppression on the header() function (.e.g @header()). all of these would give you the incorrect notion that the header function was working, all of these are bad practice. you also mentioned you changed the code when trying to test it on another machine - don't do that, test one thing at a time. anyway problem solved, preventative knowledge aquired, onto the next hurdle :-) > > Ulex > |
![]() |
| Thread Tools | |
| Display Modes | |
|
|