PLEASE HELP - After updates (16 today) apache server won't come on

I have no idea - Can you help please?

Look in that file at the line that is a syntax error!

where do i look?

I don’t understand what you’re asking. The error you posted tells you exactly where to look, and I’ve pointed out exactly where in the error it told you that. I honestly don’t know how to be more precise than saying, “look at line 27 of /etc/httpd/conf.d/php.conf”.

1 Like

I’m so sorry … Where do I go to find this line 27? how do I get there
Like I said before I don’t know much about this but I can follow your directions to find it and post it - maybe then you can help correct this and hopefully get this working for me Please…

You can use any text editor you are familiar with. You can use the File Manager in Virtualmin to browse to that file, and open it with the built-in editor.

I tried this but …

[root@vmi431722 ~]# /etc/httpd/conf.d/php.conf
-bash: /etc/httpd/conf.d/php.conf: Permission denied

You need to open the file with an editor (nano, vim, emacs, joe, pico, etc.) or viewer (less, more, view, etc.). You cannot execute a plain text file (which is what you tried to do).

There is a text editor built into Webmin’s File Manager, as well.

I looked for the text editor and got this:
Searching for text editor . . . . . found 1 results :

Matching text Source Module References
Text editor User interface DHCP Server dhcpd.conf

When I click DCHP Server It says as below:

The DHCP server /usr/sbin/dhcpd could not be found on your system. Maybe it is not installed, or your DHCP module configuration is incorrect.

The ISC DHCPd package can be automatically installed by Webmin using YUM.

Should I install this? Maybe that will help to find the line 27?

File Manager. The text editor is in the File Manager, as I said.

I am sorry to say this in public, but a lot of questions that are asked in this forum which are not strictly related to the products *min I can find the answers using Google search. Most out of convenience prefer to ask here obviously requesting the small team that should solve other more important problems. In IT even a newbie can solve some tasks without knowledge, in other fields it is not possible, for example medicine. Does anyone practice surgery after reading articles on the Internet?

1 Like

ok I got it - thanks Joe
here is what I see in the
“look at line 27 of /etc/httpd/conf.d/php.conf”

#
# The following lines prevent .user.ini files from being viewed by Web clients.
#
#<Files ".user.ini">
#    <IfModule mod_authz_core.c>
#        Require all denied
#    </IfModule>
#    <IfModule !mod_authz_core.c>
#        Order allow,deny
#        Deny from all
#        Satisfy All
#    </IfModule>
#</Files>
#
#
# Allow php to handle Multiviews
#
AddType text/html .php
#
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
#mod_php options
<IfModule  mod_php5.c>
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    <FilesMatch \.php$>
       # SetHandler application/x-httpd-php
    </FilesMatch>

    #
    # Uncomment the following lines to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
<FilesMatch \.phps$>
    #SetHandler application/x-httpd-php-source
</FilesMatch>
#
    #
    # Apache specific PHP configuration options
    # those can be override in each configured vhost
    #
#    php_value session.save_handler "files"
#    php_value session.save_path    "/var/lib/php/session"
#    php_value soap.wsdl_cache_dir  "/var/lib/php/wsdlcache"
#</IfModule>

In the above - I Think LINE 27 is as below
IfModule mod_php5.c

DirectoryIndex index.php
#
#mod_php options
<IfModule  mod_php5.c>
    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    <FilesMatch \.php$>
       # SetHandler application/x-httpd-php
    </FilesMatch>

    #
    # Uncomment the following lines to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
<FilesMatch \.phps$>
    #SetHandler application/x-httpd-php-source
</FilesMatch>
#
    #
    # Apache specific PHP configuration options
    # those can be override in each configured vhost
    #
#    php_value session.save_handler "files"
#    php_value session.save_path    "/var/lib/php/session"
#    php_value soap.wsdl_cache_dir  "/var/lib/php/wsdlcache"
#</IfModule>

I suspect this means you’ve installed mod_php. That would be a mistake.

Show me the output of this command:

rpm -qa|grep php

