Hi all.
First, i have to say that i am completey new to this game so please bare with me if i have done something fundamentaly wrong
I have downloaded the latest apache 1.3.19 and php4.04pl1 and done the following to install and configure:
===
QUICK INSTALL (Static)
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
$ cd apache_1.3.x
$ ./configure
$ cd ..
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
$ make
$ make install
$ cd ../apache_1.3.x
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn't supposed to. It will be created.)
$ make
(you should now have an httpd binary which you can copy to your Apache bin dir if
is is your first install then you need to "make install" as well)
$ cd ../php-4.0.x
$ cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php
======
i.e. the steps from INSTALL file !!
Fatal error: Call to undefined function: odbc_connect() in /xxx/test.php on line 3
where test.php is:
<?
// connect to a DSN "mydb" with a user and password "xxx"
$connect = odbc_connect("mydb", "xxx", "xxx");
// query the users table for name and surname
$query = "SELECT name, surname FROM users";
// perform the query
$result = odbc_exec($connect, $query);
// fetch the data from the database
while(odbc_fetch_row($result)){
$name = odbc_result($result, 1);
$surname = odbc_result($result, 2);
print("$name $surname\n");
}
// close the connection
odbc_close($connect);
?>
so the line 3 is odbc_connect - but i thought this function was in the php dist by default ???
Have i missed something ?
Thanking all of you in advance
jukazu
First, i have to say that i am completey new to this game so please bare with me if i have done something fundamentaly wrong
I have downloaded the latest apache 1.3.19 and php4.04pl1 and done the following to install and configure:
===
QUICK INSTALL (Static)
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
$ cd apache_1.3.x
$ ./configure
$ cd ..
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
$ make
$ make install
$ cd ../apache_1.3.x
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn't supposed to. It will be created.)
$ make
(you should now have an httpd binary which you can copy to your Apache bin dir if
is is your first install then you need to "make install" as well)
$ cd ../php-4.0.x
$ cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php
======
i.e. the steps from INSTALL file !!
Fatal error: Call to undefined function: odbc_connect() in /xxx/test.php on line 3
where test.php is:
<?
// connect to a DSN "mydb" with a user and password "xxx"
$connect = odbc_connect("mydb", "xxx", "xxx");
// query the users table for name and surname
$query = "SELECT name, surname FROM users";
// perform the query
$result = odbc_exec($connect, $query);
// fetch the data from the database
while(odbc_fetch_row($result)){
$name = odbc_result($result, 1);
$surname = odbc_result($result, 2);
print("$name $surname\n");
}
// close the connection
odbc_close($connect);
?>
so the line 3 is odbc_connect - but i thought this function was in the php dist by default ???
Have i missed something ?
Thanking all of you in advance
jukazu