PHP Engine is default off on newly created hosts.. How to make it default on.. Is there any template or so (Wich I cannot find)

PHP Engine is default off on newly created hosts.. How to make it default on.. Is there any template or so (Wich I cannot find)

//Johan

Status: 
Active

Comments

Howdy -- thanks for contacting us!

What is it that isn't working exactly?

It's normal for the "php_admin_value engine Off" lines to exist in the Apache config. That doesn't mean that PHP is disabled.

However, if PHP isn't working, let us know what error or problem you're experiencing exactly and we can look into that.

For newley created hosts (and after some upgrades) in the PHP settings for each host engine is set to off thus disabling PHP.. I want it to be on always!

What specifically is set to off?

If you're referring to "php_admin_value engine", that's normal, and should be set to "Off".

If you're experiencing PHP issues though, we can help with that.

What symptoms are you experiencing exactly? If PHP isn't working, what exactly is it doing when you try to access a PHP site?

If PHP admin value engine is set to off or not exist the the php on that site will stop working.. Also I have seen at some updates seems to switch the value from on to off thus breaking that site

Thanks for the info!

There's a few reasons the site could stop working when that occurs.

What errors do you see in the domain's Apache logs when that happens? Those are located in $HOME/logs/error_log.

Also, what is the output of these commands:

find -type f /etc/apache2 | xargs grep -i sethandler
dpkg -l 'php*'
apache2ctl -M

