Hello
I am trying to configure Apache Solr on a Drupal 7 installation, and am receiving the following error message when trying to access the configuration for the first time:
Uncaught exception thrown in session handler.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: UPDATE {sessions} SET uid=:db_update_placeholder_0, cache=:db_update_placeholder_1, hostname=:db_update_placeholder_2, session=:db_update_placeholder_3, timestamp=:db_update_placeholder_4 WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => 0 [:db_update_placeholder_2] => 128.144.156.30 [:db_update_placeholder_3] => batches|a:3:{i:17;b:1;i:18;b:1;i:19;b:1;}updates_remaining|a:0:{} [:db_update_placeholder_4] => 1318892708 [:db_condition_placeholder_0] => oAkCaGothqaLImLAxC908UV__tFPF_GSYwK3IHqjfB0 [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 203 of D:\websites\drupal7\includes\session.inc).I am using Drupal 7.8, PHP 5.2.17 provided by the Zend Community Edition server, MySQL 5.1.50 (also community). The whole shebang is running on Windows Server 2003 x86.
I have Solr running successfully for 3 other sites on the same server. I have applied all the configurations as documented in the README.TXT file, however I am unable to change the configuration in Drupal to use the Solr server as I get the PDOException before the admin page loads - so I'm not convinced that this is a Solr issue, but a PHP/Host issue.
Any suggestions would be great!
Thanks,
Tim
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1312718-9.patch | 3.33 KB | pwolanin |
Comments
Comment #1
nick_vhIt seems that your uid is null? Are you working with a clean install of drupal 7 or some export/import database? I don't think this is the right issue queue for that...
Comment #2
timatlee commentedI'm not sure why UID would be null - the rest of the site operates without any issue.
It is a clean install, but Solr has been the last thing to implement.
I imagine this isn't the right queue, however it seems weird that this error only crops up when accessing the Solr admin page, so I thought it was a good starting place.
Comment #3
timatlee commentedJust an update.. I tried adding the Acquia search-as-a-service module (with the 30-day trial), and I can now edit the Solr configuration settings.
Go figure.
Comment #4
nick_vhWeird... I hope you can pinpoint the problem a bit more so we an maybe fix this little/big bug if the problem is in the code
Comment #5
timatlee commentedThe closest I can get to is that there's nothing in apachesolr_environment_variable. If I apply this change to apachesolr.install (line 66): (note, also changing it to reflect my own environment..)
During installation, I get:
Then, in the admin/config overlay:
Notice: unserialize() [function.unserialize]: Error at offset 0 of 10 bytes in apachesolr_load_all_environments() (line 1223 of D:\websites\drupal7-dev\sites\all\modules\apachesolr\apachesolr.module).So, ok, my text version of blob data. Noticed that the Configure Apache Solr link doesn't show up in the overlay, so I clear caches through the Performance page.
Once cleared, I now edit the server configuration (noting that the read-write mode toggle wasn't set at all) - once set, all the errors clear.
So.. not sure how to apply a fix for it - but this is how I've worked around it.
Hope it helps someone else!
Comment #6
nick_vhCan you try this with the latest development build? I think some other things have been changed since then (mainly in that hook_search_info).
Comment #7
timatlee commentedHello
I tried the 7.x-1.x dev module (dated 10/19/11) this morning. On installation:
Again, Apache Solr search settings page wasn't there - it came back after cache clearing.
As with the non-dev (beta?) version, I saw the same PDOException when trying to load admin/config/search/apachesolr.
Comment #8
pwolanin commentedLooks liek we need some better handling of the case where the core_search page is missing.
For now can you try uninstalling the apachesolr modules and re-installing?
Comment #9
pwolanin commentedI have been seeing the error in #7 when enabling/installing the module, and then I get an infinite redirect when searching.
This little patch seems to mitigate it (though a bit ugly). Also reorganizes hook_enable and hook_install.
Comment #10
pwolanin commentedcommitted