Jump to content

Recommended Posts

The installations immediately gives a non-described error, at 0% progress.

Any hints on how I might find out what is going on?

PrestaShop_Installation_2020-05-02 140822.png

Share this post


Link to post
Share on other sites

I found this in the access log:

83.999.999.999 - - [02/May/2020:11:53:38 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 zgrab/0.x" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET / HTTP/1.1" 200 2168 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=css HTTP/1.1" 200 4471 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=jquery HTTP/1.1" 200 85752 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=gif HTTP/1.1" 200 164107 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=js-runner HTTP/1.1" 200 4977 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=png-installer HTTP/1.1" 200 8207 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?element=font HTTP/1.1" 200 217549 "https://presta.j***e.dev/index.php?element=css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "GET /index.php?run=check-version HTTP/1.1" 500 5 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"
109.999.999.999 - - [02/May/2020:12:11:00 +0000] "POST /index.php HTTP/1.1" 500 5 "https://presta.j***e.dev/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.114 Safari/537.36" "-"

So I accessed at the installation page at 12:11.

The GETs of index.php?element all seem to work ok (status 200)

But the GET of index.php?run=check-version results in an internal server error (500).

Also, the next request, a POST to index.php results in a 500.

No further requests are performed.

(IP-adresses (999) and the domain (***) have been obfuscated, obviously)

Share this post


Link to post
Share on other sites

One step further: I learned about /var/log/php-fpm/www-error.log

This contains: Call to undefined function json_encode() in /usr/share/nginx/html/presta.j***e.dev/index.php:1247

A Google search told me I'm probably missing the php-json package.

After isntalling that and restarting the php-fpm service, I could go one step further:

The installation still fails at 0%, but now it at least explains what is wrong: "You must install PHP zip extension first"

So now I've learned that php is not just one package :) I'll go ever the the requirements again, with this extra knowledge...

Share this post


Link to post
Share on other sites

Thanks JBW!

Though some of my google searches pointed to that one as well.

My recommendation: make this a part of the installation process.

Thanks to phppsinfo.php I found out that I was missing a lot more plugins then only the json one. (Note that I found/used phppsinfo.php after adding the json plugin)

With just the json plugin the installation went a lot further: the next problem was that php-fpm could not write into the folder where index.php (installation program) was located.

From a long time ago, I knew about chmod, chown, groupadd, usermod, ... But even setting 777 on everything (with and without set-bits), changing users of both nginx and php-fpm, ... Nothing would let me write into that folder (nor another folder at another location).

And then I learned about SeLinux...

I'm installing this on a free (as in $ / €) compute instance of the Oracle Cloud. In hindsight i might have been better off with ubuntu, but i chose Oracle Linux, and it is no surprise that an enterprise ready OS-version comes with SeLinux enabled.

Anyway, there is a magic bullet that allows php-fpm to write to a folder:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
sudo restorecon -R /var/www/html

 

The result of all that is that now the installation is stuck somewhere in the DB-setup. All tables are created, and then (at 12%): 502 Bad Gateway. Clearing out the DB and restarting fails at the exact same point. I'll save that for another post.

PS

phppsinfo.php gives me all green now (except for ImageMagick and Memcached). Strangely it also gives the grean light for php-fpm version 7.4.5, even though the prestashop development page that links to that github project, has 7.4 marked in red.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More