Skip to main content

confusion about which php version website is being served by

Comments

9 comments

  • cPanelMichael
    Then I see PHP 5.6.30 and not PHP 7.0, why is that and is how can I really make sure that PHP 7.0 is served to this website?

    Hello, Are you using any third-party applications such as LiteSpeed or PHP Selector with CloudLinux on this system? Thank you.
    0
  • Mangoose
    Hello, Are you using any third-party applications such as LiteSpeed or PHP Selector with CloudLinux on this system? Thank you.

    Michael, I am not on CloudLinux just EA4 and no I am not using LiteSpeed or PHP Selector on my system. I am using xVarnish on this server and APCu but the latter is not used by any Cpanel account. Yours truly,
    0
  • cPanelMichael
    Hello, Could you let us know the contents of the .htaccess file in the document root of the affected website? Thank you.
    0
  • Mangoose
    Michael, The content of the .htaccess file is you asked for
    DirectoryIndex index.html index.php # Compress HTML, CSS, JavaScript, Text, XML, fonts AddOutputFilterByType DEFLATE application/javascript application/x-javascript text/javascript application/json AddOutputFilterByType DEFLATE application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf font/opentype font/otf font/ttf application/x-woff application/x-font-woff AddOutputFilterByType DEFLATE text/css text/html text/plain # Remove browser bugs (only needed for really old browsers) BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent Header set Access-Control-Allow-Origin "*" # Cache all images for 2 months ExpiresActive on ExpiresDefault "access plus 2 months" Header set Cache-Control "max-age=1209600" #Expire Header ExpiresDefault "access plus 2 months" #Gzip AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript RewriteEngine on # Please note that RewriteBase setting is obsolete use it only in case you experience some problems with SEO addon. # Some hostings require RewriteBase to be uncommented # Example: # Your store url is http://www.yourcompany.com/store/cart # So "RewriteBase" should be: # RewriteBase /store/cart # RewriteBase / Options -MultiViews RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteCond %{REQUEST_URI} ^api/(.*)$ [or] RewriteCond %{REQUEST_URI} .*/api/(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .*api/(.*)$ api.php?_d=$1 [L,QSA] RewriteCond %{REQUEST_URI} \.(png|gif|ico|swf|jpe?g|js|css|ttf|svg|eot|woff|yml|xml)$ [or] RewriteCond %{REQUEST_URI} store_closed.html$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*?)\/(.*)$ $2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L,QSA] # This prevents possible problems when downloading files php_flag zlib.output_compression Off Header append Vary: Accept-Encoding Header unset ETag FileETag None ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType text/html "access plus 2 months" ExpiresByType image/x-icon "access plus 1 year" Header unset ETag FileETag None ExpiresActive On ExpiresDefault "access plus 1 year" ForceType text/css Header set Content-Encoding: gzip Header set Cache-control: private Header unset ETag FileETag None ExpiresActive On ExpiresDefault "access plus 1 year" ForceType text/javascript Header set Content-Encoding: gzip Header set Cache-control: private Header set Access-Control-Allow-Origin "*" ServerSignature Off ExpiresActive on ExpiresDefault "access plus 1 month" # CSS ExpiresByType text/css "access plus 1 year" # Data interchange ExpiresByType application/atom+xml "access plus 1 hour" ExpiresByType application/rdf+xml "access plus 1 hour" ExpiresByType application/rss+xml "access plus 1 hour" ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/ld+json "access plus 0 seconds" ExpiresByType application/schema+json "access plus 0 seconds" ExpiresByType application/vnd.geo+json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" # Favicon (cannot be renamed!) and cursor images ExpiresByType image/vnd.microsoft.icon "access plus 1 month" ExpiresByType image/x-icon "access plus 1 month" # HTML ExpiresByType text/html "access plus 0 seconds" # JavaScript ExpiresByType application/javascript "access plus 1 year" ExpiresByType application/x-javascript "access plus 1 year" ExpiresByType text/javascript "access plus 1 year" # Manifest files ExpiresByType application/manifest+json "access plus 1 week" ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" ExpiresByType text/cache-manifest "access plus 0 seconds" # Media files ExpiresByType audio/ogg "access plus 1 month" ExpiresByType image/bmp "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType image/webp "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType video/webm "access plus 1 month" # Web fonts # Embedded OpenType (EOT) ExpiresByType application/vnd.ms-fontobject "access plus 1 month" ExpiresByType font/eot "access plus 1 month" # OpenType ExpiresByType font/opentype "access plus 1 month" # TrueType ExpiresByType application/x-font-ttf "access plus 1 month" # Web Open Font Format (WOFF) 1.0 ExpiresByType application/font-woff "access plus 1 month" ExpiresByType application/x-font-woff "access plus 1 month" ExpiresByType font/woff "access plus 1 month" # Web Open Font Format (WOFF) 2.0 ExpiresByType application/font-woff2 "access plus 1 month" # Other ExpiresByType text/x-cross-domain-policy "access plus 2 weeks"
    0
  • Mark Shaw
    Hello Mangoose, Please try these instructions that I have for you below.
      ]
    • Login to cPanel
    • Click the Multi PHP button in the Software section.
    • Select the version of PHP you want to use from the dropdown.
    • Select the domains that you would like to be used for this version of PHP.
    • Click the Update button to save your php configuration.
    • Check your changes by viewing your setting with PHP info
    If this does not work then please provide a screenshot of the version that is defined under the Multi PHP page, however I believe these instructions will get you fixed up! Thanks, Mark S.
    0
  • cPanelMichael
    Hello, It looks like you are missing an entry in your .htaccess file to define the custom PHP version. Did you replace the .htaccess file on the account? If so, try using the steps in the previous post and let us know if that helps. Thank you.
    0
  • Mangoose
    It looks like you are missing an entry in your .htaccess file to define the custom PHP version. Did you replace the .htaccess file on the account? If so, try using the steps in the previous post and let us know if that helps.

    What entry do you suppose I am missing here ? PS Mark's solution is no solution, no offense Mark but what you suggest I do have already tried. Yet the results do not indicate that my store is utlizing PHP 7.0
    0
  • cPanelMichael
    What entry do you suppose I am missing here ?

    Hello, For instance, if the system PHP version configured in "WHM >> MultiPHP Manager" is set to PHP 7.0, and one particular domain name is set to PHP 5.6, then the following entry should exist in the .htaccess file in the document root of that specific domain name:
    # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php56" package as the default "PHP" programming language. AddType application/x-httpd-ea-php56 .php .php5 .phtml # php -- END cPanel-generated handler, do not edit
    Thank you.
    0
  • Mark Shaw
    Hello, I did not mean to insult you so sorry if you took it that way. However I meant sometimes a common issue is people forget to click a box or tick a box and that causes it not to work. If you save it in cPanel does it show that version as being used after you save it when you go back in? If it doesn't then the configuration is not saving. Which would explain why it doesn't work. Regards, Mark S.
    0

Please sign in to leave a comment.