To get your sites back online, edit that php.conf file and comment out (put a # as the first character) every line that isn’t already commented out. You only need the contents of that file if mod_php is installed, and mod_php should not be installed. If it is installed, things will break again in the future, but just commenting out those lines and restarting httpd will get your sites online again, most likely.

[root@vmi431722 ~]# rpm -qa|grep php
php-pdo-5.6.40-39.el7.remi.x86_64
php-mbstring-5.6.40-39.el7.remi.x86_64
php-tidy-5.6.40-39.el7.remi.x86_64
php-pecl-zip-1.22.2-1.el7.remi.5.6.x86_64
php-php-gettext-1.0.12-1.el7.noarch
sclo-php72-php-pecl-imagick-3.4.4-3.el7.x86_64
rh-php72-php-zip-7.2.24-1.el7.x86_64
rh-php72-php-xmlrpc-7.2.24-1.el7.x86_64
phpMyAdmin-4.4.15.10-6.el7.noarch
gd3php-2.3.3-7.el7.remi.x86_64
php-xml-5.6.40-39.el7.remi.x86_64
php-bcmath-5.6.40-39.el7.remi.x86_64
php-pecl-ssh2-0.13-3.el7.remi.5.6.x86_64
rh-php72-php-pear-1.10.5-1.el7.noarch
rh-php72-php-devel-7.2.24-1.el7.x86_64
rh-php72-php-mbstring-7.2.24-1.el7.x86_64
php-pecl-imagick-im6-3.7.0-7.el7.remi.5.6.x86_64
php72-php-common-7.2.34-19.el7.remi.x86_64
php-xmlrpc-5.6.40-39.el7.remi.x86_64
php-odbc-5.6.40-39.el7.remi.x86_64
php-soap-5.6.40-39.el7.remi.x86_64
php-snmp-5.6.40-39.el7.remi.x86_64
php-mcrypt-5.6.40-39.el7.remi.x86_64
php-tcpdf-6.2.26-1.el7.noarch
rh-php72-runtime-1-2.el7.x86_64
rh-php72-php-cli-7.2.24-1.el7.x86_64
rh-php72-php-pdo-7.2.24-1.el7.x86_64
rh-php72-php-mysqlnd-7.2.24-1.el7.x86_64
rh-php72-php-opcache-7.2.24-1.el7.x86_64
php72-php-pecl-ssh2-1.4-2.el7.remi.x86_64
php-common-5.6.40-39.el7.remi.x86_64
php72-php-json-7.2.34-19.el7.remi.x86_64
php-5.6.40-39.el7.remi.x86_64
php-mysqlnd-5.6.40-39.el7.remi.x86_64
php-gd-5.6.40-39.el7.remi.x86_64
php-fedora-autoloader-1.0.1-2.el7.noarch
php-opcache-5.6.40-39.el7.remi.x86_64
php-imap-5.6.40-39.el7.remi.x86_64
php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch
wbm-php-pear-1.6-1.noarch
sclo-php72-php-pecl-ssh2-1.2-1.el7.x86_64
rh-php72-php-json-7.2.24-1.el7.x86_64
rh-php72-php-xml-7.2.24-1.el7.x86_64
rh-php72-1-2.el7.x86_64
rh-php72-php-bcmath-7.2.24-1.el7.x86_64
php72-runtime-7.2-1.el7.remi.x86_64
php-cli-5.6.40-39.el7.remi.x86_64
php-fpm-5.6.40-39.el7.remi.x86_64
rh-php72-php-process-7.2.24-1.el7.x86_64
rh-php72-php-gd-7.2.24-1.el7.x86_64
rh-php72-php-pspell-7.2.24-1.el7.x86_64
php-pear-1.10.13-5.el7.remi.noarch
php72-php-pecl-imagick-im6-3.7.0-7.el7.remi.x86_64
php-pecl-jsonc-1.3.10-2.el7.remi.5.6.x86_64
php-process-5.6.40-39.el7.remi.x86_64
php-ldap-5.6.40-39.el7.remi.x86_64
rh-php72-php-common-7.2.24-1.el7.x86_64
rh-php72-php-fpm-7.2.24-1.el7.x86_64
[root@vmi431722 ~]#

There it is. You really should not have done that. I beg folks constantly not to do that. It’s in the guidelines: Forum Guidelines: Please read before posting!

If you followed our documentation for installing extra PHP versions this wouldn’t happen to you.

I’m so sorry Joe, I didn’t install it - I had a IT guy who is now not available do it all for me then I just basically upload all the websites here…

Anyways the only lines that don’t have the hash are as below

AddType text/html .php

DirectoryIndex index.php

<FilesMatch \.php$>

Should I add the hash at the beginning of these?
would that help?

Once again, I don’t know how to be more clear.

Joe and Ilia - Got it working
Helped me so much - Thanks a million :+1:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.