Server migration very strange problem

Hello,

I'm migrating an Omeka 2.1.3 installation to another server. I exported/imported the database, I copied the /files and /plugins directory. The problem is the new installation does not correctly show all my items. If I go to the administration area, it says that there are 69 items, but it only shows 4, one on each page. A screenshot below:

http://tinypic.com/view.php?pic=28r1aut&s=5#.UuVlNBD8LIU

This is hard to debug for me because no error is shown and I could not enable error logging. I changed log.sql = true in config.ini, however the error.log file remains empty,even though its permissions are set to 777.

This looks like a failed SQL query but the database import looks mostly ok. There are meaningful records in the tables and I took care during the import/export that the settings and encodings were the same on both servers. The PHP ans MySql versions are similar on both servers though not identical.

Any ideea where to look for next would be very appreciated, I'm almost lost here!

Best regards,
Florin Tufescu

Two things might help for debugging. First make sure debug.exceptions is true in config.ini, and in .htaccess uncomment the SetEnv APPLICATION_ENV development line.

From the screenshot, it looks like a fatal error is happening when the view tries to display the creator of the first item, which then just causes nothing more to be displayed. Hopefully the above changes for error reporting will help us figure out if that really is the case.

Hello,

Thank you for you answer patrickmj. I did not mention it but I have already uncommented the SetEnv line and set debug.exception to true... From what I understand, this setting should log all SQL queries, even if no errors are thrown. However, my log file stays 0 kb big, refusing to log anything.
As for the error itself, I also suspect that it's got something to do with the creator field. However, I see nothing special for this record. In the items table I see for that particular item that owner_id=1, and in the users table the user 1 is the super user I logged in to administrate, so this user exists for sure. However, since I cannot see the whole query, it's pretty hard to guess what is going wrong.

Ugh. Dual problem of debugging the debugging system, while debugging the real problem. always fun!

That should be logging all the sql, so I'm a bit at a loss about what to check there.

Meanwhile, trying to tackle the original bug might mean checking the source HTML and/or resorting to stuffing some echos into the file /admin/themes/default/items/browse.php

It looks like it runs at least to line 84 of that file. After that, there are a couple possibilities I see due to the hooks that are called. It might be possible that Omeka's trying to call a hook from a plugin that is breaking.

So, if you look at the HTML source, does it look like it gets beyond the

<ul class='action-links group'>
...
</ul>

or beyond the

<div class='details'>
...
</div>

Hello,

Thank you very much for your help patrickmj. Knowing I have a developer beside me gave me the courage to investigate more, while I was on the point of giving up.

I traced the error and the script definitely stops at
<?php fire_plugin_hook('admin_items_browse_simple_each', array('item' => $item, 'view' => $this));?> in /admin/themes/default/items/browse.php .
I commented this line out and the items show all right.
Does this information give you any additional clues?

Another helper info: I also have errors when i try to display items in the public zone (not in administration area). The same thing: only the first item is shown. Things are harder for me to investigate there, since because of rewrite redirection it's hard for me to say exactly what script is being called. I tried to modify /application/views/scripts/items/browse.php because it seemed to me that it also crashes there at fire_plugin_hook (public_items_browse_each...) but my modifications did not seem to have any effect.

Any help would be greatly appreciated.

Best regards,
Florin

What version of PHP is on your server that's having the problems?

I think you might be running into a bug in the Coins plugin that only shows up on somewhat old PHP 5.2 installations. If that's the case, updating Coins to the latest version available on the addons page should fix the issue.

I can't say exactly what I did, but after updating omeka to the latest version, things started working. Now I have some other questions which I will ask in other threads. Thank you all for your help!