PHP Fatal error /tmp/php_error relationship/doc/index.php

Project:RUcore API's
Version:7.2.1
Component:API Documentation
Category:bug report
Priority:normal
Assigned:dhoover
Status:closed
Description

Fixed - DH

The following message appears in /tmp/php_error.log on rucore.libraries.rutgers.edu

[14-Aug-2013 11:43:45 America/New_York] PHP Fatal error: require(): Failed opening required './relationship/lib/configuration.php' (include_path='.:/usr/local/lib/php') in /home/httpd/html/rucore/api/relationship/doc/index.php on line 14

It prevents the page from displaying and seems to be caused by this :

require './relationship/lib/configuration.php';

which I believe needs to be :

require '../relationship/lib/configuration.php';

Comments

#1

Version:7.2» 7.2.1

#2

Status:active» test

The relationship API documents should be accessed from the following URL.

...libraries.rutgers.edu/api/?api=rels

If someone attempts to hit the documentation page more directly, URL below, this error occurs.

...libraries.rutgers.edu/api/relationship/doc/

I have added a check so that will load the configuration file properly even if someone tries to load the page from the unintended URL. Visit both page and see that no errors are found.

<a href="http://rucore-test.libraries.rutgers.edu/api/?api=rels" title="http://rucore-test.libraries.rutgers.edu/api/?api=rels">http://rucore-test.libraries.rutgers.edu/api/?api=rels</a>

<a href="http://rucore-test.libraries.rutgers.edu/api/relationship/doc/" title="http://rucore-test.libraries.rutgers.edu/api/relationship/doc/">http://rucore-test.libraries.rutgers.edu/api/relationship/doc/</a>

#3

Assigned to:chadmills» dhoover

#4

Status:test» closed

Fixed

Back to top