MAMP/LAMP STACK + database connectivity
Posted 13 February 2009 - 01:08 PM
example1: Warning: you do not have a 'db' database connection as required by Active Record
example2: exception 'CDbException' with message 'Active Record requires a "db" CDbConnecti
on application component.' in (path to webroot)/yii/framework/db/ar/CActiveRecord.
Stack trace: (followed by a laundry list of errors)
I've tried to figure out how to make the shell command "model User" work, but had no luck untill I looked at which version of php it's using.
...in this case, it was the wrong one since I was using a lamp stack that I got from bitnami.com
so I had to invoke the shell command (i.e. "model User") using the version of php that came with the stack instead of using the OS version of php (running stacks on both mac OS X and Ubuntu 8.04). I also had to include the mysql socket that was on the stack so it won't go to the OS version as well.
here's my array that's in the protected/config/main.php file
then I invoke the command using:
htdocs/testdrive$> /home/michael/lamp/php/bin/php ../yii/framework/yiic shell
and this so far has worked for me
Posted 24 March 2009 - 02:07 AM
" driver not found"
with MAMP in Leopard.
The PDO extension are ok
My connection string is
Posted 24 March 2009 - 09:43 AM
imac-di-andrea-bersi:testdrive abmcr$ php -c /Applications/MAMP/conf/php5/php.ini /Applications/MAMP/htdocs/testdrive/protected/yiic.php shell
dyld: NSLinkModule() error
dyld: Library not loaded: /Users/severin/Dev/Projects/MAMP_1.7_src/lib/libltdl.3.dylib
Referenced from: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/mcrypt.so
Reason: image not found