View Full Version : Do we support PDO?
I think it's a mySQL component. I search google, but no success. Any response are very much appreciated. Thanks.
Dbrazzell
7-8-09, 02:57 PM
We have PDO installed with our PHP.
However it only supports sqlite and sqlite2 databases. The MySQL component is not installed.
Most people use the mysql or mysqli component in PHP to communicate with MySQL databases.
Chris Lambert
9-9-09, 07:22 PM
Can you explain why PDO is not supported?
Dbrazzell
9-10-09, 11:31 AM
For powweb. Its mostly due to lack of demand.
We have a large number customers but only about a half dozen requests for PDO. Also it appears that as time goes on the demand for it seems to dwindle even more.
In short it would seem that PDO is going away and Mysql/Mysqli is king.
Chris Lambert
9-11-09, 03:52 PM
If you won't support PDO how about php 5.3.0 to allow full use of mysqli?
Dbrazzell
9-11-09, 04:03 PM
Is there some aspect of our mysqli that doesn't work on your shared hosting account?
Right now I'm aware of one bug in our implementation of mysli. It only relates to one function in mysqli that most people don't use.
Right now the latest version of php that's available on our servers is 5.2.4. Even then most people do not have this version. Only people who have recently signed up for accounts. Most people have 5.2.2
Is adding extension=mysqli.so to my php.ini all I should need to make mysqli work? I'm trying to add Piwik to my account and its message is:
Piwik requires either the mysqli extension or both the PDO and pdo_mysql extensions.
So, based on your explanation above and this message, I SHOULD be able to use mysqli to install Piwik. I've tried adding that extension statement into my php.ini but no success so far. So any mysqli hints would be welcomed! Thanks!
Dbrazzell
10-27-09, 12:31 PM
If you have selected php 5 as the version of php to use for your account you should be good to go.
mysqli is only available in php5 and doesn't exist in php4.
Its turned on by default in our install pf php5
Ok, I'm still not able to get Piwik to install. The Piwik folks say:
You have mysqli but if it doesn't have the function to set encoding, then you won't see that choice.
I've asked them to clarify that, but in the mean time, I'll ask here: Is there some capability of mysqli that Powweb does NOT yet support (certain functions? is it a back version? Chris Lambert above alluded to something as did you Dbrazzell)?
thanks
What error are you receiving when attempting to install Piwik?
Their installation process issues these two PHP statements:
$extensions = @get_loaded_extensions();
return in_array('mysqli', $extensions) && function_exists('mysqli_set_charset');
So, they would be seeing mysqli in the list of extensions, but apparently they are NOT seeing mysqli_set_charset as a PHP function that exists. I don't know if that's an issue with PHP version or mysqli version or any other limitation or problem, but this statement is returning "false" so Piwik won't go any further in the installation.
Does that give you enough information to go on?
Thanks.
The folks at Piwik replied to me and they gave me this code as a test to see if POWWEB meets its requirements:
<?php
echo 'test';
$extensions = @get_loaded_extensions();
if (in_array('mysqli', $extensions) && function_exists('mysqli_set_charset')) {
echo "MySQLi is supported\n";
}
if (in_array('PDO', $extensions) && in_array('pdo_mysql', $extensions)) {
echo "PDO MySQL is supported\n";
}
I only get "test" as the output. So really, the key now is the "mysqli_set_charset" function within mysqli. Powweb is not showing it as existing. Is it an issue of a version or a problem? Can it/will it get fixed? Soon?
Thanks!
The set charset function exists in versions of php >= 5.2.3. Chances are your account is running PHP 5.2.1. I recommend checking with Piwik to find out if there are ways to complete the installation without usage of the function.
Does this mean my account COULD be running 5.2.3 (i.e. SOME powweb accounts already are?) If so, how can I change and what are the implications of the change (i.e. do I need to be aware of big PHP changes in my applications?)
I have asked Piwik about alternatives to the use of this function and I'm awaiting their reply. But, if I can be moved to a newer version of PHP that would resolve this, I'd prefer that, I think.
Thanks.
Ooops...just checked OPS and it SAYS that that my version is 5.2.5.
Given that, is there another issue? If being on 5.2.5 SHOULD be sufficient for having this mysqli function, I'm certainly not going to push for a php upgrade for my account. BUT, I would like to push that this function work. Do I need to open a ticket on this one? I guess I'm asking so that I can know what I'm asking for somewhat intelligently.
Thanks!
This gets better. Now, in looking at phpinfo, it says 5.2.2! So, that would explain the missing mysqli function...but not what OPS is telling me. So I'm back to the question of how one upgrades their version...a tantilizing prospect when OPS even says that I already have it! ;c)
Any hints as to how to proceed?
Croc Hunter
11-17-09, 04:26 AM
You cannot install Piwik with MySQLi until Powweb runs php 5.2.3 or later on your server. Or you install a prior version of Piwik that does not require the mysqli_set_charset.
HalfaBee
11-17-09, 05:08 AM
I did a quick scan of piwik files and only found 2 references to the function.
You could probably write a function to do the neccessary query.
Thanks. I may look at doing that! :)
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.