magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

php readiness check fail

Open dcthelord opened this issue 11 years ago • 12 comments

Hi, I'm facing the following issue the installation: In the readiness check, the setup fails all 3 php tests. It says "Your PHP version is . The required PHP version is . " (no version number shows). See screenshots below.

I'm using the latest xampp. php version (5.6.12) shows correctly in phpinfo.php

I'm installing in xampp (win 7) with sample data. 'composer update' gives no error.

Screenshots: 01 readiness-check 02 phpinfo 03 composer

dcthelord avatar Oct 17 '15 10:10 dcthelord

@dcthelord do you have the latest from the develop branch?

mazhalai avatar Oct 19 '15 13:10 mazhalai

@mazhalai : Yes, I do. It was synced the same day I posted the issue. I also synced it right now. Still, same issue. I am more interested in merchant layout. I noticed the 'merchant beta' after your comment. Should I try changing it to that?

dcthelord avatar Oct 19 '15 20:10 dcthelord

@dcthelord, develop has the latest code. On your browser, there should be an option for developer tools. Can you please enable that and post a screen-shot of the "network" tab.

mazhalai avatar Oct 19 '15 21:10 mazhalai

@mazhalai, Is this what is needed? 01 is regular. 02 is with cache disabled.

Also, for some reason, during the screenshot runs, the check was getting stuck on 1 or the other checks. Happened a few times before I got a clean run.

01 02

dcthelord avatar Oct 19 '15 21:10 dcthelord

@dcthelord can you post the json response?

mazhalai avatar Oct 20 '15 17:10 mazhalai

@mazhalai I'm sorry, but I'm not sure how to do that. I googled it a bit and found I have to enter the following: public function indexAction() { $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true); $this->getResponse()->setBody(json_encode($response)); }

Is this code correct? And where should I enter this code? In the console? And how to extract the response?

I'm sorry for asking this type of question in developer forum, but I have very basic programming knowledge.

dcthelord avatar Oct 20 '15 18:10 dcthelord

@dcthelord Hi. If you click on any item on the list under the "network" tab you will see something like this: screen shot 2015-10-20 at 2 42 15 pm Please click on the "Response" tab then you will see the JSON response (if any).

eddielau avatar Oct 20 '15 19:10 eddielau

@eddielau : Thank you so much. The 3 php tabs had the same warning:
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in Unknown on line 0

The json responses are: php-version: {"responseType":"success","data":{"required":"~5.5.0|~5.6.0|~7.0.0","current":"5.6.12"}}

php-settings: {"responseType":"success","data":[]}

php-extensions: {"responseType":"success","data":{"required":["ctype","gd","spl","dom","simplexml","mcrypt","hash","curl","iconv","intl","xsl","mbstring"],"missing":[]}}

file-permissions: {"responseType":"success","data":{"required":["G:/xampp/htdocs/magento2/app/etc","G:/xampp/htdocs/magento2/var","G:/xampp/htdocs/magento2/pub/media","G:/xampp/htdocs/magento2/pub/static"],"current":["G:/xampp/htdocs/magento2/app/etc","G:/xampp/htdocs/magento2/var","G:/xampp/htdocs/magento2/pub/media","G:/xampp/htdocs/magento2/pub/static"]}}

The php.ini file in the main folder is not there. sample file is there. If I'm not mistaken, doesn't it get created during this setup?

dcthelord avatar Oct 20 '15 19:10 dcthelord

@dcthelord that helps, please follow instructions in the deprecated section, edit your php.ini and set always_populate_raw_post_data to -1. We do have an internal ticket MAGETWO-40303 for this issue

mazhalai avatar Oct 20 '15 20:10 mazhalai

@mazhalai @eddielau : Thank you so much guys. This solved the problem.

dcthelord avatar Oct 20 '15 20:10 dcthelord

Just write into your composer.json file, inside "require" section an required php version like: "php": "~7.1.0",

thomaszoeger avatar May 11 '18 21:05 thomaszoeger

Just write into your composer.json file, inside "require" section an required php version like: "php": "~7.1.0",

You replied to a very old issue which was already closed ;)

DanielRuf avatar May 11 '18 21:05 DanielRuf