Closed raybogman closed 8 years ago
Hi Ray! Which version of PHP7 did you use? 7.0.0 or 7.0.1? Also, exactly what command did you run? (I run the install from PHP 7.0.1 without problem.)
Alan its PHP 7.0.1
deb http://ppa.launchpad.net/ondrej/php-7.0/ubuntu trusty main deb-src http://ppa.launchpad.net/ondrej/php-7.0/ubuntu trusty main
What exactly was the command you ran? (All the command line arguments too.) Just trying to repeat your problem.
php bin/magento setup:install --db-host=localhost --db-name=magento2ce --db-user="root" --db-password="root" --backend-frontname=admin --base-url=http://yourdomain.com/ --admin-lastname=Doe --admin-firstname=John --admin-email=john@doe.com --admin-user=admin --admin-password=password123 --use-rewrites=1 --cleanup-database
Thanks Ray. I tried your command with PHP 7.0.1 and got the following.
$ php bin/magento setup:install --db-host=localhost --db-name=magento2ce --db-user="root" --db-password="root" --backend-frontname=admin --base-url=http://yourdomain.com/ --admin-lastname=Doe --admin-firstname=John --admin-email=john@doe.com --admin-user=admin --admin-password=password123 --use-rewrites=1 --cleanup-database
SQLSTATE[HY000] [2002] No such file or directory
[InvalidArgumentException]
Parameter validation failed
setup:install [--backend-frontname="..."] [--key="..."] [--session-save="..."] [--definition-format="..."] [--db-host="..."] [--db-name="..."] [--db-user="..."] [--db-engine="..."] [--db-password="..."] [--db-prefix="..."] [--db-model="..."] [--db-init-statements="..."] [-s|--skip-db-validation] [--http-cache-hosts="..."] [--base-url="..."] [--language="..."] [--timezone="..."] [--currency="..."] [--use-rewrites="..."] [--use-secure="..."] [--base-url-secure="..."] [--use-secure-admin="..."] [--admin-use-security-key="..."] [--admin-user="..."] [--admin-password="..."] [--admin-email="..."] [--admin-firstname="..."] [--admin-lastname="..."] [--cleanup-database] [--sales-order-increment-prefix="..."] [--use-sample-data] [--magento-init-params="..."]
I tried fiddling the settings (change DB name, changing passwords etc). No change. (The error message here is not very helpful to say what exactly is wrong.) Here is the command I successfully used in a script with PHP 7.0.1 in case useful
bin/magento setup:install --backend-frontname=admin \
--cleanup-database --db-host=127.0.0.1 --db-name=magento --db-user=magento --db-password=magento \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1 --use-sample-data
The head of my php -i output is as follows:
PHP Version => 7.0.1
System => Linux 3e5c2e35b277 4.1.13-boot2docker #1 SMP Fri Nov 20 19:05:50 UTC 2015 x86_64
Build Date => Dec 21 2015 19:06:52
Configure Command => './configure' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--with-apxs2' '--disable-cgi' '--enable-mysqlnd' '--with-curl' '--with-openssl' '--with-readline' '--with-recode' '--with-zlib'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc/php
Loaded Configuration File => /usr/local/etc/php/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/conf.d
Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mbstring.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mcrypt.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-xsl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
I have to go get some other work done, so I am going to leave this to the Engineering team to chase down. Just sharing where I got up to. I am almost wondering if copy/paste is sneaking some unicode hyphen in somewhere...
Ahhh... I just changed "localhost" to "127.0.0.1" and it started working I think. I remember reading something about MySQL treats "localhost" as a special string, not as a host name. So it might be something to do with the MySQL libraries causing you a problem, not PHP 7 itself. My Docker image is not doing a 'standard' thing to get MySQL installed.
Are you using Xdebug with PHP7? If yes, try to disable Xdebug and run the command again.
@mc388 no Xdebug installed only required php modules
Created internal ticket MAGETWO-47636 for investigation
@raybogman can you please add the following to your php.ini, restart server and try installing again. Please post contents of path_to_log_file
.
log_errors = On
error_log = <path_to_log_file>
I had a seg fault during the cli install due to a memory allocation issue using the php7 package from ppa:ondrej/php. However, I had previously been using php7-beta1 from http://repos.zend.com/zend-server/early-access/php7/repos just fine. I haven't had time to investigate further so I reverted to php7-beta1 from zend.
My environments can be replicated using these Dockerfiles based on an ubuntu 14.04 image: working - https://github.com/esepublic/docker-lamp-app-server/blob/0985a6fe7cfa2799593b418a97197ef839f198a7/Dockerfile seg faults - https://github.com/esepublic/docker-lamp-app-server/blob/a0724e9a7ce93d036c22eb32243686ffa6d8e937/Dockerfile
@keithbentrup why are you using php5 extensions for gd and mcrypt etc? ETA: Sorry I saw the working one first. But that is still inconsistent with some php7 mixed with php5.
These steps worked for me:
add-apt-repository -y ppa:ondrej/php-7.0
apt-get update
apt-get install -y apache2 libapache2-mod-php7.0 php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl
new PHP 7.0.2 is out
it looks like there is a core bug https://bugs.php.net/bug.php?id=71163
I am going to test it
With PHP 7.0.2 I still get the following when reindexing catalogsearch_fulltext
Segmentation fault: 11
I can't use PHP 7 and I can't use HHVM, not a good start!
@craigcarnell I get the same exact problem on php 7.0.2 on reindexing catalogsearch_fulltext Link to my Magento Stack-exchange with pictures http://magento.stackexchange.com/questions/96590/magento-2-0-with-upgraded-to-php-7-0-indexer-stuck-at-processing
@mazhalai re the php5 exts with php7-beta ... at the time, the php7-beta didn't have all the extensions and the php5 ones were compatible
Regardless, I set up a docker image were you can reproduce the problem.
docker run -it esepublic/m2-php7-install-test
(more info here: https://github.com/esepublic/docker-m2-php7-install-test)
It appears to be due to a memory allocation error (it consume all available memory) when it calls prepareProductIndex in Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php.
@kiethbentrup yes we are aware of issues in indexer on PHP7(this is a duplicate of #2750), but this thread started as Segmentation fault for install. Do you still have problems installing Magento2 on PHP7?
@raybogman any update regarding installation using PHP7? We cannot reproduce the segfault during installation.
@mazhalai yes, that's what i'm saying - the install fails with php7 and I've created a reproducible docker container here, so you can see for yourself:
docker run -it esepublic/m2-install-tests:php7-install-test
If you have docker, just run the 1 cmd, watch it all install and you'll see it fail during the install at the point that I described. Find the Dockerfile and install script (install-m2.sh) here: https://github.com/esepublic/docker-m2-install-tests/tree/php7-install-test
@keithbentrup You have sample data, did you try installing without sample data?
I'm only trying to install with sample data. I have no need for an installation without sample data at this time, but if that makes it a duplicate of #2750, then I guess it's not a separate issue.
@keithbentrup just tried with sample data, and got a segfault! It is related to indexer issue #2750.
When I install Magento2 on CentOS7 with php7, the following error display:
[Progress: 317 / 362] Module 'Magento_CatalogSampleData': Installing data.. Segmentation fault
My php7's info:
PHP 7.0.2 (cli) (built: Jan 6 2016 15:25:31) ( NTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans
Hi there!
I'm experiencing this problem as well since I switched from the PHP7 version I built from source to the package provided Ondřej Surý for Ubuntu (ondrej/php-7.0).
I used to compile PHP7 with the following options:
--prefix=/usr/local --enable-soap --enable-bcmath --with-mcrypt --with-xsl --enable-mbstring --with-curl --with-gd --with-jpeg-dir --with-png-dir --enable-intl --enable-fpm --with-openssl --with-pdo-mysql --with-mysql-sock=/var/run/mysqld/mysqld.sock --enable-zip --with-zlib --with-zlib-dir
ondrej/php-7.0 was built with the following options:
--includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --with-config-file-path=/etc/php/7.0/cli --with-config-file-scan-dir=/etc/php/7.0/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --libdir=/usr/lib/php --libexecdir=/usr/lib/php --datadir=/usr/share/php/7.0 --program-suffix=7.0 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-bcmath --enable-calendar --enable-ctype --enable-dba --with-db4=/usr --without-gdbm --with-qdbm=/usr --enable-inifile --enable-flatfile --enable-dom --enable-exif --with-gettext=/usr --enable-fileinfo --enable-filter --enable-ftp --enable-hash --with-iconv --with-pcre-regex=/usr --enable-mbregex --enable-mbregex-backtrack --enable-mbstring --enable-phar --enable-posix --enable-mysqlnd-compression-support --with-zlib-dir=/usr --with-openssl=yes --enable-libxml --enable-session --enable-simplexml --enable-soap --enable-sockets --enable-tokenizer --enable-xml --enable-xmlreader --enable-xmlwriter --with-mhash=yes --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-zip --with-system-tzdata --enable-dtrace --enable-pdo --enable-mysqlnd --enable-pcntl --with-libedit=shared,/usr build_alias=x86_64-linux-gnu host_alias=x86_64-linux-gnu CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -O2 -Wall -fsigned-char -fno-strict-aliasing -g LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro CPPFLAGS=-D_FORTIFY_SOURCE=2 CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
@cedricblondeau
while (0 > 1) {
}
Evaluates to false, so the loop never starts and causes catalogsearch_fulltext
index to be empty.
@ishakhsuvarov My bad!
@all PHP7 issues have been fixed in tag 2.0.1 Please have a look and let us know if your issue has been fixed.
@mazhalai Well done :+1:
Closing this issue, please reopen if it persists.
I still get a Segmentation fault with Magento 2.0.1 on PHP7.0.0, when running the setup:di:compile command:
Not sure, if this is a PHP or Magento problem...
Upgrade your PHP version, I believe this was fixed in 7.0.3 or even 7.0.4.
I also have this problem on PHP 7.0.4. Magento 2.0.2. It also fails on the first 14% somewhere. See referenced issue above. If I take out that library, it continues beyond the 14%.
I get this segfault when installing from git.
The last lines in the compile are: Installing PEAR environment: /usr/local/lib/php/ Makefile:455: recipe for target 'install-pear-installer' failed make[1]: *\ [install-pear-installer] Segmentation fault (core dumped) Makefile:458: recipe for target 'install-pear' failed
What further is needed to diagnose and fix this problem?
I was using php 7.1.0-alpha and got the same issue, then I upgraded to 7.1.0-beta it started working fine. It's really the php problem
I'm experiencing a similar issue on php version 7.0.8 with a CE installation of Magento 2.1
php bin/magento setup:di:compile
Compilation was started.
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 46. 0 MiBPHP Fatal error: Class 'Magento\Braintree\Controller\Paypal\AbstractAction' not found in /chroot/home/amritanu/amritanutrition.uat.quba.co.uk/html/vendor/ma gento/module-braintree/Controller/PayPal/PlaceOrder.php on line 18
Segmentation fault
Can anyone offer any help? This is preventing me from setting the mode to production on our server.
Thanks,
Sophie
There is a PHP7-CLI bug when running the install via the shell
Segmentation fault (core dumped)
I tested it in CE and EE 2.0
when switching to PHP5.6-CLI everthing works. It's only during installation, no other issue in PHP7 so far