Mombu the Php Forum

Go Back   Mombu the Php Forum > Php > php code compiles, produces good html output, but crashes when putthrough browser
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 1st November 23:23
maryfran
External User
 
Posts: 1
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 1st November 23:23
parasane
External User
 
Posts: 1
Default php code compiles, produces good html output, but crashes when put through browser



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 1st November 23:23
heavyccasey
External User
 
Posts: 1
Default php code compiles, produces good html output, but crashes when put through browser


Comment out all Javascript.
  Reply With Quote
4 1st November 23:24
jochem
External User
 
Posts: 1
Default php code compiles, produces good html output, but crasheswhen put through browser


Casey - exactly how would javascript being causing a webserver to segfault in this context???
  Reply With Quote
5 1st November 23:24
heavyccasey
External User
 
Posts: 1
Default php code compiles, produces good html output, but crashes when put through browser


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 1st November 23:24
jochem
External User
 
Posts: 1
Default php code compiles, produces good html output, but crasheswhen put through browser


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.
  Reply With Quote
7 1st November 23:24
per
External User
 
Posts: 1
Default php code compiles, produces good html output, but crashes when put through browser


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

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
Display Modes




666