Click to See Complete Forum and Search --> : php and mysql on Redhat - Page cannot be displayed
emmahodd2
07-16-2003, 12:04 PM
I have PHP and MySQL on Redhat. I have installed a RPM to connect the too.
PHP works fine. The problem is when i use a PHP page to access a mySQL database. The webpage just comes up 'The Page cannot be Displayed' even though the page is there!
Puzzling me this one.
Emma
FOLLOWUP :-
MySQL is running as I can create, edit tables etc. through the MySQL admin interface.
stolzyboy
07-16-2003, 12:07 PM
is mysql running, is php configured to use mysql, here are a few links with help for installing the two
http://www.e-gineer.com/instructions/install-mysql3xx-on-linux.phtml
http://www.e-gineer.com/instructions/starting-and-stopping-mysql-automatically-on-redhat.phtml
http://www.opendeveloper.org/PHP/HowTo/How_To_Install_PHP_on_Linux/
sameerni
07-17-2003, 12:41 AM
make sure you can run simple .php or .html pages.
.php pages without any sql connection i.e. simple echo commands.
emmahodd2
07-17-2003, 12:23 PM
PHP works fine by itself - ie. echo commands.
As soon as I add any references to mysql it comes up with this problem.
tsinka
07-17-2003, 03:37 PM
Please post some code so we can check if something is wrong ...
emmahodd2
07-18-2003, 07:32 AM
The problem is code independant.
if i put in test.php
echo "hello";
the page will run.
If i put
echo "hello";
$db = mysql_connect("localhost", "root");
I get the error 'Cannot find Server', can be seen here
- http://www.grgprint.com/test.php
It isn't even running the code.
Emma
tsinka
07-18-2003, 08:29 AM
Do you get a "document contains no data" error message if you try to request that page with e.g. Netscape or Mozilla ? If that is the case check the error log if there are any "segmentation fault" error messages in it. Might be some problem with the mysql support that causes apache to core dump.
emmahodd2
07-18-2003, 10:07 AM
One quick browse and Apache is seg faulting.
Must be mySQL causing it
but why, and how do I fix it are the two golden questions.
How does mySQL have to be configured with Apache?
stolzyboy
07-18-2003, 10:33 AM
maybe you should try from square one and look at the install links i provided to get php/mysql running, do the mysql first, then do the php one
tsinka
07-18-2003, 03:43 PM
Hi,
which versions of php, apache, MySQL and glibc are installed. Which package did you install to "connect the too" ?
emmahodd2
07-20-2003, 03:09 PM
the prob seemed to be the versions. upgraded to newest version of apache and it worked. I was using latest editions of mysql and php and they obviously didn't like old apache!!
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.