userfrosting / UserFrosting

Modern PHP user login and management framework
https://www.userfrosting.com
Other
1.64k stars 366 forks source link

Cannot Install #93

Closed Keelan closed 10 years ago

Keelan commented 10 years ago

I get the following error when i go to install.

I'm sorry, you must have PDO installed and enabled in order for UserFrosting to access the database. If you don't know what PDO is, please see http://php.net/manual/en/book.pdo.php. You must also have MySQL version 4.1 or higher installed, since UserFrosting relies on native prepared statements.

I am running:

Though i am only running PHP 5.4 which says it is ok with.

alexweissman commented 10 years ago

Hmm, this sounds like it might be a configuration issue. The installer checks for PDO by doing:

class_exists('PDO')

So for whatever reason, it's not finding the PDO class. What server are you using? Have you tried checking your phpinfo() printout?

Keelan commented 10 years ago

Hmm not sure, i just complied with PDO with easy apache via WHM on CENTOS 6

Php info http://relcontrols.ca/phpinfo.php.

alexweissman commented 10 years ago

Hmm, I notice that on my phpinfo, there is an entire section on PDO (three tables) that don't appear in yours. I don't really know anything about WHM/CENTOS builds. Does this help at all:

https://superuser.com/questions/614124/whm-enable-or-install-pdo-driver

It could also be a namespace issue. What happens if you add the line use \PDO; to the top of your models/db-settings.php?

Keelan commented 10 years ago

That is originally how i setup my PDO using easy apache for owncloud.

Does USercake use PDO? Because that works fine.

I tried use \PDO; no luck.

I will look into it more when i finish work.

alexweissman commented 10 years ago

Usercake does not use PDO; it uses the old-style parameterized queries. Maybe your configuration requires that you explicitly include the PDO class files?

alexweissman commented 10 years ago

@Keelan have you had any luck getting UF to work on your server yet?

Keelan commented 10 years ago

Hey

Sorry It seems,i had this enabled in my htaccess

suPHP_ConfigPath /home/relcontr order allow,deny deny from all

I guess something in that php.ini was screwing with it. PDO now works.

alexweissman commented 10 years ago

Ah ok. Was this a default setting for some server package, or something you had set?

Keelan commented 10 years ago

Well i was using custom .ini's because i was rocking 5.2 and 5.4 side by side, joomla was using 5.2 and owncloud was using 5.4 with PDO.

So i had setup htaccess to look at particular custom .ini's to get this to work.

Since then i have everything running 5.4 i just forgot to take out the custom ini that UserFrosting was looking at.

Thanks.

alexweissman commented 10 years ago

Ah ok, cool. Then I won't add this to the troubleshooting wiki since it's a specific issue ;)