Nextcloud 12/CentOS 7 -- Problem with code integrity check



  • 0_1518011909714_1.PNG

    0_1518011914369_2.PNG

    Technical information
    =====================
    The following list covers which files have failed the integrity check. Please read
    the previous linked documentation to learn more about the errors and how to fix
    them.
    
    Results
    =======
    - core
    	- EXCEPTION
    		- UnexpectedValueException
    		- RecursiveDirectoryIterator::__construct(/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs): failed to open dir: Permission denied
    
    Raw output
    ==========
    Array
    (
        [core] => Array
            (
                [EXCEPTION] => Array
                    (
                        [class] => UnexpectedValueException
                        [message] => RecursiveDirectoryIterator::__construct(/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs): failed to open dir: Permission denied
                    )
    
            )
    
    )
    
    

    This happens to be an error that does not seem to be listed in the Nextcloud documentation. I was thinking chmod 755 /var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs would resolve it, but it did not.

    UnexpectedValueException I assume is occurring because there is no value as it cannot open the directory.



  • Temporary set SELinux to permissive to see if that helps.
    setenforce 0



  • @black3dynamite No change



  • After reboot and permissive that worked for that specific issue. Now I have to deal with the php.ini issue that @JaredBusch is trying to mitigate.

    php-opcacheis installed.

    opcache.enable=1
    opcache.enable_cli=1
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.memory_consumption=128
    opcache.save_comments=1
    opcache.revalidate_freq=1
    

    The above lines have been added to the /etc/php.ini file.



  • Hm. This just resolved randomly. Odd. Almost like it took a minute to read one of the files, even though I rebooted and rescanned.



  • @wirestyle22

    In my saved (NC 12) guide I have added one more line, and it is saved in another file (maybe cause of FPM):

    cp /etc/php.d/opcache.ini /etc/php.d/opcache.ini.org
    nano /etc/php.d/opcache.ini
    	zend_extension=opcache.so
    	opcache.enable=1
    	opcache.enable_cli=1
    	opcache.interned_strings_buffer=8
    	opcache.max_accelerated_files=10000
    	opcache.memory_consumption=128
    	opcache.save_comments=1
    	opcache.revalidate_freq=1
    systemctl restart httpd
    systemctl restart php-fpm


  • @emad-r said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:

    @wirestyle22

    In my saved (NC 12) guide I have added one more line, and it is saved in another file (maybe cause of FPM):

    cp /etc/php.d/opcache.ini /etc/php.d/opcache.ini.org
    nano /etc/php.d/opcache.ini
    zend_extension=opcache.so
    opcache.enable=1
    opcache.enable_cli=1
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.memory_consumption=128
    opcache.save_comments=1
    opcache.revalidate_freq=1
    systemctl restart httpd
    systemctl restart php-fpm

    What auto starts php-fpm? httpd/
    Because it shows as active but its not enabled for auto start.



  • @black3dynamite
    I ll try my best to answer:

    You can have either but not both, PHP as Apache HTTPD module or PHP as FPM, If you want to setup PHP-FPM on centos instead of PHP module or mod_php, and then PHP-FPM starts as an systemctl service, you will need to carry on those steps:

    Install Apache:

    	yum -y install httpd
    	systemctl enable httpd
    	systemctl start httpd
    

    Install PHP-FPM:

    	yum -y install php
    	yum -y install php-fpm
    

    Configure Apache httpd:

    	nano /etc/httpd/conf.d/php.conf
    
    	<FilesMatch \.php$>
    	#    SetHandler application/x-httpd-php
    		SetHandler "proxy:fcgi://127.0.0.1:9000" 
    	</FilesMatch>
    

    Then:

    	systemctl start php-fpm 
    	systemctl enable php-fpm 
    	systemctl restart httpd 	
    

    For me if I want to make any web app, I just simply go this route, back in the day I would make it faster by running Nginx, but most third party web apps expect apache, and I found out the by simply using PHP-FPM with Apache I can make the web app as responsive and fast as ever, and I never found scenario where that is not compatible, what you simply do is remove PHP being child of apache, and giving it daemon of its own with children, and it becomes very fast.



  • @emad-r said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:

    @black3dynamite
    I ll try my best to answer:

    You can have either but not both, PHP as Apache HTTPD module or PHP as FPM, If you want to setup PHP-FPM on centos instead of PHP module or mod_php, and then PHP-FPM starts as an systemctl service, you will need to carry on those steps:

    Install Apache:

    	yum -y install httpd
    	systemctl enable httpd
    	systemctl start httpd
    

    Install PHP-FPM:

    	yum -y install php
    	yum -y install php-fpm
    

    Configure Apache httpd:

    	nano /etc/httpd/conf.d/php.conf
    
    	<FilesMatch \.php$>
    	#    SetHandler application/x-httpd-php
    		SetHandler "proxy:fcgi://127.0.0.1:9000" 
    	</FilesMatch>
    

    Then:

    	systemctl start php-fpm 
    	systemctl enable php-fpm 
    	systemctl restart httpd 	
    

    For me if I want to make any web app, I just simply go this route, back in the day I would make it faster by running Nginx, but most third party web apps expect apache, and I found out the by simply using PHP-FPM with Apache I can make the web app as responsive and fast as ever, and I never found scenario where that is not compatible, what you simply do is remove PHP being child of apache, and giving it daemon of its own with children, and it becomes very fast.

    The setup on CentOS is different compare to Fedora 27.

    Installing php also installs php-fpm.

    [[email protected] hjohnson]# dnf install php
    Last metadata expiration check: 2:30:05 ago on Wed 07 Feb 2018 08:46:00 AM MST.
    Dependencies resolved.
    ============================================================================================================================================================================================================
     Package                                               Arch                                        Version                                               Repository                                    Size
    ============================================================================================================================================================================================================
    Installing:
     php                                                   x86_64                                      7.1.14-1.fc27                                         updates                                      2.8 M
    Installing dependencies:
     nginx-filesystem                                      noarch                                      1:1.12.1-1.fc27                                       fedora                                        20 k
     php-cli                                               x86_64                                      7.1.14-1.fc27                                         updates                                      4.2 M
     php-common                                            x86_64                                      7.1.14-1.fc27                                         updates                                      1.0 M
     php-json                                              x86_64                                      7.1.14-1.fc27                                         updates                                       72 k
    Installing weak dependencies:
     php-fpm                                               x86_64                                      7.1.14-1.fc27                                         updates                                      1.5 M
    

    And its already configured /etc/httpd/conf.d/php.conf

    # Redirect to local php-fpm if mod_php is not available
    <IfModule !mod_php5.c>
      <IfModule !mod_php7.c>
        # Enable http authorization headers
        SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    
        <FilesMatch \.(php|phar)$>
            SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
        </FilesMatch>
      </IfModule>
    </IfModule>
    


  • @black3dynamite said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:

    @emad-r said in Nextcloud 12/CentOS 7 -- Problem with code integrity check:

    @black3dynamite
    I ll try my best to answer:

    You can have either but not both, PHP as Apache HTTPD module or PHP as FPM, If you want to setup PHP-FPM on centos instead of PHP module or mod_php, and then PHP-FPM starts as an systemctl service, you will need to carry on those steps:

    Install Apache:

    	yum -y install httpd
    	systemctl enable httpd
    	systemctl start httpd
    

    Install PHP-FPM:

    	yum -y install php
    	yum -y install php-fpm
    

    Configure Apache httpd:

    	nano /etc/httpd/conf.d/php.conf
    
    	<FilesMatch \.php$>
    	#    SetHandler application/x-httpd-php
    		SetHandler "proxy:fcgi://127.0.0.1:9000" 
    	</FilesMatch>
    

    Then:

    	systemctl start php-fpm 
    	systemctl enable php-fpm 
    	systemctl restart httpd 	
    

    For me if I want to make any web app, I just simply go this route, back in the day I would make it faster by running Nginx, but most third party web apps expect apache, and I found out the by simply using PHP-FPM with Apache I can make the web app as responsive and fast as ever, and I never found scenario where that is not compatible, what you simply do is remove PHP being child of apache, and giving it daemon of its own with children, and it becomes very fast.

    The setup on CentOS is different compare to Fedora 27.

    Installing php also installs php-fpm.

    [[email protected] hjohnson]# dnf install php
    Last metadata expiration check: 2:30:05 ago on Wed 07 Feb 2018 08:46:00 AM MST.
    Dependencies resolved.
    ============================================================================================================================================================================================================
     Package                                               Arch                                        Version                                               Repository                                    Size
    ============================================================================================================================================================================================================
    Installing:
     php                                                   x86_64                                      7.1.14-1.fc27                                         updates                                      2.8 M
    Installing dependencies:
     nginx-filesystem                                      noarch                                      1:1.12.1-1.fc27                                       fedora                                        20 k
     php-cli                                               x86_64                                      7.1.14-1.fc27                                         updates                                      4.2 M
     php-common                                            x86_64                                      7.1.14-1.fc27                                         updates                                      1.0 M
     php-json                                              x86_64                                      7.1.14-1.fc27                                         updates                                       72 k
    Installing weak dependencies:
     php-fpm                                               x86_64                                      7.1.14-1.fc27                                         updates                                      1.5 M
    

    And its already configured /etc/httpd/conf.d/php.conf

    # Redirect to local php-fpm if mod_php is not available
    <IfModule !mod_php5.c>
      <IfModule !mod_php7.c>
        # Enable http authorization headers
        SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    
        <FilesMatch \.(php|phar)$>
            SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
        </FilesMatch>
      </IfModule>
    </IfModule>
    

    Yup I noticed this with Fedora, and when I jump to Fedora , or when Centos gets updated to reach Fedora levels like in 3-5 years I will worry about that. I never reached scenario where I needed bleeding edge server, and if that is the case usually it is Ubuntu and not Fedora.


Log in to reply
 

Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.