I think --with--ibm-db2 only works as statically linked with apache, no as module.
And do you have the db2 connect librarys instaled in the system ? I copy here an article that works for my, I dont remenber where I see, maybe in faqs.com: ------------------------------------- Sep 21st, 2000 13:04 Remo Ronchitelli The connection from a Linux Web Server equipped with Apache and PHP 4 to an IBM AS/400 (OS400 and DB2/400) system is possible and works fine. The same connection works with IBM mainframes equipped with OS/390, MVS/ESA, VM/ESA, VSE/ESA and IBM DB2. The only strict requirement is the version of OS400 operating system: it must be V4R2 with native TCP/IP support. The following is the hierarchical list of Software Layers used in the test. ++Linux RedHat 6.1 ------(Korn Shell pdksh rpm package required) ++Apache Web Server 1.3.12 ++PHP 4.0.2 statically linked to Apache ------ with-ibm-db2 option enabled ++IBM DB2Connect Personal Edition for Linux ------ V7.1 free from somewhere in ibm.com The IBM DB2 UDB DB2Connect Personal Edition installation is performed via Korn shell script "db2setup". Use all the features you can select, and installl: DB2 Administration Client DB2 Connect Personal Edition Db2 Application Development Client The DB2 instance created on Linux is: "db2inst1" and password "ibmdb2" (defaulted). After this you can install PHP 4 --with-ibm-db2 option enabled. You get some weak compilation warnings but don't worry (it would be better they missed). For PHP it looks exactly like you had installed IBM DB2 UDB Personal Edition (the whole DB2 engine "without" DB2Connect). On the AS/400 side you have to start "drda" tcp servers at port "446" (defaulted). On the AS/400 side you need also authorized userid and password. Along with IBM DB2Connect you get full HTML documentation (useful and clear). Now return to Linux: login as "db2inst1" password "ibmdb2" and type: "db2" (DB2 command line processor). This is the necessary to inform DB2Connect about the reality of DB2400 DataBase on the AS/400. Thatis: 1. 'catalog tcpip node YOUR_FREE_NODE_NAME remote TCP_IP_ADDRESS_OF_AS400 server 446 remote_instance AS400_SYSTEM_NAME system YOUR_FREE_SYSTEM_NAME ostype OS400' (446 is the default port number of drda server) (ostype must be "OS400") 2. 'catalog dcs database YOUR_DB_NAME as DB2400_REAL_NAME' (DB400_REAL_NAME is the cataloged name of DB2 system in the AS/400 or the RDBNAME of AS/400) 3. 'catalog database YOUR_DB_NAME as PHP_DB_NAME at node YOUR_FREE_NODE_NAME authentication DCS' (if you choose authentication "SERVER" it doesn't work). 4. 'connect to PHP_DB_NAME user AS400_USERID using AS400_PASSWORD' 5. (Caution to escape double quotes!) 'bind \"[EMAIL PROTECTED] BLOCKING ALL SQLERROR CONTINUE MESSAGES DDCS400.MGS GRANT PUBLIC\" ' 6. 'connect reset' 7. 'terminate' (quit from DB2 Command Line Processor). You can now access DB2/400 from a PHP script enabled with: 'putenv ("LD_LIBRARY_PATH=/home/db2inst1/sqqlib/lib:$LD_LIBRARY_PATH"); ' 'putenv ("DB2INSTANCE=db2inst1"); ' 'odbc_connect(PHP_DB_NAME, AS400_USERID, AS400_PASSWORD);' Warning: The Table name referenced in your PHP script must be qualified with the "collection" or "library" name of AS/400 DB2 system. Example: "SELECT * FROM AS400LIB.TABLE" The default would be "SELECT * FROM DB2INST1.TABLE" (surely wrong). Take your fun with AS/400 or Mainframe system! Remo Ronchitelli [EMAIL PROTECTED] -------------------------------------------------------- Josep R. Raurell Quoting Derek Battams <[EMAIL PROTECTED]>: > Currently I have Apache and PHP4 (using the Apache module for PHP4) working > just fine on my server. However, the RPMs I installed for mod_php4 didn't > include IBM DB2 support. So I took the source RPM and modified it by > simply > adding the following line to the spec file: > > --with-ibm-db2 > > I appended this to the CFLAGS parameter in the spec file. I then rebuilt > the RPMs and everything built fine. I then installed them and that was > fine. However, when I try to restart Apache nothing happens. It just > exits > immediately with nothing written to any logs. If I remove the > '--with-ibm-db2' flag from the spec file, rebuild the RPMs, then reinstall > them without DB2 support then Apache restarts fine and operates with no > problems. DB2 is installed, configured, and running on the server. I've > spent numerous hours (on the weekend none the less) trying to figure this > out, but with no luck. Any help would be greatly appreciated. > > Thanks, > > Derek > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php