I transfered all my work to my Linux lappy today, where i have prepared mysql php and apache, everything went well with importing the tables and such....but something is wrong with using mysql with PHP.....my pages doesn't show.
When i make a document with only
<?php
echo 'hello';
?>
it works....but if i then add a connection to mysql
<?php
include('config.php');
$connect = @mysql_connect("$host","$user","$pass")
or die('Could not connect to DB');
echo 'hello';
?>
It doesn't work, it doesn't even show the die message, and not the "hello" message either.
I have checked username and pass and i can connect to the DB using my sql client.
Does anyone have a clue of what i am doing wrong?
Or should i provide more info?
[solved][PHP/MYSQL/Apache] My sites works on Windows
[solved][PHP/MYSQL/Apache] My sites works on Windows
Last edited by ayu on 30 Sep 2007, 09:16, edited 1 time in total.
"The best place to hide a tree, is in a forest"
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 18
- Location: In your eye floaters.
- Contact:
what says phpinfo about mysql?
also check the mysql logs in /var/log
Code: Select all
<?php
phpinfo();
?>
also check the mysql logs in /var/log