
December 3rd, 2007, 04:05 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 1
Time spent in forums: 36 m 20 sec
Reputation Power: 0
|
|
|
MDB2 do the first query, but show error in the querys before
MDB2 work's fine in my web host, but now he do a first query, after this, in the after querys, he show error messages, and the querys are ok (I test in phpMyAdmin). I using MySQLi driver, but I tried in MySQL driver and the error messages persist.
I don't know if this error it's caused by the MySQL update in my web host (before are 4.0, now it's update to version 4.1.22-Max-log). My web host said he don't change any configuration in Apache, MySQL or PHP (and the PEAR).
I try to install the MDB2 2.50a1, but it show the same error.
Test script:
PHP Code:
<?
require_once("lib/MDB2.php");
$conexao = "mysqli://user:pass@host/db";
$options = array (
'debug' => 2,
'portability' => MDB2_PORTABILITY_NONE,
);
$conexao = MDB2::factory($conexao, $options);
#Debug?
#echo "<pre>"; var_dump($conexao); echo "</pre>";
if(PEAR::isError($conexao)) {
echo "Erro<br /><br />Estamos com uma instabilidade no nosso sistema. Por favor, tente novamente dentro de instantes.";
exit();
}
$resultado_listar_secoes = $conexao->prepare("SELECT DfIdSecao, DfNomeSecao FROM tbSecao ORDER BY DfNomeSecao ASC", MDB2_PREPARE_RESULT) or die("Ocorreu um erro");
$resultado_listar_secoes = $resultado_listar_secoes->execute() or die("Ocorreu um erro");
echo "<select size=\"1\" name=\"DfIdSecao\">";
while($linha = $resultado_listar_secoes->fetchRow(MDB2_FETCHMODE_ASSOC)) {
$DfIdSecao = $linha["DfIdSecao"];
$DfNomeSecao = $linha["DfNomeSecao"];
echo "<option value=\"$DfIdSecao\">$DfNomeSecao</option>";
}
echo "</select>";
$resultado_listar_secoes->free();
echo "<hr />";
$resultado_membro = $conexao->prepare("SELECT DfLogin FROM tbMembro WHERE DfIdMembro=1", MDB2_PREPARE_RESULT) or die("Ocorreu um erro");
$resultado_membro = $resultado_membro->execute() or die("Ocorreu um erro");
while($linha = $resultado_membro->fetchRow(MDB2_FETCHMODE_ASSOC)) {
$DfLogin = $linha["DfLogin"];
echo "$DfLogin";
}
$resultado_membro->free();
echo "<hr />";
$conexao->disconnect();
?>
Expected result:
Code:
<select size="1" name="DfIdSecao">
<option value="53">ActionScript</option>
<option value="2">PHP</option>
</select>
<hr />
ADM0610
Actual result:
Code:
<select size="1" name="DfIdSecao">
<option value="53">ActionScript</option>
<option value="2">PHP</option>
</select>
<hr />
Warning: is_readable() [function.is-readable]: open_basedir restriction
in effect. File(/usr/lib/php//MDB2/Driver/Datatype/mysqli.php) is not
within the allowed path(s):
(/home/htmlstaff/:/usr/share/pear/:/var/lib/php/:/tmp/) in
/home/htmlstaff/www/xkurt/mdb2/lib/MDB2.php on line 958
Warning: MDB2::include_once(MDB2/Datatype.php)
[function.MDB2-include-once]: failed to open stream: No such file or
directory in /home/htmlstaff/www/xkurt/mdb2/lib/MDB2.php on line 330
Warning: MDB2::include_once() [function.include]: Failed opening
'MDB2/Datatype.php' for inclusion
(include_path='.:/usr/share/pear/:/usr/lib/php/') in
/home/htmlstaff/www/xkurt/mdb2/lib/MDB2.php on line 330
Warning: is_readable() [function.is-readable]: open_basedir restriction
in effect. File(/usr/lib/php//MDB2/Datatype.php) is not within the
allowed path(s): (/home/htmlstaff/:/usr/share/pear/:/var/lib/php/:/tmp/)
in /home/htmlstaff/www/xkurt/mdb2/lib/MDB2.php on line 958
Catchable fatal error: Object of class MDB2_Error could not be
converted to string in
/home/htmlstaff/www/xkurt/mdb2/lib/MDB2/Driver/mysqli.php on line 972
Last edited by adm0610 : December 3rd, 2007 at 04:08 AM.
|