I have been having fun trying out the sweet new jQuery-ified interface
for making guides, now that I have all my v0.8 data imported and
modified for v0.9. Almost makes me wish I was a librarian. ;)
The pluslet in the subject line wasn't working for me; even after I
set allow_url_open to "On" in my php.ini file, I was still getting:
Warning: file_get_contents(
http://testserver.lib.cwu.edu/sp/assets/
fixed_pluslets/catalogsearch.html) [function.file-get-contents]:
failed to open stream: Connection refused in /usr/local/www/sp/control/
guides/guide_functions.php on line 367
While researching the problem w/ Google, I discovered that some
servers/networks are set up such that you can't use the php function
file_get_contents with the file parameter being a url that points to
the server that the call is being made from. I found that to be the
case in my setup, both on my test server and our primary webserver. To
test this (on my test server), I changed line 367 in sp/control/guides/
guide_functions.php from:
$pluslet .= file_get_contents ($AssetPath . "fixed_pluslets/" .
$local_file);
... to:
$pluslet .= file_get_contents ('
http://www.lib.cwu.edu/sp/
assets/' . "fixed_pluslets/" . $local_file);
... so that it grabbed the catalogsearch.html from our primary web
server and that allowed the pluslet to work. But a better solutions,
since file_get_contents allows it, might be to use a file path instead
of a url for the file parameter:
$pluslet .= file_get_contents ("../../assets/fixed_pluslets/" .
$local_file);
I noticed that catalogsearch.html is the only one in the
fixed_pluslets directory that is .html and uses the file_get_contents
function to grab the content. Another way might be to use the php
include() function that is being used to get the contents of all the
other files in this directory, I dunno. What say you Andrew?
- Gavin