[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
help diagnosing php / mysql web access problems
I'm trying to move from my current linux setup to openbsd 3.2 I've set
up a testing machine with a new install of openBSD 3.2, and network
access, etc seems ok. I need to run a content management environment
called pmachine, which is a set of php scripts for database reads /
writes. When I couldn't run the setup script (a php script which sets
some things up) I created a basic test page (below).
I've installed php4, and the extensions, then mysql module, and the xml
module:
php4-core-4.2.3
php4-extensions-4.2.3
php4-mysql-4.2.3
php4-domxml-4.2.3
php4-pear-4.2.3
I've installed mysql:
mysql-server-3.23.49
I can access mysql from the ssh command line, and can create and insert
material into a database, no problem. I can do this as root (in mysql)
or as the user I've set up for this purpose.
I can display php pages which don't involve database access.
But if I try to view a database via a php page I don't get any
results--e.g., with the following in a web page--
<?php
$hostname = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "test";
$db = mysql_pconnect("$hostname", "$dbusername", "$dbpassword");
mysql_select_db("$dbname",$db);
$result = mysql_query("select body from test_table",$db);
$row = mysql_fetch_array($result);
echo $row['body'];
?>
--this page doesn't return any output or errors.
Any suggestions--I admit, I don't really even know the question I need
to ask here. Any directions would be appreciated. I know, I
know--rtfm, but at the moment not sure what to read.
This setup (for pmachine, that is) works fine on the linux machine.
The pmachine developer doesn't have any record of specific problems
with openbsd.
thanks,
rob