LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 08-10-2006, 07:33 AM   #1
baddah
Member
 
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...

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, 08:03 AM   #2
baddah
Member
 
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.

Thanks
 
  


Reply


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 03:05 AM
Viewing a PHP page, but it asks to save? newlinuxnewbie Linux - General 2 02-02-2006 02:43 PM
my web browser "mozilla fire fox" isn't rendering the page, rather opening the page amolgupta Linux - Software 2 07-26-2005 01:41 AM
Mozilla Browser Says done, Blank page. rstick Linux - Software 10 12-15-2004 08:59 AM
PHP & MySQL, working, and yet getting a blank results page linxtc Programming 5 08-24-2003 05:51 PM


All times are GMT -5. The time now is 09:06 AM.

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