Hi guys,

Im getting frustrated with Redhat linux.......I find it very hard to use...but it seems better than windows..I dont know..grrrrrrrrrrrrrrr..

Anyways I need help please...Im trying to setup a webserver using linux

I just installed Redhat linux 7.2 and the mysql rpm file. I was able to create a database table and all the colums to test MySql so I know its working. Im positive that Apache is running as well because I can see the test page when I type my IP address on my browser. I heard PHP is pre-installed so I tested server if my php is working by creating phpinfo.php file. Its working as well, But I cant see the mysql configuration. My following some tutorials. I created a test file if i can connect to mysql.

The code is shown below;

<html>
<body>
<?php
$user="root";
$password="my password";
$database="bedrock";
mysql_connect(192.168.254.11,$user,$password);
@mysql_select_db($employee)or die("Unable to select database");

$result = mysql_query("SELECT * FROM employee",$db);

printf("Name: %s<br>\n, mysql_result($result,0,"first"));

?>
</body>
</html>

HOw can I make sure that PHP is confitgured to work with mysql

PHP version is 4.1.2

Thanks😕

    So what happens exactly? Do you get an error?

    On your PHPINFO page is there information about MySQL functions?

    I would assume that the php already installed on your box would include support for MySQL, however, it is possible that it doesn.t

    But, if it did not include MySQL support you would get an error about a call to an undefined function.

    -- Jason

      You will also need a webserver (such as Apache ) installed on your machine, if you don't have one already.

        Assuming that apache,mysql and php has been installed, try using the phpinfo() function to see if php has been configured with mysql support. it should have a line like --mysql=/usr/share .
        try this site:
        http://www.mysql.com/articles/ddws/

          Thanks for the reply everyone.

          I will try your suggestions.

          by the way - yes Apache is installed and I can see the test page and PHP is working because I can see the the phpinfo.php site with all the configurations except for mysql.

          Thanks🙂

            Write a Reply...