I just moved a domain to a new host and the existing code is having some problems on the new server, probably due to newer versions of MySQL and php. I know minimal php, only what I learned trying to do css.
This function is causing a warning message in the error log:
Error Log:Code:function dbi_fetch_row ( $res ) { if ( strcmp ( $GLOBALS["db_type"], "mysql" ) == 0 ) { return mysql_fetch_array ( $res ); } else if ( strcmp ( $GLOBALS["db_type"], "oracle" ) == 0 ) { if ( OCIFetchInto ( $GLOBALS["oracle_statement"], &$row, OCI_NUM + OCI_RETURN_NULLS ) ) return $row; return 0; } else if ( strcmp ( $GLOBALS["db_type"], "postgresql" ) == 0 ) { if ( $GLOBALS["postgresql_numrows"] > $GLOBALS["postgresql_row"] ) { $r = pg_fetch_array ( $res, $GLOBALS["postgresql_row"] ); $GLOBALS["postgresql_row"]++; if ( ! $r ) { echo "Unable to fetch row\n"; return ''; } } else { $r = ''; } return $r; } else if ( strcmp ( $GLOBALS["db_type"], "odbc" ) == 0 ) { if ( ! odbc_fetch_into ( $res, $ret ) ) return false; return $ret; } else { dbi_fatal_error ( "dbi_fetch_row(): db_type not defined." ); } }
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /hermes/web03/server/htdocs/php/php-dbi.php on line 151.
I would rather update the code than change the php.ini. I just don't know how. Can someone please push me in the right direction?
Thanks, erin![]()



Reply With Quote


Bookmarks