LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP & MySQL, working, and yet getting a blank results page (https://www.linuxquestions.org/questions/programming-9/php-and-mysql-working-and-yet-getting-a-blank-results-page-83942/)

linxtc 08-20-2003 04:24 PM

PHP & MySQL, working, and yet getting a blank results page
 
MySQL works:

On my Linux PC, (Redhat 9) - I have MySQL working fine, and can connect to my databases and work with them fine using MySQL in the terminal and even the MySQL Control Center GUI(!)

PHP works:
I have verified that Apache and PHP are working also.
Connecting to localhost/hello.php
works nicely (renders "Hello World !" in my web-browser just fine).

My problem is: I have a simple search page setup, as I'm learning out of the O'Reilly "PHP and MySQL Web Development" book (see p. 225).

If I fail to enter a search term - I get the appropriate error message. But that's just HTML/Apache, not getting to the MySQL interaction.

If I enter a search term, for an item that IS in the MySQL database (confirmed via CLI and MySQL CC),

the "searchresults.php" returns a web-page with correct URL and Title on the web-page, but the rest of the page is blank.

I have the exact same setup working correctly on my OS X Mac - I can submit a query and get a web-page that returns/displays the result.

I initially did have some permissions errors with the files in Linux, but fixed the ownership and read/write/execute flags on the files in question.

I have placed the files on my Linux system, in:
/var/www/html

All thoughts/ideas/input welcome. TIA !

nephilim 08-23-2003 04:00 PM

Could you post the code of the page that you use to connect to the db?

Robert0380 08-24-2003 04:07 AM

make sure u strip out any password information that u dont want anybody to know.

sk8guitar 08-24-2003 09:42 AM

i have found that when a php page comes up 100% blank thats because you have a syntax error in it. in command prompt do "php <php page with the probelms>" and it will tell you where the error is.

linxtc 08-24-2003 12:46 PM

Ok - thank you all for your replies ! The answer is really very OT,
but you deserve to know what the resolution will be:

It seemed to me the big difference was, that my OS X box is running Apache 1.3.x, and the Linux box had Apache 2.x

Well, it comes down to that in a nutshell.

I am increasingly unimpressed with RH 9. First, I found it doesn't install MySQL by default (unless you do a custom install), but PostGreSQL. That's fine, but how many people - really, are going to use PostGreSQL over MySQL.

I installed MySQL from source and had it working fine.

Then, it turns out that the mod auth_mysql for Apache 2 was NOT installed. Huh ?

Well, no matter, in trying to fix this in an easy way things just got worse.

Because of dependancies and no easy way to work around them,
I'm just going to wipe and re-install.

There might be an easier way, but I'm already spending way too much time problem-solving and not working on PHP and MySQL !

/semi-rant.

Thank-you !

sk8guitar 08-24-2003 04:51 PM

install mandrake.


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