I have Apache 1.3.26,PHP 4.2.3, MySQL 3.23.56 installed in a SuSE Linux 8.0 box. I tested Apache, PHP and MySQL separately and run OK. But when I type a PHP scrypt that requires a MySQL connection it doesn't appears anything in the web browser. For example, I typed the following PHP script:
$dbuser="root";
$dbhost="localhost";
$dbpass="pass";
$dbname="test2";
$dbtble="books";
$mysql_link=mysql_connect($dbhost,$dbuser,$dbpass);
$column=mysql_list_fields($dbname,$dbtble,$mysql_link);
for($i=0;$i<=mysql_num_fields($column);$i++)
{
print mysql_field_name($column,$i)."<br>";
}
After typing it doesn't appears anything in the screen, when in reality must appear all the field names of the table books. I tested this script in my computer and it's OK, but when I tested the same script in the computer of my University it doesn't works. The computer of my University is connected in a network. Is the problem due to the network? I'm always root.
Thanks in advance.
$dbuser="root";
$dbhost="localhost";
$dbpass="pass";
$dbname="test2";
$dbtble="books";
$mysql_link=mysql_connect($dbhost,$dbuser,$dbpass);
$column=mysql_list_fields($dbname,$dbtble,$mysql_link);
for($i=0;$i<=mysql_num_fields($column);$i++)
{
print mysql_field_name($column,$i)."<br>";
}
After typing it doesn't appears anything in the screen, when in reality must appear all the field names of the table books. I tested this script in my computer and it's OK, but when I tested the same script in the computer of my University it doesn't works. The computer of my University is connected in a network. Is the problem due to the network? I'm always root.
Thanks in advance.