Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
Ok I have a server with Apache2, PHP 5, and SQL 5.
I cannot get it to connect to the SQL server via PHP, and phpinfo() isnt showing SQL.
I have taken out the ; extension=mysql.so, in the php.ini. i have also verified that the extension dir is correct. and restarted the server. Any other ideas??
Fedora Core 6, mysql, yes SQL is working i have already made a database. as far as compiled or installed as packages i dont know cause i didnt install them
Alright, cool. Can you post the PHP script you're using to attempt to connect? I haven't had FC6 installed on a system for a while, but my F10 box doesn't have an extension entry in the php.ini for mysql. Also, you may want to try looking into your error log for apache
Ok i was looking at the wrong log, i have some errors, the mysql fatal error but that hasnt been showing anymore it is just a blank white screen now
Well, yeah....all your php script is doing is connecting to the database. You're not doing anything else, so what would you expect to see, other than a white screen???
Put some output in there...run a query or two, and print the results. Check the connection and echo back "Yes I connected!", and you'll see something.
Well, yeah....all your php script is doing is connecting to the database. You're not doing anything else, so what would you expect to see, other than a white screen???
Put some output in there...run a query or two, and print the results. Check the connection and echo back "Yes I connected!", and you'll see something.
i used this code i found online (i dont know anything about php or sql)
<?php
$link = mysql_connect('localhost', 'usr', 'pass');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
i used this code i found online (i dont know anything about php or sql)
<?php
$link = mysql_connect('localhost', 'usr', 'pass');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
and still white screen
Ok...have you check the Apache and/or PHP logs? Are you getting any errors???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.