ref_urls breaking for some resources and not for others

37 views
Skip to first unread message

Sasha Renninger

unread,
Sep 22, 2015, 6:17:31 AM9/22/15
to ResourceSpace
I have been using the ref_urls plugin for over a year with no problems, but one of my users noticed that for 5 particular jpgs, and only those 5, as far as I can find, it does not work (going to the ref_url just yields a blank page). The error in the error log is:

PHP Fatal error:  Call to undefined function http_response_code() in /var/www/html/resourcespace/plugins/ref_urls/file.php on line 31, referer: http://www.ur-online.org/subject/16803/

I read that the http_response_code function is in PHP version 5.4, but I am hesitant to upgrade my php version. Is this the only solution? And why does it only happen for these particular 5 images (out of thousands)?

In case its helpful, here is my version info

ResourceSpace version: Trunk (SVN)
ResourceSpace Build: 5739
Server platform: Apache/2.2.15 (CentOS)
PHP version: 5.3.3
ExifTool version: N/A
FFmpeg version: N/A
ImageMagick/GraphicsMagick Version: ImageMagick 6.5.4-7 2014-02-10 Q16 OpenMP http://www.imagemagick.org
Browser user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36

Allison M Stec

unread,
Sep 22, 2015, 8:44:10 AM9/22/15
to resour...@googlegroups.com
PHP 5.3 reached its end of life a little over a year ago. PHP 5.4 reached it less than a month ago. Considering a PHP upgrade, if possible, might be smart regardless.

The code around the error suggests that the url may not have "ref=<resource_id>" or has "ext=php".

A similar error would be thrown for you if external access was included ("k=...") and access was not open, or if the path to the resource wasn't readable.

Do any of these scenarios match the 5 URLs in question?
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
ResourceSpace Developer
Reseller of Colorhythm's Prismpoint Portal DAM
Reply all
Reply to author
Forward
0 new messages