Hi,
I am having trouble installing WordPress on my Raspberry Pi. I have been following this guide but I am getting the “Invalid or missing PDO Driver” error during installation.
I can see from phpinfo that PDO drivers are enabled for sqlite.
This is my wp-config-sample.php:
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress'); // The name of the databasedefine('DB_USER', 'root'); // Your MySQL username
define('DB_TYPE', 'sqlite'); //exactly
define('DB_NAME', 'sqlite:db.fil'); //!!! put it or another one
define('DB_HOST', 'localhost'); //
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
define('SECRET_KEY', 'Dear Diary, what a day.'); // Change this to a unique phrase.
Any help on this would be greatly appreciated. Let me know if more information is needed.
Thanks!
Dan
]]>When you type ?cat=4 in url or similar, or whatever you do that causes default $wp_the_query to get category $wp_query->found_posts is always 1, as consequence max_num_pages is also 1 what in the end causes page navigation to be non existent.
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>I’m getting this error when trying to run the install for WordPress.
One or more database tables are unavailable. The database may need to be repaired.
I’ve edited the ‘wp_config.php’ to include: define(‘DB_TYPE’, ‘sqlite’);, setup the API codes.
Put the PDO files in the /wp-content/ folder, not a plugin folder, created a /database/ directory in the /wp-content/ folder and set it to 777 CHMOD.
EVen set /wp-admin/include/schema.php and upgrade.php to 666 CHMOD as another website suggested.
Then when I run the install, I am presented with this error.
The Database is created fine /database/MyBlog.sqlite, as well as debug.txt, and a .htaccess file.
But the Database is empty. Blank. It’s like WP couldn’t create the Tables, so it’s blank.
I’ve tried this on two different servers, both with PHP 5.0 and PDO SQLite installed on both.
Do you know what could be wrong?
Edit:
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: modTimes
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: modTimes
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: modTimes
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: modTimes
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: wp_options
These are the errors from the debug.txt file. Further proving the Database is empty. No tables were created by whatever created the DB.
]]>Hi! Im trying to instal symposium in my web but appears and error during the instal.. and i think this is from PDO plugin, can anyone help me to solve it?
Fatal error: Call to undefined function dbDelta() in /mnt/webf/e2/64/53192564/htdocs/wordpress/wp-content/plugins/wp-symposium/create_tables.php on line 32
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>If you have the string “),” anywhere in a page, you won’t be able to add that page as a menu item in menu administration. It silently fails.
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>Upload WordPress 3.2.1 to the server…
Grab wp-config-sample.php from server
copy to wp-config.php
add define(‘DB_TYPE’, ‘sqlite’); //mysql or sqlite` immediately after line define(‘DB_COLLATE’, ”);
Run the wordpress install by visiting https://www.yourname.com/wordpressdirectory/
define db name, user, password, leave DB_HOST as localhost
Let WP generate a pw for you, because it you select one it won’t be written to the new PDO database. If you let WP generate one, you somehow skip the bug that will not let the password be saved.
All the SQL strings, will be shown using the PDO engine. It will look like puke to anybody that isn’ t a web developer, but the beauty is at the bottom when you scroll down to where it says: Success! and gives you your username / pw.
Use these credentials to login. Change your password under the ‘Users’ tab to something you can remember.
Thanks to AOL developers working on SQLlite, the WordPress team, and the 12,604 downloaders that have contributed to bug-fixes, and feedback.
Big thanks to Justin Adie for the integration. https://rathercurious.net
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>I had to do a couple of things to make it work for 3.2.1.
First, you should follow the instruction written in https://epilogica.info/articles/how-to/wordpress/installing-sqlite-PDO.htm. Make sure the permission of wp-content
is writable by php. Next, you should do the following:
wp-content/pdo/driver_sqlite/pdo_sqlite_driver.php: lines 57-58: uncomment these
$this->rewrite_date_sub();
$this->rewriteNowUsage();
wp-content/pdo/PDOEngine.php: line 615: basically the original approach crashes when contents have ‘),’ sequence. Needed to replace this line:
$explodedParts = explode ('),', $match[2]);
with:
$explodedParts = $this->parseMultipleInserts($match[2]);
and add the following function after function determineQueryType()
:
private function parseMultipleInserts($values){
$tokens = preg_split("/(''|'|\),)/",$values,-1,PREG_SPLIT_DELIM_CAPTURE);
$explodedParts = array();
$part = '';
$literal = FALSE;
foreach ($tokens as $tok) {
$part = $part.$tok;
switch ($tok) {
case "),":
if (!$literal) {
$explodedParts[] = $part;
$part = '';
}
break;
case "'":
if ($literal) { $literal = FALSE; }
else { $literal = TRUE; }
break;
}
}
if (!empty($part)) {
$explodedParts[] = $part;
}
return $explodedParts;
}
wp-content/pdo/db.php: lines 116-118: replace these lines
function escape($string) {
return addslashes($string);
}
with these:
function escape($string) {
if ( is_array($string) ) {
foreach ($string as &$value) {
$value = addslashes($value);
}
return $string;
} else {
return addslashes($string);
}
}
Hope these fixes would solve weird errors.
If you’re using the older version of wordpress, you might also need to change permission of wp-admin/includes/upgrade.php
and wp-admin/includes/schema.php
to be writable by php.
See title. Anything I can do to help? Any chance of sticking this up on Github? I can help with that too.
]]>Fatal error: Call to a member function bail() on a non-object in /wp/wp-content/pdo/PDOEngine.php on line 77
Just downloaded WP 3.1, the plugin, unzipped plugin into wp-content and that’s it. No dunut for me. ??
]]>2.7 does not work with 3.1, here the message it spits out.
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: modTimes
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such table: wp_options
Line 431, Function: prepareQuery, Message: Problem preparing the PDO SQL Statement. Error was no such column: FALSE
Therefore no user created for the access.
Any plan to support 3.1? Really hope so. This is an excellent plugin.
]]>I have the latest version of WP and the PDO plugin. What is happening is that if there has been no activity on the site for some time, and then someone visits, they are getting the following error:
==
Fatal error: Maximum execution time of 60 seconds exceeded in /Path-to/wp-content/pdo/PDOEngine.php on line 453
==
Everything is ok after a page refresh.
Not sure where to start, have had a look at the code and it is trying to execute a sql query.
Any ideas?
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>Im using wordpress 3.0.3 and SQLite 3.2.8, at first installation didn’t work for me, but I found a solution. I made a change in file pdo_sqlite_driver_create.php so that IF NOT EXISTS clauses were removed from “CREATE TABLE IF NOT EXISTS” queries.
Somehow IF NOT EXISTS parts caused error in my case.
]]>I am using PDO for WordPress with PHP 5.1, which should fall within the requirements. However, the installation process breaks in step 2. This probably produces a clear error, but I don’t have access to PHP logs on my server.
I tracked the bug down to the use of the function preg_last_error() in file wp-content/pdo/driver_sqlite/pdo_sqlite_driver_create.php. This function was introduced in PHP 5.2. I propose the following patch (taken from PDO version 2.7.0):
207,213c207
< if (function_exists('preg_last_error')) { // PHP >= 5.2.0
< $this->_errors[] = preg_last_error();
< } else {
< // No way to check for errors in PHP < 5.2
< // Silently ignore errors.
< $this->_errors[] = 0; // PREG_NO_ERROR
< }
---
> $this->_errors[] = preg_last_error();
287c281
< }
---
> }
\ No newline at end of file
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>Hi, when I install the plugin, which means I put the files in the correct places and adjust the config.php (I do nothing in the WP app itself like activating a plugin), and I go to the install with wp-admin/install.php. I get the regular install prompts but when I submit the next page is filled with php code and create table statements.
At the bottom it says success and to use the random password it created even though I put in a password. However, the password is blank. Nothing is there. When I try an login with admin and my password I typed in, I get denied. Blank password is denied also.
I checked and the sqlite database is being created and looking at the tables it appears all the wordpress tables were made. I just can’t login to the blog. The actual blog works just no admin.
I don’t know what password it is creating. The database has one in the column of wp_users but it is encrypted. Thanks for any help. Using Apache. Maybe there’s a way to input a new password?
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>there is one little problem annoying me:
wp_list_categories() and wp_tag_cloud() always return a empty string, no matter how i classify my posts or tag them.
After a simple testing, I found this bug only affects the count of post in categories/tags, the search or archive functions work ok.
I guess WordPress fail to update the count of categories/tags in SQLite.
I don’t check the source of WordPress (or PDO Plugin), so I wrote some code to workaround.
$categories= get_categories(‘hide_empty=0′);
foreach ($categories as $category) {
$option = ‘
<li><a href="”‘.get_category_link(">term_id ).’”>’;
$option .= $category->cat_name;
$option .= ‘</a></li>
’;
echo $option;
}
use code above to replace the wp_list_categories().
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>Hi, I found a bug in the plugin appeared when writing a new post under WordPress version 3.0.1 .
A warning occurs at line 117 in “wp-content/pdo/db.php”.
The problem happens, because of passing an array variable to the addslashes() function instead of a string.
To solve the problem, the line 117 inside the escape() function that contains “return addslashes($string);” should be replaced with the following code:
if ( !is_array($string) ){
return addslashes($string);
}else {
return $string;
}
https://www.ads-software.com/extend/plugins/pdo-for-wordpress/
]]>