How to Fix “Whoops, it looks like you have an invalid PHP version” in Magento

| Last Updated: | In: Magento Tutorial


Today one of my friends call me and ask about a Magento issues which are occurring on his client site. The error is “Whoops, it looks like you have an invalid PHP version. Magento supports PHP 5.3.0 or newer. Find out how to install Magento using PHP-CGI as a workaround.”. I have done some R&D to fix this issues and finally got the issue. It seems he have installed PHP 5.3 version on his client server.

magento php version error

Open the Object.php lib/Varien/Object.php and go to line number 484 and replace the below code by new code.

replace by

Open the Price.php file app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php and go to the line number 139:

replace by

After that open this file lib/Zend/Pdf/Resource/Image/Jpeg.php and go to the line number 59 and replace the below code.

replace by

Now open the below files:
index.php
downloader/index.php
downloader/Maged/Pear.php
lib/Varien/Pear.php

find the error_reporting(E_ALL | E_STRICT); and replace by error_reporting(E_ALL & E_STRICT & ~E_DEPRECATED);

After done the above changes login in your site by using the FTP client, clear the cache and then you will be able to use Magento with PHP 5.3 version.

System Requirements for Magento Enterprise Edition and Community Edition

Below are the system requirements for the Magento sites.

Magento requires a LAMP or LNMP stack

Web Server

  • Apache 2.x
  • Nginx 1.7.x
  • Database
  • MySQL 5.6 (Oracle or Percona)

PHP Version

Magento CE 1.9.2 and later, Magento EE 1.14.2 and later:

  • PHP 5.6.x
  • PHP 5.4.x
  • PHP 5.5.x

Earlier Magento versions:

  • PHP 5.4.x
  • PHP 5.5.x

Tags: , , , ,


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.


You may also like:

Get Free Access of 450+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Free WordPress Setup Service

Free WordPress Setup

Want to Setup WordPress Blog Setup? I will help you in the setup of your WordPress blog.

Click Here

Discount Coupons

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW