Fatal Error in Installation

Fatal error: Call to undefined function spl_autoload_register() in /usr/home/web/poormojo.org/data/fgs/application/libraries/Omeka/Core.php on line 104

This is the error I am getting when navigating to my install directory. Does anyone have any insight into this one?

I am running php .5.2.3 and I have sorted out all of the necessary .htaccess stuff for a non-root install.

It appears your server doesn't have the Standard PHP Library (http://us2.php.net/spl) installed, despite having PHP 5.2.3 installed. You'll need this to run Omeka. Not having SPL is uncommon, so I'd ask your server administrator why this is the case and to consider adding it.

I seem to be having the same problem, but I have SPL Library installed on my server space. I, however, am using PHP 5.2.5. When I pull up my PHP info I get this:

SPL support enabled

Interfaces RecursiveIterator, SeekableIterator
Classes ArrayIterator, ArrayObject, CachingIterator, CachingRecursiveIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator<\code>

Any clues as to why? My administrator doesn't seem to think anything is wrong on his end.

I'm running SQL 5.0.45.

I'm unable to duplicate this problem on our servers (which have PHP compiled with SPL), but you could try using __autoload() - with two underscore characters at the beginning, instead of spl_autoload_register(). In order to get that to work, you need to actually copy/paste the code from the autoload() function that is located in application/libraries/Omeka.php, and put it in a function, as in the help on this page of the php.net site:


Then put that function in the paths.php file that is in the root of your Omeka installation. You may also have to replace __FILE__ with the correct path to your application/libraries directory. Then remove the reference to the function that it says you are missing. I'm not sure if that will work, but let me know what happens.


Thanks for getting back to me! I was about to try your suggestion but got a little help from my system admin first. His suggestion worked.

First I moved the Omeka and folder from my root directory to the public_html one. This was the main one for my web site content although I had been running Omeka from another location. The reason for this was mostly because I had been having subdomain issues. Then I fixed the subdomain paths.

After this I removed the rewrite rules from the Omeka's .htaccess file, set the correct database collation through cPanel->PhpMyAdmin->Operations and I managed to complete the installation. At the end of the installation I have appended again the same rewrite rules.

I'm still not sure what occurred, but it seems that the .htaccess file may have been involved. Otherwise, I had do everything differently. I'll see if I can pinpoint the problem and get back to you.