helmut2509 Posted February 26, 2014 Share Posted February 26, 2014 I just transferred my pw app to the live server (shared hosting), modified the config.php and created the database. On calling the site in the browser, I got this message: Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in ......wire/core/WireDatabasePDO.php on line 65 PDO is enabled. So what's wrong here? --- I fixed that bug (at least temporarily) by replacing the constant by '1002'. But then I got the next error: Fatal error: Exception: could not find driver (in ....../wire/core/ProcessWire.php line 143)#0 .../wire/core/ProcessWire.php(51): ProcessWire->load(Object(Config))#1 ..../index.php(185): ProcessWire->__construct(Object(Config))#2 {main} in ...../index.php on line 216 PHP version is 5.2.17, PW is 2.4.0 maybe PW requires PHP 5.3.? Link to comment Share on other sites More sharing options...
kongondo Posted February 27, 2014 Share Posted February 27, 2014 .....maybe PW requires PHP 5.3.? http://processwire.com/about/news/introducing-processwire-2.4/ https://github.com/ryancramerdesign/ProcessWire#upgrades ProcessWire 2.4 has two new software requirements: PHP 5.3.8+ (older versions supported PHP 5.2) PDO database driver (older versions only used mysqli) Link to comment Share on other sites More sharing options...
adrian Posted February 27, 2014 Share Posted February 27, 2014 It really does sound like PDO isn't running on your server. Have you double checked your phpinfo output or done a php -i from the command line and confirmed that you see something like: PDO PDO support => enabled PDO drivers => sqlite, mysql pdo_mysql PDO Driver for MySQL => enabled Link to comment Share on other sites More sharing options...
helmut2509 Posted February 27, 2014 Author Share Posted February 27, 2014 http://processwire.com/about/news/introducing-processwire-2.4/ https://github.com/ryancramerdesign/ProcessWire#upgrades There is only PW 2.4 available for download. If my ISP does not upgrade PHP, then I need an older PW version... . It really does sound like PDO isn't running on your server. Have you double checked your phpinfo output or done a php -i from the command line and confirmed that you see something like: PDO PDO support => enabled PDO drivers => sqlite, mysql pdo_mysql PDO Driver for MySQL => enabled according to phpinfo(), PDO is enabled. The problem is PHP 5.2, PW requires 5.3.8 Link to comment Share on other sites More sharing options...
adrian Posted February 27, 2014 Share Posted February 27, 2014 (edited) 2.4 should probably still run on 5.2.17, just not officially supported. http://processwire.com/talk/topic/5543-processwire-24-possible-to-run-on-php-533/?p=54099 Maybe try contacting renobird (from that post) about his setup with 5.2.17. Also, this from Ryan: You'll want to test ahead of time, but I think it'll still work. There are some bugs and security issues in PHP 5.3 versions prior to 5.3.8, which are good reasons for nobody to use those versions. That's the main reason I set 5.3.8 as the minimum. But the reality is that it should still work fine in any 5.3. Chances are it would still work fine in 5.2 as well, but I want to take that monkey off our back so we can move forward. PS You can always get an older release of PW here: https://github.com/ryancramerdesign/ProcessWire/releases Edited February 27, 2014 by adrian 2 Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted November 25, 2019 Share Posted November 25, 2019 I just ran into this issue which occurred as a result of some server upgrades not going smoothly. The fix in our case was to run: apt-get install php-mysql If you end up getting this error, it wouldn't hurt to try installing PW from scratch in a separate directory. PW's installer identifies where potential issues are, such as missing packages, which is very helpful. Sometimes it is not so apparent from php.ini, phpinfo() or error logs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now