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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-20-2003, 05:24 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Distribution: Redhat 9
Posts: 7
Rep:
|
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 !
|
|
|
08-23-2003, 05:00 PM
|
#2
|
Member
Registered: Aug 2003
Location: Belgium
Distribution: Debian (server), Kubuntu (desktop)
Posts: 248
Rep:
|
Could you post the code of the page that you use to connect to the db?
|
|
|
08-24-2003, 05:07 AM
|
#3
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
make sure u strip out any password information that u dont want anybody to know.
|
|
|
08-24-2003, 10:42 AM
|
#4
|
Member
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415
Rep:
|
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.
|
|
|
08-24-2003, 01:46 PM
|
#5
|
LQ Newbie
Registered: Aug 2003
Distribution: Redhat 9
Posts: 7
Original Poster
Rep:
|
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 !
Last edited by linxtc; 08-24-2003 at 01:47 PM.
|
|
|
08-24-2003, 05:51 PM
|
#6
|
Member
Registered: Jul 2003
Location: DC
Distribution: mandrake 9.1
Posts: 415
Rep:
|
install mandrake.
|
|
|
All times are GMT -5. The time now is 05:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|