Source: http://www.iiug.org/ library/ids/technical/ sg247218.pdf
$link = ifx_connect("sysmaster@ on1000UC3soc","informix"," 123456");
if ( !$link ) {
printf("");
printf("Connect: Returncode %s -- %s \n",ifx_error(), ifx_errormsg());
printf("");
exit();
}
$tab_list = ifx_prepare ("SELECT tabname FROM systables",$link);
$return=ifx_do($tab_list); Chapter 5. PHP applications with Informix database servers 221
if ( $return == 0 ) {
printf("");
printf("Select: Returncode %s -- %s \n",ifx_error(), ifx_errormsg());
printf("");
exit();
}
ifx_htmltbl_result($tab_list," border=\"2\"");
ifx_free_result($tab_list);
@ifx_close($link);
?>
------------------------------ -----
Example 5-24 Missing INFORMIXSERVER in the Apache environment
/usr/local/bin/php ifxconnect.php
Warning: ifx_connect(): E [SQLSTATE=IX 000 SQLCODE=-25560] in
/usr/local/apache2/htdocs/ifx/ connect/ifxconnect.php on line 3
Connect: Returncode E [SQLSTATE=IX 000 SQLCODE=-25560] -- Environment
variable INFORMIXSERVER must be set.
------------------------------ -----
Example 5-23 Missing INFORMIXDIR in the Apache environment
/usr/local/bin/php ifxconnect.php
Warning: ifx_connect(): E [SQLSTATE=IX 001 SQLCODE=-1829] in
/usr/local/apache2/htdocs/ ifxconnect.php on line 3
------------------------------ -----
Example 5-21 Database server name in connection string is wrong
/usr/local/bin/php pdoconnect.php
Error!: SQLSTATE=HY000, SQLDriverConnect: -25555 [Informix]
[Informix ODBC Driver][Informix]Server on1000UC3soc1 is not listed as a
dbserver name in sqlhosts.
For more information:
Featured Blog Topics:
- MySQL SQL_CACHE - http://kathyravan.blogspot.com/2008/12/mysql-sqlcache.html
- MySQL Query Caching - http://kathyravan.blogspot.com/2008/12/mysql-query-cache.html
- MySQL Show - http://kathyravan.blogspot.com/2008/12/mysql-show-statements.html
- CSV - MySQL Storage Engine - http://kathyravan.blogspot.com/2008/12/csv-mysql-storage-engine.html
- Blackhole - MySQL Storage Engine - http://kathyravan.blogspot.com/2008/12/blackhole-mysql-storage-engine.html
- Memory - MySQL Storage Engine (Formerly Heap Storage Engine) - http://kathyravan.blogspot.com/2008/12/memory-mysql-storage-engine-formerly.html
- Xml in MySQL - http://kathyravan.blogspot.com/2008/03/xml-in-mysql.html
- Forgot mySQL root Password? - http://kathyravan.blogspot.com/2008/02/forgot-mysql-root-password.html
- Samba - Installation & Configuration - http://kathyravan.blogspot.com/2008/02/samba-installation-configuration.html
- Enabling HTTP Authentication in Apache - http://kathyravan.blogspot.com/2008/08/enabling-http-authentication-in-apache.html
- PHP Function: isFTPFileExists (Searching a FILE in FTP) - http://kathyravan.blogspot.com/2008/12/php-function-isftpfileexists-searching.html
- Shell Scripting & Linux - http://kathyravan.blogspot.com/search/label/Shell%20Scripts
0 comments:
Post a Comment