We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Well I’m clueless, I’ve never received a single one of these errors in my tests here or with Kyle. Any one have a hint on the bindValue() error? That makes no sense. How did this work flawlessly when installing on mt’s GS but not on your local MAMP? Gonna be a long day...
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: OpenGeek at Dec 21, 2006, 08:42 AM

      Well I’m clueless, I’ve never received a single one of these errors in my tests here or with Kyle. Any one have a hint on the bindValue() error? That makes no sense. How did this work flawlessly when installing on mt’s GS but not on your local MAMP? Gonna be a long day...
      Also, please try it without changing the error reporting level; and also, error_reporting is now completely controlled by $modx->setDebug(E_ALL & ~E_NOTICE). Once you start spitting out errors on the front-end, the header problem will show up. Change to setDebug(true) and you’ll get the maximum number of log messages output to the front-end, which may be very helpful in finding the actual errors here.
        • 6726
        • 7,075 Posts
        Quote from: OpenGeek at Dec 21, 2006, 08:54 AM
        Also, please try it without changing the error reporting level; and also, error_reporting is now completely controlled by $modx->setDebug(E_ALL & ~E_NOTICE). Once you start spitting out errors on the front-end, the header problem will show up. Change to setDebug(true) and you’ll get the maximum number of log messages output to the front-end, which may be very helpful in finding the actual errors here.

        OK Jason I’ll do that !

          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 6726
          • 7,075 Posts
          Per Jason’s request, here is a html output of the phpinfo() for MAMP 1.3.1

          I’ll upgrade to last version (1.4.1) and check if it changes anything...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 22303 MODX Staff
            • 10,725 Posts
            Working with David, I just realized that many configurations have PDO enabled but do NOT have the mysql PDO driver enabled, as I warned in the original post announcing this internal alpha. You should be able to easily modify this in your PHP configuration either by enabling extension=php_pdo_mysql.so (or php_pdo_mysql.dll on Windows).
              • 6726
              • 7,075 Posts
              Dumb me !

              I had wondered this at some point but did not check it... off to changing my settings grin

              Edit :

              Strange... just checked MAMP’s php.ini and the extension=php_pdo_mysql.so line is NOT commented, thus it SHOULD be working...

              Edit 2 :

              OK guys, it seems MAMP’s php.ini misses an essential line to have PDO up and running, and I finally managed to get mysql PDO driver loaded (according to the phpinfo, see below).



              I read the PHP doc and it states :

              You will also need to enable any database specific drivers there too; make sure that they are listed after the pdo.so line, as PDO must be initialized before the database-specific extensions can be loaded. If you built PDO and the database-specific extensions statically, you can skip this step.

              extension=pdo.so

              But extension=pdo.so is NOT there in MAMP’s php.ini thus having extension=php_pdo_mysql.so is not sufficient to have the mysql driver working, because PDO is NOT initialized...

              See http://fr.php.net/manual/en/ref.pdo.php#pdo.drivers

              Edit 3 :

              I tried a new install of 0.9.7 alpha with the updated php.ini, and normally PDO MySQL drivers ARE loaded alright but it still doesn’t work... huh

              Any idea ?

                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 6726
                • 7,075 Posts
                Sorry to hold up the topic but guess what ?
                I think the problem of all people running MAMP is not only php.ini but the MySQL version !

                Read this :

                PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases.

                PDO_MYSQL will take advantage of native prepared statement support present in MySQL 4.1 and higher. If you’re using an older version of the mysql client libraries, PDO will emulate them for you.

                See http://fr.php.net/manual/en/ref.pdo-mysql.php

                It would seem (though I find this ODD to say the least) that there is no official PDO drivers for MySQL 5.x !!!
                This would be BAD news for me as my dedicated box hosting all my clients runs MySQL 5.0.22 undecided Though it would explain why it does not work neither on my box nor on MAMP...

                I just can’t believe that PDO has no driver for MySQL5 huh
                It must be my limited knowledge / understanding and I must be wrong (which I’d be glad to !)

                Edit :

                Seems I was wrong smiley

                Someone posted on php mailing list that PDO works with MySQL5 provided you compile it right :
                http://www.mail-archive.com/[email protected]/msg00958.html

                I quote :

                You just need to compile pdo_mysql against your mysql5 client
                libraries, it works fine for me.

                ./configure --with-pdo-mysql=/path/to/mysql5/install/

                (...)

                PDO works fine with MySQL 5. I’ve been using PHP5.1/PDO with MySQL 5 for quite some time, and recently PHP5.2/PDO with MySQL 5. I’m using it for an AJAX app for work, and a high-performance web log system for personal use. I haven’t had any problems so far.

                A superficial look at the docs only says 3/4, but from experimental evidence, 5 seems fine.
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 31037
                  • 358 Posts
                  Don’t know if you’re interested in my results as my knowledge of MODx is poor, but here are my results:

                  Xampp, PHP 5.1.4, MySql 5.0.21

                  New install = No problems at all!
                  Upgrade: Everything seems ok, but when trying to log in to manager it just returns to manager login page
                  Front end seems ok but swedish characters does not work

                  -----------------------

                  Servage (Host), apache, PHP 5.2.0, MySQL 5.0.15
                  PDO drivers sqlite2, sqlite, mysql

                  Clean install =
                  Install seems to work fine, but browsing to manager just gives:
                  "(FATAL) Could not load context: mgr"
                  And front end gives
                  "(FATAL) Could not load context: web" + displays an array

                  Should I post these kind of things, or should I leave it to the more experienced? (I’m not the least offended if you tell me to leave it to the pros).
                    • 22303 MODX Staff
                    • 10,725 Posts
                    @Uncle68 -- by all means, report everything you can. It’s been in "more experienced" hands too long. Time to discover all these issues and start working through them so I can get this out to the public sooner than later.

                    @davidm -- yeah, I’m not at all happy with some of these compilation requirements (my server admin has some choice words for the PHP developers in this regard) and after this fiasco, I’m looking for a way to fall back on my PDO emulation classes in cases where PDO is configured, but the PDO mysql driver is not compiled or configured properly for any reason.
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: Uncle68 at Dec 21, 2006, 12:46 PM

                      Upgrade: Everything seems ok, but when trying to log in to manager it just returns to manager login page
                      Front end seems ok but swedish characters does not work
                      Can you go into a little more detail regarding "swedish characters does not work"? I’m assuming you ran the upgrade install process, and even more so than with previous upgrades, did you make sure and clear your cookies and browser cache? There are a lot of small changes in the background, and this could definitely be the source.

                      Quote from: Uncle68 at Dec 21, 2006, 12:46 PM

                      Servage (Host), apache, PHP 5.2.0, MySQL 5.0.15
                      PDO drivers sqlite2, sqlite, mysql

                      Clean install =
                      Install seems to work fine, but browsing to manager just gives:
                      "(FATAL) Could not load context: mgr"
                      And front end gives
                      "(FATAL) Could not load context: web" + displays an array

                      Should I post these kind of things, or should I leave it to the more experienced? (I’m not the least offended if you tell me to leave it to the pros).
                      Hmm, I’m wondering what happened with this one. Let me double-check the upgrade process and make sure I’m handling contexts properly there.