and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi All,
I am newbie here and also new to PHP and MySQL. I have wrote a PHP script to open the db connection and read through one of the table's record. My script works in command line. I can see the result, but when i am calling it from browser, it just apear blank page.
I am using Apache2, php5 and mysql 5, installaed on SuSe linux 10.0 .
here is my script:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
It looks normal to me. You've run that on command line so you've seen all the HTTP junk. What does it look like in the source code when viewed in a web browser. Also turn error reporting on.
it doesn't read my database record when it called from browser. Might it be due to pear installation?
I ON the error reporting, but no changes for result. It is same as before.
PHP on the command line doesn't parse the ini file by default. You may need to specify the location of php.ini using the -l option if I remember correctly. Try: `php --help' if not