SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 38

Thread: Errorno: 256

  1. #1
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Errorno: 256

    Hi,

    I have this error, ERRNO: 256
    TEXT: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

    Please help me what is the cause of this error.

    I have installed:

    Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8

    MySQL client version: 5.0.51a

    PHP extension: mysql


    Thanks,

  2. #2
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you show us the PHP that's causing this error?

  3. #3
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am following the book of Cristian Darie's Beginning PHP and MySQL E-Commerce second edition and in his errata it says

    PDO error on Windows: ERRNO: 256 TEXT: SQLSTATE[HY000]: General error: 2014 ...
    The PDO driver on Windows may throw the following error when you try to execute a stored procedure:

    ERRNO: 256 TEXT: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll().

    For development/testing purposes, the workaround is to use an unofficial version of the PDO driver. One version that I have found to work is (in a website called nolimitclubbing, sorry i cannot post a link) /lib_php/php_pdo_mysql.dll. You can download this file, copy it in c:\xampp\php\ext\ and restart the Apache server.


    But I cannot access that link anymore to download the php_pdo_mysql.dll

    Do you have any idea where I can get that file?


    Thanks for replying.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would try php.net to get the latest dll.

    The php error message tells you two ways to not get the error. You tried them and they don't work?

  5. #5
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi there,

    i used the save link as to get the dll.

    however when i put the dll in. i get the following error in my apache log.

    PHP Warning: PHP Startup: Unable to load dynamic library php_pdo_mysql.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0

    on the screen i get a

    ERRNO: 256
    TEXT: could not find driver
    LOCATION: business\ database_handler php, line 35, at February 12, 2009, 12:59 pm
    Showing backtrace:

    Please advise.

  6. #6
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Assuming your other dll's are in the "ext" dir, is that where you put "php_pdo_mysql.dll"?

    The reason I ask is that I have extension=php_pdo_mysql.dll uncommented in php.ini and the dll is in "ext". I am not getting any errors. I installed php directly from the php.net dounload section and it worked out of the box.

    I have gotten similar error messages so it sounds like you do have it correct.

    I was never able to fix my errors but that was with php_ssh2.dll, I just gave up.

    Your problem should be fixable though.
    What I lack in acuracy I make up for in misteaks

  7. #7
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    thanks for replying.

    yes i placed in ext folder of PHP and restarted the apache.

    No luck.

    i used another book from cristian darie on same topic using csharp dot net and i was highly impressed.

    so i wanted to pick up php for building ecommerce site. hence i went back to cristian.

    i am quite bummed out that this has happened and so early in the book with apparently no way out after much googling.

  8. #8
    SitePoint Wizard lorenw's Avatar
    Join Date
    Feb 2005
    Location
    was rainy Oregon now sunny Florida
    Posts
    1,098
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Try reinstalling php, php_pdo_mysql.dll should be part of the default package.

    Did you get your php package from php.net?
    What I lack in acuracy I make up for in misteaks

  9. #9
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No good.

    Once i do that i get back the same error about the unbuffered query

  10. #10
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    what i did on this error "error 256 could not find a driver" is I installed zend core, and the error disappeared.

    Try this on a testdotphp(i cant post a link) and test if what will it print, if there is no mysql, then there is really no pdo_mysql driver installed.

    <?php
    foreach(PDO::getAvailableDrivers() as $driver)
    {
    echo $driver.'<br />';
    }
    ?>


    I dont know, i installed zend core. then it disappeared.

    Could also someone tell me if what i did is right?

    Thanks

  11. #11
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi dgsmith

    I have this error also, "ERRNO: 256
    TEXT: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll()."

    Have you reached at any solution yet?

    thanks, vas gerakis.

  12. #12
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Vasilis Ger View Post
    Hi dgsmith

    I have this error also, "ERRNO: 256
    TEXT: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll()."

    Have you reached at any solution yet?

    thanks, vas gerakis.
    Hi,

    Yes, I have solved this one. Go to a website named cristiandarie and then the usual dot and then ro then slash then errata then slash then phpecommerce2 dot html. Sorry I am not allowed to write a website name.

  13. #13
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dqsmith View Post
    Hi,

    Yes, I have solved this one. Go to a website named cristiandarie and then the usual dot and then ro then slash then errata then slash then phpecommerce2 dot html. Sorry I am not allowed to write a website name.
    hi im following the same book and get this error mesage?

    how do you resolve this? i went to the website you stated and downloaded the dll file and replaced it.

    it still does not work.

    im using xamp on windows vista.

    how do you resolve this?

  14. #14
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I have attached a php_pdo_mysql.dll. you can try this one put it in xampp\php\ext.
    Attached Files Attached Files

  15. #15
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do i download it? im new to the forum.

    oh i see it says...

    Attachments Pending Approval

    will have to wait till its approved then.

    hope this works.

  16. #16
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dqsmith View Post
    Hi, I have attached a php_pdo_mysql.dll. you can try this one put it in xampp\php\ext.

    hi ive tried this dll file, but i still get the error message:


    ERRNO: 256
    TEXT: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
    LOCATION: C:\tshirtshop\business\database_handler.php, line 93, at July 28, 2010, 8:37 pm
    Showing backtrace:
    trigger_error("SQLSTATE[HY000]: General error: 2014 Cannot execute queries whil...", "256") # line 93, file: C:\tshirtshop\business\database_handler.php
    DatabaseHandler.GetAll("CALL catalog_get_departments_list()") # line 13, file: C:\tshirtshop\business\catalog.php
    Catalog.GetDepartments() # line 21, file: C:\tshirtshop\presentation\departments_list.php
    DepartmentsList.init() # line 16, file: C:\tshirtshop\presentation\smarty_plugins\function.load_presentation_object.php
    smarty_function_load_presentation_object(Array[2], Object: Application) # line 5, file: C:\tshirtshop\presentation\templates_c\%%A5^A5A^A5A1C73D%%departments_list.tpl.php
    include("C:\tshirtshop\presentation\templates_c\%%A5^A5A^A5A1C73D%%depart...") # line 1871, file: C:\tshirtshop\libs\smarty\Smarty.class.php
    Smarty._smarty_include(Array[2]) # line 44, file: C:\tshirtshop\presentation\templates_c\%%41^412^412F4E3D%%store_front.tpl.php
    include("C:\tshirtshop\presentation\templates_c\%%41^412^412F4E3D%%store_...") # line 1258, file: C:\tshirtshop\libs\smarty\Smarty.class.php
    Smarty.fetch("store_front.tpl", null, null, true) # line 1108, file: C:\tshirtshop\libs\smarty\Smarty.class.php
    Smarty.display("store_front.tpl") # line 29, file: C:\tshirtshop\index.php



    can you tell me what OS you are using?

  17. #17
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using windows XP.

  18. #18
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dqsmith View Post
    I am using windows XP.
    this was the exact message you got right?

    im using vista, it may have something to do with vista then?

  19. #19
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes I had the exact error message before. I have used it also in vista, it went fine also after this dll file. Have you uncommented some php_pdo dlls in php.ini?

  20. #20
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no im not sure, i dont think i have, how do i do this? thanks

  21. #21
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is in xampp\php\php.ini. Just remove the ";" in ;extension=php_pdo.dll

  22. #22
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    extension=php_mcrypt.dll
    ;extension=php_mssql.dll
    ;extension=php_mysql_mysqlnd.dll
    extension=php_mysql_libmysql.dll
    ;extension=php_mysqli_mysqlnd.dll
    extension=php_mysqli_libmysql.dll
    ;extension=php_oci8.dll
    extension=php_pdo.dll
    ;extension=php_pdo_dblib.dll
    ;extension=php_pdo_firebird_firebird.dll
    ;extension=php_pdo_firebird_interbase.dll
    ;extension=php_pdo_mssql.dll
    ;extension=php_pdo_mysql_mysqlnd.dll
    extension=php_pdo_mysql_libmysql.dll
    extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    extension=php_pdo_sqlite.dll
    ;extension=php_pdo_sqlite_external.dll
    ;extension=php_pgsql.dll

    this is part of my php.ini file, the ";" was already removed.

    is there any other line i need to remove the ";" on?

  23. #23
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks the same with my php.ini here. I really dont know why you still have that error. I just replaced the dll file, it went fine immediately.

  24. #24
    SitePoint Member
    Join Date
    Feb 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can I ask what chapter in the book when you got this error?

  25. #25
    SitePoint Member
    Join Date
    Jul 2010
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    chapter 5 page 150.

    would you take the website and check if it works on your server? just to make sure its nothing to do with the code?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •