We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1441
    • 61 Posts
    I’m hoping someone might be able to help.

    Using Rev 2.0.4pl on a SQL 5.1.51 / PHP Version 5.2.14 system - and I think it’s related to 5.2.14 (because my ISP just upgraded)

    Fatal error: Class 'PDO' not found in /home/.../public_html/core/model/modx/modx.class.php on line 361


    Any ideas? (I’m currently investigating retrograding php on my server.)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Sounds like their upgrade didn’t include PDO. What does a phpinfo() have to say about it?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1441
        • 61 Posts
        I see PDO_sql is ver. 5.1.51

        Is that the problem?

        (thanks!)
          • 1441
          • 61 Posts
          I’ve been talking with my host about this... and it seems that they’re not sure what they’re doing. (heh)

          So, should the PDO Database version match the PHP version?

          (Thanks!)
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You also need to have the MySQL drivers for PDO enabled

            This should be in the first part (PHP configuration) of the phpinfo() display
            ’--enable-pdo’ ... ’--with-pdo-mysql=/usr’

            And this (at least the mysql part) should be down in the list of available extensions under the PDO entry
            PDO drivers mysql, odbc, pgsql, sqlite, sqlite2
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 1441
              • 61 Posts
              *sigh*

              Now, with the help of my host - I’m getting this error:
              Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /home/zionlcny/public_html/core/model/modx/modx.class.php on line 363


              is this an insufficiency in configuration?

              (BTW: the manager does work.)

              From my phpinfo :
              Configure Command
              './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr/X11R6' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'


                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Yeah, it sounds like they’re fumbling their way through their PHP configuring and compiling. It’s a pain to figure out what options PHP needs because every application has different needs. If you could provide your host with a page that reproduces the error, that might help them test their compilation against it. If you tell them it was working before the upgrade, they’d probably be more motivated to make the new PHP version work.

                Ever think how "host" is a bad word? That makes all of us sound like parasites...
                  • 1441
                  • 61 Posts
                  My host seems confused. Is there some kind of master list of all the needed requirements needed for MODx that I can pass along? (other than what’s found in the wiki?)

                  @Everett: I guess I always thought about ’host’ as the guy that welcomes you in a restaurant. (but now I can’t shake your image.) Ha.
                    • 9207 ☆ A M B ☆
                    • 2,475 Posts
                    Sorry... my images tend to stick to people’s brains.

                    Here’s my config for CentOS 5.5 (final). This changes depending on which OS/hardware you’re compiling to though:

                    './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
                      • 9207 ☆ A M B ☆
                      • 2,475 Posts
                      Quote from: Everett at Dec 04, 2010, 02:23 PM

                      Sorry... my images tend to stick to people’s brains.

                      Here’s my config for PHP 5.3.3 built against Apache 2.2.3 (yum version) on CentOS 5.5 (final). This changes depending on which OS/hardware you’re compiling to though:

                      './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'