Hi all!
Plz be patient with a absolute Beginner 😃. In the following environment:
AIX 5.1
IBM HTTP-Server (Apache-based) 1.3.12.1
PHP Version 4.3.1-dev
IBM DB2 Ver. 7.2 FixPack 7
I try my first steps in programming php-scripts and accessing the DB2.
The first program (which is not self-programmed, of course) is:
<?php
$conn=odbc_connect("mytestdb","userid","password");
echo "conn: $conn";
if ($conn <= 0) {
echo "Error in connection";
exit;
} else { echo "
connection succesful!";
}; ?>
Only output I get are some mysthical SQL-errors and "Error in connection.
So here is my question: Why this connection does not work?
Second: The WebServer is running under UID nobody. Does nobody need any DB2-Environment or do i have to export any Environment before this script can work?
Thx in advance
mad