PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old December 3rd, 2007, 04:05 AM
adm0610 adm0610 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 1 adm0610 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #2  
Old December 3rd, 2007, 05:20 AM
wiesemann wiesemann is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 146 wiesemann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 39 m 31 sec
Reputation Power: 2
Add the PEAR directory to your include_path and the error will be gone.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > MDB2 do the first query, but show error in the querys before


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway