php code compiles, produces good html output, but crashes when putthrough browser

This is a discussion on php code compiles, produces good html output, but crashes when putthrough browser within the PHP General forums, part of the PHP Programming Forums category; Hi, Need some help with debugging procedures. This is a postgresql/PHP running with PHP 5. I have used both ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-15-2007
Mary Anderson
 
Posts: n/a
Default php code compiles, produces good html output, but crashes when putthrough browser

Hi,
Need some help with debugging procedures.

This is a postgresql/PHP running with PHP 5. I have used both IE7 and
mozilla 5.0 with this file. The postgres part works fine, and the html
that is generated is OK, but the .php file hangs when I run it through
the browser.

I have two tables -- data_series and data_sets with a 1-many relation
between the data_series and data_sets. My page first displays the
data_series in a <select>. Then it pulls the data_sets belonging to
user selected data_series and displays them in a select. There are
links to .php files to process the selected data_set.



My code

http://demog.berkeley.edu/~maryfran/...t_data_set.php

compiles OK when I run php on it from the shell. It produces html
forms which will load into the browser and run as expected. However
when I try to run the .php file in the browser it parses the head,
displays the title, and then hangs. No error messages are displayed,
even though I have called error_reporting(E_ALL) at the very top of the
..php file. I had an echo statement on each line of php code. None were
printed out. I checked permissions on the .php file. Changing them did
not improve the situation.

I need some basic debugging tools that I don't have to figure out what
is going on. Alas, I think this code would hang before it got to the
debugger! Any advice is appreciated. At this point I am clueless.

Mary Anderson
Reply With Quote
  #2 (permalink)  
Old 12-15-2007
Daniel Brown
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

On Dec 15, 2007 4:55 PM, Mary Anderson <maryfran@demog.berkeley.edu> wrote:
>
> My code
>
> http://demog.berkeley.edu/~maryfran/...t_data_set.php
>


Mary,

Can you provide the actual code for the page? None of us can
really help you out too much without seeing more than a blank page.


--
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.
Reply With Quote
  #3 (permalink)  
Old 12-16-2007
Casey
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

Comment out all Javascript.



On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <parasane@gmail.com> wrote:

> On Dec 15, 2007 4:55 PM, Mary Anderson <maryfran@demog.berkeley.edu>
> wrote:
>>
>> My code
>>
>> http://demog.berkeley.edu/~maryfran/...t_data_set.php
>>

>
> Mary,
>
> Can you provide the actual code for the page? None of us can
> really help you out too much without seeing more than a blank page.
>
>
> --
> Daniel P. Brown
> [Phone Numbers Go Here!]
> [They're Hidden From View!]
>
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Reply With Quote
  #4 (permalink)  
Old 12-16-2007
Jochem Maas
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crasheswhen put through browser

Casey wrote:
> Comment out all Javascript.


Casey - exactly how would javascript being causing a webserver to segfault
in this context???

>
> On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <parasane@gmail.com> wrote:
>
>> On Dec 15, 2007 4:55 PM, Mary Anderson <maryfran@demog.berkeley.edu>
>> wrote:
>>>
>>> My code
>>>
>>> http://demog.berkeley.edu/~maryfran/...t_data_set.php
>>>

>>
>> Mary,
>>
>> Can you provide the actual code for the page? None of us can
>> really help you out too much without seeing more than a blank page.
>>
>>
>> --
>> Daniel P. Brown
>> [Phone Numbers Go Here!]
>> [They're Hidden From View!]
>>
>> If at first you don't succeed, stick to what you know best so that you
>> can make enough money to pay someone else to do it for you.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>

>

Reply With Quote
  #5 (permalink)  
Old 12-16-2007
Casey
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

On Dec 15, 2007 11:27 PM, Jochem Maas <jochem@iamjochem.com> wrote:
> Casey wrote:
> > Comment out all Javascript.

>
> Casey - exactly how would javascript being causing a webserver to segfault
> in this context???
>
>
> >
> > On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <parasane@gmail.com> wrote:
> >
> >> On Dec 15, 2007 4:55 PM, Mary Anderson <maryfran@demog.berkeley.edu>
> >> wrote:
> >>>
> >>> My code
> >>>
> >>> http://demog.berkeley.edu/~maryfran/...t_data_set.php
> >>>
> >>
> >> Mary,
> >>
> >> Can you provide the actual code for the page? None of us can
> >> really help you out too much without seeing more than a blank page.
> >>
> >>
> >> --
> >> Daniel P. Brown
> >> [Phone Numbers Go Here!]
> >> [They're Hidden From View!]
> >>
> >> If at first you don't succeed, stick to what you know best so that you
> >> can make enough money to pay someone else to do it for you.
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>

> >

>
>


Maybe I didn't read well enough, but if the PHP produces proper HTML
on the command line, shouldn't it work in the browser too? My logic is
that if the title displays, then the browser hangs, it should be
something on the client-side, right?

Maybe I'm not thinking clearly. I worked all day today..
-Casey
Reply With Quote
  #6 (permalink)  
Old 12-16-2007
Jochem Maas
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crasheswhen put through browser

Casey wrote:
> On Dec 15, 2007 11:27 PM, Jochem Maas <jochem@iamjochem.com> wrote:
>> Casey wrote:
>>> Comment out all Javascript.

>> Casey - exactly how would javascript being causing a webserver to segfault
>> in this context???
>>
>>
>>> On Dec 15, 2007, at 2:00 PM, "Daniel Brown" <parasane@gmail.com> wrote:
>>>
>>>> On Dec 15, 2007 4:55 PM, Mary Anderson <maryfran@demog.berkeley.edu>
>>>> wrote:
>>>>> My code
>>>>>
>>>>> http://demog.berkeley.edu/~maryfran/...t_data_set.php
>>>>>
>>>> Mary,
>>>>
>>>> Can you provide the actual code for the page? None of us can
>>>> really help you out too much without seeing more than a blank page.
>>>>
>>>>
>>>> --
>>>> Daniel P. Brown
>>>> [Phone Numbers Go Here!]
>>>> [They're Hidden From View!]
>>>>
>>>> If at first you don't succeed, stick to what you know best so that you
>>>> can make enough money to pay someone else to do it for you.
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>

>>

>
> Maybe I didn't read well enough, but if the PHP produces proper HTML
> on the command line, shouldn't it work in the browser too? My logic is
> that if the title displays, then the browser hangs, it should be
> something on the client-side, right?


if the client-side (browser) recieves no data then it can't display anything,
besides I'm sure Mary is savvy enough to know that a javascript problem is
something not for this list ... besides which she said that the output of
her script when from the command line can be saved and viewed in a browser without
problem.

>
> Maybe I'm not thinking clearly. I worked all day today..
> -Casey
>

Reply With Quote
  #7 (permalink)  
Old 12-16-2007
Per Jessen
 
Posts: n/a
Default Re: [PHP] php code compiles, produces good html output, but crashes when put through browser

Casey wrote:

> Maybe I didn't read well enough, but if the PHP produces proper HTML
> on the command line, shouldn't it work in the browser too?


Not necessarily. Running stand-alone and in the webserver are two
completely different environments.

> My logic is that if the title displays, then the browser hangs, it
> should be something on the client-side, right?


It _could_ be, but I doubt it. The browser/client might be "hanging"
waiting for the server to finish.


/Per Jessen, Zürich
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:42 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0