Error using 1.7.2

Questions about how to install and problems installing - please read the documentation first!
uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Error using 1.7.2

Post by uwes » Sat Dec 30, 2017 5:47 pm

I'm finally upgrading some foreign installations to 1.7.2. Unfortunately, it doesn't work on my local server while the old 1.6.9 does.
The apache error log contains the following message

Code: Select all

[Sat Dec 30 18:39:17.250032 2017] [:error] [pid 20276] [client 127.0.0.1:54344] PHP Warning:  include(./cmsimple/cms.php): failed to open stream: Permission denied in /var/www/html/new/index.php on line 6
[Sat Dec 30 18:39:17.250088 2017] [:error] [pid 20276] [client 127.0.0.1:54344] PHP Warning:  include(): Failed opening './cmsimple/cms.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/new/index.php on line 6
Of course, cms.php exists and is readable.

What's wrong?

cmb
Posts: 12770
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Error using 1.7.2

Post by cmb » Sat Dec 30, 2017 6:14 pm

uwes wrote:

Code: Select all

[Sat Dec 30 18:39:17.250032 2017] [:error] [pid 20276] [client 127.0.0.1:54344] PHP Warning:  include(./cmsimple/cms.php): failed to open stream: Permission denied in /var/www/html/new/index.php on line 6
[Sat Dec 30 18:39:17.250088 2017] [:error] [pid 20276] [client 127.0.0.1:54344] PHP Warning:  include(): Failed opening './cmsimple/cms.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/new/index.php on line 6
Of course, cms.php exists and is readable.

What's wrong?
Apparently, cmsimple/cms.php is not readable by the user who runs PHP. To verify do `sudo chmod 0555 cmsimple/cms.php`. Then another file is likely to be reported. If in doubt, either transfer file ownership to the user who runs PHP (maybe `nobody`), or set appropriate permissions for all files for all users.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Re: Error using 1.7.2

Post by uwes » Sat Dec 30, 2017 9:47 pm

Of course, I tried all o that. I tried to set file ownership to www-data (which runs the apache process in Ubuntu). I have set access rights to the same values I had in th 1.6.9 installation which worked. No luck.

I have tried your setting for cms.php, but I still get the same error message about cms.php being not readable.

cmb
Posts: 12770
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Error using 1.7.2

Post by cmb » Sat Dec 30, 2017 10:24 pm

uwes wrote:Of course, I tried all o that. I tried to set file ownership to www-data (which runs the apache process in Ubuntu). I have set access rights to the same values I had in th 1.6.9 installation which worked. No luck.

I have tried your setting for cms.php, but I still get the same error message about cms.php being not readable.
Assuming that all permissions are set sufficiently, there might be an issue with the relative file path. I suggest that you temporarily change this line by using the absolute path to cms.php.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Re: Error using 1.7.2

Post by uwes » Sat Dec 30, 2017 10:35 pm

Still:

Code: Select all

[Sat Dec 30 23:33:44.992617 2017] [:error] [pid 2063] [client 127.0.0.1:37818] PHP Warning:  include(/var/www/html/new/cmsimple/cms.php): failed to open stream: Permission denied in /var/www/html/new/index.php on line 6
[Sat Dec 30 23:33:44.992682 2017] [:error] [pid 2063] [client 127.0.0.1:37818] PHP Warning:  include(): Failed opening '/var/www/html/new/cmsimple/cms.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/new/index.php on line 6
while

Code: Select all

*******:/var/www/html/new$ ls -l /var/www/html/new/cmsimple/cms.php
-r-xr-xr-x 1 ***** ***** 31479 Dez 21 17:33 /var/www/html/new/cmsimple/cms.php

uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Re: Error using 1.7.2

Post by uwes » Sat Dec 30, 2017 10:46 pm

I made all directories accessible (which I had tried before), and now I get

Code: Select all

[Sat Dec 30 23:41:33.803008 2017] [:error] [pid 2065] [client 127.0.0.1:37862] PHP Fatal error:  Uncaught Error: Class 'XH\\Controller' not found in /var/www/html/new/cmsimple/cms.php:259\nStack trace:\n#0 /var/www/html/new/index.php(6): include()\n#1 {main}\n  thrown in /var/www/html/new/cmsimple/cms.php on line 259

cmb
Posts: 12770
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Error using 1.7.2

Post by cmb » Sun Dec 31, 2017 11:54 am

uwes wrote:I made all directories accessible (which I had tried before), and now I get

Code: Select all

[Sat Dec 30 23:41:33.803008 2017] [:error] [pid 2065] [client 127.0.0.1:37862] PHP Fatal error:  Uncaught Error: Class 'XH\\Controller' not found in /var/www/html/new/cmsimple/cms.php:259\nStack trace:\n#0 /var/www/html/new/index.php(6): include()\n#1 {main}\n  thrown in /var/www/html/new/cmsimple/cms.php on line 259
The class XH\Controller is supposed to be defined in cmsimple/classes/Controller.php. Make sure that the file exists. If it does, you can add some debug information by changing these lines to:

Code: Select all

    if (!file_exists($filename)) {
        trigger_error("class file {$filename} not found", E_USER_WARNING);
        return;
    } 
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Re: Error using 1.7.2

Post by uwes » Sun Dec 31, 2017 12:37 pm

After all the fiddling around, I noticed there were no more error messages in the log. I replaced the files with the original ones from the zip file and set user and group to www-data for all files. Still not working, no error messages (even with the lines replaced as you suggested), 1.6.9 still working.

Meanwhile, I checked the system requirements. I have all PHP modules that are mentioned in the wiki. PHP version is 7.0.22.

cmb
Posts: 12770
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Error using 1.7.2

Post by cmb » Sun Dec 31, 2017 1:10 pm

uwes wrote:After all the fiddling around, I noticed there were no more error messages in the log. I replaced the files with the original ones from the zip file and set user and group to www-data for all files. Still not working, no error messages (even with the lines replaced as you suggested), 1.6.9 still working.
Do you have debug mode enabled? Otherwise most errors/warnings won't be logged.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

uwes
Posts: 38
Joined: Mon Oct 01, 2012 8:40 am

Re: Error using 1.7.2

Post by uwes » Sun Dec 31, 2017 1:13 pm

Yes, it's at level 6.

Post Reply