PHP Fatal Error: Failed opening required... CodeIgniter.php

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

PHP Fatal Error: Failed opening required... CodeIgniter.php

Post by cgutierr »

Hello,


I just completed and upgrade of NagiosLS 2.0 from 1.4.2. The upgrade completed successfully but opening the browser results in an HTTP 500 Internal Server Error. Here is what it's reporting in the ssl_error_log:

PHP Warning: require_once(/var/www/html/nagioslogserver/system/core/CodeIgniter.php): failed to open stream: Permission denied in /var/www/html/nagioslogserver/www/index.php on line 315

PHP Fatal error: require_once(): Failed opening required '/var/www/html/nagioslogserver/system/core/CodeIgniter.php' (include_path='.:/usr/share/pear/:/usr/share/php') in /var/www/html/nagioslogserver/www/index.php on line 315

We are running in an offline environment. Any help you can give will be greatly appreciated. Thank you!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cdienger »

What are the permissions et to on /var/www/html/nagioslogserver/system/core/CodeIgniter.php ?

Code: Select all

ll /var/www/html/nagioslogserver/system/core/CodeIgniter.php
Also, what version of php?

Code: Select all

php -v
?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cgutierr »

Permissions are 600 for CodeIgniter.php

PHP 5.3.3
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cdienger »

Interesting. My lab machine shows 644. Try this change and let us know your results.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cgutierr »

Changed all the files in that directory to 644 from 600 and restarted httpd and I still get the same result.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cdienger »

How about the core or ../system directory ? I can reproduce if core doesn't have read permissions set correctly. On a lab machine the permissions look like:

Code: Select all

drwxr-xr-x 3 root root 4096 Nov 21 17:55 core
drwxr-xr-x 3 root root 4096 Nov 14 12:28 database
drwxr-xr-x 2 root root   38 Nov 14 12:28 fonts
drwxr-xr-x 2 root root 4096 Nov 14 12:28 helpers
-rw-r--r-- 1 root root  131 Nov 14 12:28 index.html
drwxr-xr-x 3 root root   37 Nov 14 12:28 language
drwxr-xr-x 5 root root 4096 Nov 14 12:28 libraries
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cgutierr »

What permissions does your /var/www/html/nagioslogserver directory have and the directories in there?
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cgutierr »

Changed permissions on all the files in the sub-directories under /system to 644 and now I get this in the ssl_error_log:

PHP Fatal error: require_once(): Failed opening required '/var/www/html/nagioslogserver/system/core/compat/mbstring.php' (include_path='.:/usr/share/pear/:/usr/share/php') in /var/www/html/nagioslogserver/system/core/CodeIgniter.php on line 287

Also, changed permissions of mbstring.php to 644 and I still get HTTP 500 Internal Server Error.
cgutierr
Posts: 59
Joined: Tue Mar 08, 2016 1:09 pm

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by cgutierr »

I compared permissions to the those directories before the upgrade to 2.0 and they are quite different. I will report tomorrow of my findings.
kyang

Re: PHP Fatal Error: Failed opening required... CodeIgniter.

Post by kyang »

Sounds good!

Let us know your findings and show us the permissions of those directories.
Locked