View Issue Details

IDProjectCategoryView StatusLast Update
0006616OXID eShop (all versions)6. ------ Setup -------public2017-04-10 15:58
Reporterd3 Assigned To 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
Product Version6.0.0-beta.3 
Summary0006616: Installation could not completed
Descriptionafter following the instructions from https://github.com/OXID-eSales/oxideshop_ce/tree/v6.0-beta.3 , i wasn't able to set up oxid V6 beta3 (PHP 7.0.11).

I started the setup in the browser, entered all informations and stuck in step 5 with the messages:
oxideshop_ce/vendor/oxid-esales/eshop-facts/oe-eshop-facts_helper: line 6: -r: command not found.

The bash file
vendor/oxid-esales/eshop-facts/oe-eshop-facts_helper
requires in Line 6 "ESHOP_PHP_BIN_PATH" which is not defined.
Additional InformationEditor KH
TagsNo tags attached.
Attached Files
oxidv6.3.PNG (53,302 bytes)   
oxidv6.3.PNG (53,302 bytes)   
ThemeNot defined
BrowserNot defined
PHP VersionOther
Database Version5.6

Activities

d3

2017-04-05 11:45

reporter   ~0012017

please take a look at the comment section:
https://oxidforge.org/en/oxid-eshop-v6-0-0-beta3-is-published.html

QA

2017-04-05 14:01

administrator   ~0012018

Kindly provide the OS platform used. This will help to analyse the problem better.

Also execute the following command inside the shop directory where source/ and vendor/ are present and send us the output:
VERBOSE=1 vendor/bin/oe-eshop-facts oe-eshop-db_migrate

d3

2017-04-05 16:08

reporter   ~0012019

Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-92-generic x86_64)
on a virtual machine via Virtual Box

PHP 7.0.11 (cli) (built: Sep 15 2016 15:57:52) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.11, Copyright (c) 1999-2016, by Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

Is this enough?

KH

d3

2017-04-05 16:10

reporter   ~0012020

output of "VERBOSE=1 vendor/bin/oe-eshop-facts oe-eshop-db_migrate":
Variables from: "oe-eshop-facts"
        ESHOP_PHP_BIN_PATH: /home/vagrant/phpfarm/inst/current-bin/php
        ESHOP_FACT_BIN_PATH: /home/vagrant/shared_folder/oxideshop_ce/vendor/oxid-esales/eshop-facts/oe-eshop-facts
        ESHOP_FACT_BASEDIR: /home/vagrant/shared_folder/oxideshop_ce/vendor/oxid-esales/eshop-facts
        ESHOP_SOURCE_PATH:
        ESHOP_BOOTSTRAP_PATH:
        ESHOP_CONFIG_PATH:
        ESHOP_VENDOR_PATH:
        ESHOP_VENDOR_BIN_PATH: /bin
        ESHOP_VENDOR_NAME: oxid-esales
        ESHOP_OXID_VENDOR_PATH:

Script "oe-eshop-db_migrate" was not found. Possible candidates:

edvinas.aleksejonokas

2017-04-06 10:03

reporter   ~0012021

The bash line which seems to cause problems in this case can be found at:

https://github.com/OXID-eSales/eshop-facts/blob/c143bdd10a49e0cf7a19f64e4673182ea7fc1327/oe-eshop-facts_helper#L6

This line uses the detected PHP binary to execute a function. If it fails to detect the PHP binary, it will produce the output similar to the given in the attached screen shot. In order to simulate the problem it's possible to override the environment variable responsible for the path of PHP binary, e.g.

vagrant@oxideshop:/var/www/oxideshop$ ESHOP_PHP_BIN_PATH=' ' vendor/bin/oe-eshop-facts some_command
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 26: -r: command not found
vendor/bin/oe-eshop-facts_helper: line 6: -r: command not found

Now the real question would be why it fails to detect the PHP binary? The method which is used to detect the PHP binary is described here: https://github.com/OXID-eSales/eshop-facts/blob/ebc6457fed026f106f1ba5be6399128d1a64c918/oe-eshop-facts#L19 In other words it just uses the command "which" to get the full path to the PHP executable. If the PHP executable is not present in the system's PATH environment variable (under the user which is used for the apache/nginx process) than it will fail to detect the PHP binary.

Could you please verify this by executing:
sudo -u user_name_used_for_web_server '/bin/bash' -c export | grep PATH

And verify if the PHP executable could be located in any of the given paths?

d3

2017-04-06 10:32

reporter   ~0012022

> sudo -u vagrant '/bin/bash' -c export | grep PATH
Output:
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/vagrant/phpfarm/inst/bin:/home/vagrant/phpfarm/inst/current-bin"

which php gives this output:
/home/vagrant/phpfarm/inst/current-bin/php

KH

edvinas.aleksejonokas

2017-04-06 10:37

reporter   ~0012023

Could you also verify that apache user is indeed 'vagrant' ?
One quick way to find this out would be:

ps aux | grep apache2

d3

2017-04-06 10:42

reporter   ~0012024

The output is this:
vagrant 1742 0.0 0.0 11752 912 pts/0 S+ 10:42 0:00 grep --color=auto apache2

edvinas.aleksejonokas

2017-04-06 10:50

reporter   ~0012025

This output only indicates that either the apache process has not been started yet, or it uses a different executable as name.

Other ways to detect the user could be:

1) Create a script, let's say 'get_user.php' and place the following content:
---
<?php
echo get_current_user();
---
2) Locate the 'envvars' file of apache2 package (e.g. on our VM it's /etc/apache2/envvars, but on different systems it could be placed in different location) and have a look at variables APACHE_RUN_USER.

I guess the method 1) will be more universal as it does not require knowledge about the place where apache has been installed.

d3

2017-04-06 10:57

reporter   ~0012026

sry, i use ngnix on my vm
> ps aux | grep ngnix
vagrant 1749 0.0 0.0 11752 908 pts/0 S+ 10:46 0:00 grep --color=auto ngnix

d3

2017-04-06 11:01

reporter   ~0012027

1) outputs vagrant

edvinas.aleksejonokas

2017-04-06 11:21

reporter   ~0012028

Unfortunately nginx is not supported and our system requirements has listed apache as a possible candidate for a web server. Please have a look at our system requirements page for further details: https://oxidforge.org/en/oxid-eshop-v6-0-0-beta-system-requirements.html

d3

2017-04-06 15:22

reporter   ~0012030

What is the context between shell script an http server?

Alpha-Sys

2017-04-06 16:39

reporter   ~0012031

I'm getting the same error with apache and php 5.6 on my local dev environment (MAC). So it's not a problem with nginx.

d3

2017-04-10 15:49

reporter   ~0012037

sudo ln -s /path/to/php /usr/bin/php
solved this for me

QA

2017-04-10 15:58

administrator   ~0012038

Last edited: 2017-04-10 15:58

~0012029 - Closing the issue