cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

SOLVED

Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

Pulled Magento code from my Client's repository, previously i have worked in the code build, it was worked fine, but now recently i switched my machine and again pulled code from Git, Now i tried to run my localhost url it simply says 

 

Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found in /var/www/html/MyProjectName/vendor/zendframework/zend-http/src/PhpEnvironment/Request.php:251 Stack trace: #0 /var/www/html/MyProjectName/vendor/zendframework/zend-http/src/PhpEnvironment/Request.php(84): Zend\Http\PhpEnvironment\Request->setServer(Object(Zend\Stdlib\Parameters)) #1 /var/www/html/MyProjectName/vendor/magento/framework/HTTP/PhpEnvironment/Request.php(133): Zend\Http\PhpEnvironment\Request->__construct() #2 /var/www/html/MyProjectName/vendor/magento/framework/App/Request/Http.php(115): Magento\Framework\HTTP\PhpEnvironment\Request->__construct(Object(Magento\Framework\Stdlib\Cookie\PhpCookieReader), Object(Magento\Framework\Stdlib\StringUtils), NULL) #3 /var/www/html/MyProjectName/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\App\Request\Http->__construct(Object(Magento\Framework\Stdlib\Cookie\PhpCookieReader), Object(Magento\Framework\Stdlib\StringUtils), Object(Magento\Framework\App\Route in /var/www/html/MyProjectName/vendor/zendframework/zend-http/src/PhpEnvironment/Request.php on line 251

 

Cleared Composer cache, Deleted composer.lock file and run composer install/update. Nothing works.

 

Compared zendframework folders with another magento 2.2.4 same installation everything matches perfectly but nothing works in this project alone. Please help us to resolve this issue, In case if any details needed for this topic, please reply as well as.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

Hello @rbalamuruga 

 

For your issue it seems you are missing library files

can you check at the path vendor/magento/zendframework1/library/Zend/Uri/Http.php file exists or not.

View solution in original post

5 REPLIES 5

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

Hello @rbalamuruga 

 

For your issue it seems you are missing library files

can you check at the path vendor/magento/zendframework1/library/Zend/Uri/Http.php file exists or not.

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

@rbalamurugaDid you check the PHP version? Is it compatible with the Magento 2.2.4?

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4


@shikha1193 wrote:

Hello @rbalamuruga 

 

For your issue it seems you are missing library files

can you check at the path vendor/magento/zendframework1/library/Zend/Uri/Http.php file exists or not.


Hello @shikha1193 

In my Magento Project Directory I've this Http.php file in the following directory, vendor/magento/zendframework1/library/Zend/Uri/Http.php, Similarly it seems what you said, that i cleared composer cache and Initiates re download of magento vendor modules, then the issue get sorted out. Thanks for your comment.

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4


@Tarandeep Singh wrote:

@rbalamurugaDid you check the PHP version? Is it compatible with the Magento 2.2.4?

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.


Hello @Tarandeep Singh Checked the magento version it is 2.2.4 and my php Version is 7.0.33. Which is compatible as it was mentioned in dev docs of Magento.

Re: Fatal error: Uncaught Error: Class 'Zend\Uri\Http' not found - Magento 2.2.4

Hello @rbalamuruga 

You have not installed the zend-uri package in your project. So you have follow the link to installation process.

OR

Run the following command in your project root directory.

$ composer require zendframework/zend-uri