When initially setting up Solr, I tend to get on the screen on /admin adn on the settings page errors like :

warning: fsockopen() [function.fsockopen]: unable to connect to localhost:80 (Connection refused) in /sites/all/modules/apachesolr/SolrPhpClient/Apache/Solr/Service.php on line 537.

Is there any reason not to just suppress those errors in hook_requirements? A message is already displayed if the connection fails.

CommentFileSizeAuthor
#1 hide-requirements-error-327784-1.patch1.06 KBpwolanin

Comments

pwolanin’s picture

StatusFileSize
new1.06 KB

we could suppress just with @ like so.

robertdouglass’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Active » Patch (to be ported)

Thanks. Need backporting to D5.

JacobSingh’s picture

It's not too important, but wouldn't trapping them be a better solution with a try...catch?

pwolanin’s picture

I think this is aready inside a try {} catch {} block, so I guess the catch doesn't catch the errror message (as opposed to the exception).

robertdouglass’s picture

Status: Patch (to be ported) » Fixed

committed in both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.