Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-10-2006, 06:33 AM   #1
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 183

Rep: Reputation: 30
blank page in browser when viewing PHP

Hi,I've got the following weird error,

I'm doing a simple mysql_connect and then i want to view it through a browser,but somewhere something is wrong.Say i have a file test.php with the following code...

$db = mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("pbx2") or die(mysql_error());

$sql = "select * from users";
$res = mysql_query($sql) or die(mysql_error());

echo "$sql";

while ($row=mysql_fetch_object($res)) {
        echo "$row->src <br>";
if i type in console php test.php it give me the output,(the sql statement and all the users),but if i go to firefox,or any other browser,it just gives a bloody blank page.I have traced it to the point where i do mysql_connect statement.If i echo before that,it prints,but not afterwards..

What can cause this?Thanks for any help
Old 08-10-2006, 07:03 AM   #2
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 183

Original Poster
Rep: Reputation: 30
ja,sorry i got it working.A yum update httpd fixed it.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cups problem - viewing admin page in IE esdeedee Linux - Networking 0 08-08-2006 02:05 AM
Viewing a PHP page, but it asks to save? newlinuxnewbie Linux - General 2 02-02-2006 01:43 PM
my web browser "mozilla fire fox" isn't rendering the page, rather opening the page amolgupta Linux - Software 2 07-26-2005 12:41 AM
Mozilla Browser Says done, Blank page. rstick Linux - Software 10 12-15-2004 07:59 AM
PHP & MySQL, working, and yet getting a blank results page linxtc Programming 5 08-24-2003 04:51 PM

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration