setting up php 5.2.4 in Leopard

1 view
Skip to first unread message

sfong15

unread,
Oct 13, 2008, 10:33:22 AM10/13/08
to habari-users
I know this probably should be asked in a mac forum but there could be
enough OS X geeks here. I have apache2, mysql, php running,
installed WP OK, tried to get PDO_mysql but hitting a brick wall.
Gave habari installer (r2665) a try anyway and got below error

Notice: Undefined variable: tab in system/installer/
locale_dropdown.php line 16

Fatal error: Call to a member function get_results() on a non-object
in /Library/WebServer/Documents/ha/system/classes/db.php on line 243

May be this is before the PDO driver check as I don't see PDO enabled
for mysql in phpinfo().

Caius Durling

unread,
Oct 13, 2008, 11:00:31 AM10/13/08
to habari...@googlegroups.com
On 13 Oct 2008, at 15:33, sfong15 wrote:

I know this probably should be asked in a mac forum but there could be
enough OS X geeks here.   I have apache2, mysql, php running,
installed WP OK, tried to get PDO_mysql but hitting a brick wall.
Gave habari installer (r2665) a try anyway and got below error

[snip]

May be this is before the PDO driver check as I don't see PDO enabled
for mysql in phpinfo().

How did you install php? If you compiled by hand you need to make sure to pass the right flags to enable it:

--enable-pdo=shared --with-pdo-mysql=shared,/usr/local/mysql --with-sqlite=shared --with-pdo-sqlite=shared

If you've installed through macports make sure you've used the mysql5 variant on the php package:

sudo port install php5 +mysql5

C

Stanley FONG

unread,
Oct 13, 2008, 9:01:18 PM10/13/08
to habari...@googlegroups.com
I enabled php that came with Leopard, i.e. uncommented a line in /etc/apache2/httpd.conf

By that I got 5.2.4 but I believe that hasn't got pdo_mysql.

Caius Durling

unread,
Oct 14, 2008, 12:10:40 PM10/14/08
to habari...@googlegroups.com

On 14 Oct 2008, at 02:01, Stanley FONG wrote:

I enabled php that came with Leopard, i.e. uncommented a line in /etc/apache2/httpd.conf

By that I got 5.2.4 but I believe that hasn't got pdo_mysql.

You are correct, the PHP that ships with leopard doesn't include pdo_mysql. I'd suggest installing apache2/php through MacPorts [1] if you need it. There is also the Entropy route, where you install a .pkg [2]

Don't forget habari runs on SQLite though, and pdo_sqlite is compiled into apple's pre-installed php.

Stanley FONG

unread,
Oct 15, 2008, 1:57:56 AM10/15/08
to habari...@googlegroups.com
thanks Caius,

I'm trying the macports option which should give me 5.2.6 with pdo_mysql.   Tried Entropy option, gave me error.   Macports seems to be best option.

thanks again
Reply all
Reply to author
Forward
0 new messages