Page 1 of 2
PHP Fatal Error: Failed opening required... CodeIgniter.php
Posted: Tue Nov 21, 2017 4:33 pm
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!
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 5:25 pm
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?
?
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 5:41 pm
by cgutierr
Permissions are 600 for CodeIgniter.php
PHP 5.3.3
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 5:43 pm
by cdienger
Interesting. My lab machine shows 644. Try this change and let us know your results.
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 5:49 pm
by cgutierr
Changed all the files in that directory to 644 from 600 and restarted httpd and I still get the same result.
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 5:59 pm
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
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 6:08 pm
by cgutierr
What permissions does your /var/www/html/nagioslogserver directory have and the directories in there?
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 6:46 pm
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.
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Tue Nov 21, 2017 7:17 pm
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.
Re: PHP Fatal Error: Failed opening required... CodeIgniter.
Posted: Wed Nov 22, 2017 10:21 am
by kyang
Sounds good!
Let us know your findings and show us the permissions of those directories.