root@ns ~ # find -type f /etc/apache2 | xargs grep -i sethandler find: paths must precede expression: /etc/apache2' find: possible unquoted pattern after predicate-type'? root@ns ~ # dpkg -l 'php*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================================================-===============================-===============================-=============================================================================================================== ii php 1:7.2+60ubuntu1 all server-side, HTML-embedded scripting language (default) un php-amqp (no description available) un php-apcu (no description available) un php-apcu-bc (no description available) un php-ast (no description available) ii php-bcmath 1:7.2+60ubuntu1 all Bcmath module for PHP [default] ii php-bz2 1:7.2+60ubuntu1 all bzip2 module for PHP [default] un php-calendar (no description available) ii php-cli 1:7.2+60ubuntu1 all command-line interpreter for the PHP scripting language (default) ii php-common 1:60ubuntu1 all Common files for PHP packages un php-console-getopt (no description available) un php-crypt-gpg (no description available) un php-ctype (no description available) ii php-curl 1:7.2+60ubuntu1 all CURL module for PHP [default] un php-dom (no description available) un php-exif (no description available) un php-fileinfo (no description available) ii php-fpm 1:7.2+60ubuntu1 all server-side, HTML-embedded scripting language (FPM-CGI binary) (default) un php-ftp (no description available) ii php-gd 1:7.2+60ubuntu1 all GD module for PHP [default] un php-geoip (no description available) ii php-gettext 1.0.12-0.1 all transitional dummy package for php-php-gettext un php-gmagick (no description available) un php-iconv (no description available) un php-igbinary (no description available) ii php-imagick 3.4.3~rc2-2ubuntu4 amd64 Provides a wrapper to the ImageMagick library ii php-intl 1:7.2+60ubuntu1 all Internationalisation module for PHP [default] un php-json (no description available) ii php-mbstring 1:7.2+60ubuntu1 all MBSTRING module for PHP [default] un php-memcache (no description available) un php-memcached (no description available) un php-mongodb (no description available) un php-msgpack (no description available) ii php-mysql 1:7.2+60ubuntu1 all MySQL module for PHP [default] un php-mysqli (no description available) un php-mysqlnd (no description available) un php-opcache (no description available) un php-pdo (no description available) un php-pdo-mysql (no description available) ii php-pear 1:1.10.5+submodules+notgz-1ubun all PEAR Base System un php-pear-frontend-gtk (no description available) un php-pear-frontend-web (no description available) un php-phar (no description available) ii php-php-gettext 1.0.12-0.1 all read gettext MO files directly, without requiring anything other than PHP un php-posix (no description available) un php-radius (no description available) un php-readline (no description available) ii php-recode 1:7.2+60ubuntu1 all recode module for PHP [default] un php-redis (no description available) un php-rrd (no description available) un php-shmop (no description available) un php-simplexml (no description available) un php-smbclient (no description available) ii php-soap 1:7.2+60ubuntu1 all SOAP module for PHP [default] un php-sockets (no description available) un php-ssh2 (no description available) un php-structures-graph (no description available) un php-sysvmsg (no description available) un php-sysvsem (no description available) un php-sysvshm (no description available) ii php-tidy 1:7.2+60ubuntu1 all tidy module for PHP [default] un php-tokenizer (no description available) un php-uploadprogress (no description available) un php-uuid (no description available) un php-wddx (no description available) un php-xdebug (no description available) ii php-xml 1:7.2+60ubuntu1 all DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default] un php-xml-util (no description available) un php-xmlreader (no description available) ii php-xmlrpc 1:7.2+60ubuntu1 all XMLRPC-EPI module for PHP [default] un php-xmlwriter (no description available) un php-xsl (no description available) ii php-zip 1:7.2+60ubuntu1 all Zip module for PHP [default] un php-zmq (no description available) un php5.6-common (no description available) un php5.6-json (no description available) un php7.0-common (no description available) ii php7.2 7.2.19-0ubuntu0.18.04.1 all server-side, HTML-embedded scripting language (metapackage) ii php7.2-bcmath 7.2.19-0ubuntu0.18.04.1 amd64 Bcmath module for PHP ii php7.2-bz2 7.2.19-0ubuntu0.18.04.1 amd64 bzip2 module for PHP un php7.2-calendar (no description available) un php7.2-cgi (no description available) ii php7.2-cli 7.2.19-0ubuntu0.18.04.1 amd64 command-line interpreter for the PHP scripting language ii php7.2-common 7.2.19-0ubuntu0.18.04.1 amd64 documentation, examples and common module for PHP un php7.2-ctype (no description available) ii php7.2-curl 7.2.19-0ubuntu0.18.04.1 amd64 CURL module for PHP un php7.2-dom (no description available) un php7.2-exif (no description available) un php7.2-fileinfo (no description available) ii php7.2-fpm 7.2.19-0ubuntu0.18.04.1 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) un php7.2-ftp (no description available) ii php7.2-gd 7.2.19-0ubuntu0.18.04.1 amd64 GD module for PHP un php7.2-gettext (no description available) un php7.2-iconv (no description available) un php7.2-imagick (no description available) ii php7.2-intl 7.2.19-0ubuntu0.18.04.1 amd64 Internationalisation module for PHP ii php7.2-json 7.2.19-0ubuntu0.18.04.1 amd64 JSON module for PHP ii php7.2-mbstring 7.2.19-0ubuntu0.18.04.1 amd64 MBSTRING module for PHP ii php7.2-mysql 7.2.19-0ubuntu0.18.04.1 amd64 MySQL module for PHP un php7.2-mysqli (no description available) un php7.2-mysqlnd (no description available) ii php7.2-opcache 7.2.19-0ubuntu0.18.04.1 amd64 Zend OpCache module for PHP un php7.2-pdo (no description available) un php7.2-pdo-mysql (no description available) un php7.2-phar (no description available) un php7.2-posix (no description available) ii php7.2-readline 7.2.19-0ubuntu0.18.04.1 amd64 readline module for PHP ii php7.2-recode 7.2.19-0ubuntu0.18.04.1 amd64 recode module for PHP un php7.2-shmop (no description available) un php7.2-simplexml (no description available) ii php7.2-soap 7.2.19-0ubuntu0.18.04.1 amd64 SOAP module for PHP un php7.2-sockets (no description available) un php7.2-sodium (no description available) un php7.2-sysvmsg (no description available) un php7.2-sysvsem (no description available) un php7.2-sysvshm (no description available) ii php7.2-tidy 7.2.19-0ubuntu0.18.04.1 amd64 tidy module for PHP un php7.2-tokenizer (no description available) un php7.2-wddx (no description available) ii php7.2-xml 7.2.19-0ubuntu0.18.04.1 amd64 DOM, SimpleXML, WDDX, XML, and XSL module for PHP un php7.2-xmlreader (no description available) ii php7.2-xmlrpc 7.2.19-0ubuntu0.18.04.1 amd64 XMLRPC-EPI module for PHP un php7.2-xmlwriter (no description available) un php7.2-xsl (no description available) ii php7.2-zip 7.2.19-0ubuntu0.18.04.1 amd64 Zip module for PHP un phpapi-20170718 (no description available) un phpgacl (no description available) root@ns ~ #

root@ns ~ # apache2ctl -M Loaded Modules: core_module (static) so_module (static) watchdog_module (static) http_module (static) log_config_module (static) logio_module (static) version_module (static) unixd_module (static) access_compat_module (shared) actions_module (shared) alias_module (shared) auth_basic_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_groupfile_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) cgi_module (shared) dav_module (shared) dav_fs_module (shared) dav_lock_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) fcgid_module (shared) filter_module (shared) mime_module (shared) mpm_prefork_module (shared) negotiation_module (shared) php7_module (shared) proxy_module (shared) proxy_fdpass_module (shared) reqtimeout_module (shared) rewrite_module (shared) setenvif_module (shared) socache_shmcb_module (shared) ssl_module (shared) status_module (shared) suexec_module (shared) root@ns ~ #

Currently no sites with the error so no relevant error logs