cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 and PHP 7 (Autoload Error)

SOLVED

Magento 2 and PHP 7 (Autoload Error)

Hello,

 

I try to install a magento 2 on a server with php 7.0.0.

When I go to www.example.com/setup I see this error :

 

AutoLoad Error

glob() returned error while searching in '/var/www/.../app/code/*/*/cli_commands.php'

 

I saw this error on the forum, and all people say to use php 5.6.

So it means like magento 2 can't be run with php 7 ? I need to delete php 7 and put php 5.6 ?

 

Thank you.

 

Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2 and PHP 7 (Autoload Error)

Hello,

 

I found the problem for me. I used a web panel on my dedicated server and I remove this panel and it works.
The problem come from this panel who create and managed all permissions. My user doesnt have the correct permission to execute some function or command line.

 

Have a good day.

View solution in original post

3 REPLIES 3

Re: Magento 2 and PHP 7 (Autoload Error)

In my experience, yes. Even PHP 7.0.2 seems to not be stable enough.

 

I would suggest either using PHP 5.6 or waiting a few weeks when hopefully an updated version of Magento 2 will be available and PHP 7.0.3. Both Magento 2 and PHP 7 are so new that they are not really suited to a production environment IMHO.

Re: Magento 2 and PHP 7 (Autoload Error)

Thank you Darren.

 

In fact I want to try and work with Magento 2 on a server with php 7.

So I install and enable php 5.5.9 (as you mentionned) with nginx 1.8 and I have the same issue ...

 

glob() returned error while searching in '/var/www/.../web/app/code/*/*/cli_commands.php'

 

But I try php 5.5.9 with nginx 1.8 for a wordpress and it works.

And I try php 7.0.0 with nginx 1.8 for this wordpress and it works !

I can visit the website, go to backend, save post and modify some pages.

 

So maybe for magento 2 there is some configuration into php before to launch it ? Even in php 5.5.9 ?

 

Thank you.

 

Best regards.

Re: Magento 2 and PHP 7 (Autoload Error)

Hello,

 

I found the problem for me. I used a web panel on my dedicated server and I remove this panel and it works.
The problem come from this panel who create and managed all permissions. My user doesnt have the correct permission to execute some function or command line.

 

Have a good day.