[eluser]jgdovin[/eluser]
EDIT : Ok Im stupid... after reading the datamapper.php a little closer, I saw the line about to_array and needing the extension array enabled. I never saw anything in the documentation, so I just assumed that it would work out of the box Got it to work now, thanks guys. Cant wait to try this out now.
I assume this is still the support area for Datamapper ORM, so im gonna post this up. Im having some problems with the example application. I am trying to get a real feel for Datamapper ORM, and here are my problems.
When I went to run the example script I was getting call to unknown function apache_setenv()
After some looking around turns out that with me running CentOS with cpanel, and then running it with mod_suphp by default, that function isnt available. No problems, I commented it out, got a few errors about ob_flush() having nothing to flush during database install, but all looked to install ok...
Now when I went to create my admin user, this is the error I get...
Code:
Fatal error: Uncaught exception 'Exception' with message 'Unable to call the method
"from_array" on the class User' in /home/josh/public_html/clients/temp/application
/libraries/datamapper.php:1248 Stack trace: #0 [internal function]:
DataMapper->__call('from_array', Array) #1 /home/josh/public_html/clients/temp/application
/controllers/admin.php(164): User->from_array(Array, Array) #2 [internal function]:
Admin->init('save') #3 /home/josh/public_html/clients/temp/system/codeigniter/CodeIgniter.php(236):
call_user_func_array(Array, Array) #4 /home/josh/public_html/clients/temp/index.php(115):
require_once('/home/josh/publ...') #5 {main} thrown in
/home/josh/public_html/clients/temp/application/libraries/datamapper.php on
line 1248
Any help would be greatly appreciated. I really wanna learn Datamapper ORM, it looks to be pretty good, even if the people in #php complained about it bein messy