LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   blank page in browser when viewing PHP (https://www.linuxquestions.org/questions/programming-9/blank-page-in-browser-when-viewing-php-472609/)

baddah 08-10-2006 06:33 AM

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

baddah 08-10-2006 07:03 AM

ja,sorry i got it working.A yum update httpd fixed it.

Thanks


All times are GMT -5. The time now is 07:54 PM.