elcodi / bamboo

Meet Bamboo, an e-commerce project built on top of Elcodi and Symfony. Give us a star to support our project :)
http://bamboo.elcodi.com
MIT License
198 stars 44 forks source link

Issues when installing Bamboo/Elcodi #602

Closed javiereguiluz closed 8 years ago

javiereguiluz commented 8 years ago

I'm testing the installation instructions provided by the shiny new Elcodi.io website. Sadly I've found some issues.


1) composer create-project elcodi/bamboo bamboo -sdev

No problem. Everything works great.


2) php app/console elcodi:install

Queries are correctly executed.

Then, fixtures are loaded:

> purging database
  > loading Elcodi\Fixtures\DataFixtures\ORM\Rule\RuleData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Category\CategoryData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Category\ManufacturerData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Menu\MenuData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Page\PageData
  > loading Elcodi\Fixtures\DataFixtures\ORM\AdminUser\AdminUserData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Attribute\AttributeData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Address\AddressData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Zone\ZoneData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Language\LanguageData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Currency\CurrencyData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Tax\TaxData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Store\StoreData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Coupon\CouponData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Customer\CustomerData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Product\ProductData
  > loading Elcodi\Fixtures\DataFixtures\ORM\Rates\RatesData
  > loading Elcodi\Plugin\CustomShippingBundle\DataFixtures\ORM\CarrierData

And then these errors happen:

[Elcodi] Country ES not installed

[elcodi] Command started at Wed, 14 Oct 2015 18:06:33 +0200

  [Doctrine\DBAL\DBALException]
  An exception occurred while executing 'SELECT t0.namespace AS namespace_1, t0.hash AS hash_2, t0.type AS type_3, t0.category AS category_4, t0.enabled AS enabled_5, t0
  .plugin_configuration AS plugin_configuration_6 FROM plugin t0':
  Warning: Error while sending QUERY packet. PID=11773

  [Symfony\Component\Debug\Exception\ContextErrorException]
  Warning: Error while sending QUERY packet. PID=11773

Then everything works again:

elcodi:plugins:load

Installing assets as hard copies.
Installing assets for Elcodi\Admin\CoreBundle into web/bundles/admincore
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for JMS\TranslationBundle into web/bundles/jmstranslation
Installing assets for Elcodi\Bundle\MetricBundle into web/bundles/elcodimetric
Installing assets for Elcodi\Store\ProductBundle into web/bundles/storeproduct
Installing assets for Elcodi\Store\GeoBundle into web/bundles/storegeo
Installing assets for Elcodi\Admin\GeoBundle into web/bundles/admingeo
Installing assets for Elcodi\Plugin\GoogleAnalyticsBundle into web/bundles/elcodigoogleanalytics
Installing assets for Elcodi\Plugin\PinterestBundle into web/bundles/elcodipinterest
Installing assets for Elcodi\Plugin\ProductCsvBundle into web/bundles/elcodiproductcsv
Installing assets for Elcodi\Plugin\StoreSetupWizardBundle into web/bundles/elcodistoresetupwizard
Installing assets for Elcodi\Plugin\DisqusBundle into web/bundles/elcodidisqus
Installing assets for Elcodi\Plugin\TwitterBundle into web/bundles/elcoditwitter
Installing assets for Elcodi\Plugin\FacebookBundle into web/bundles/elcodifacebook
Installing assets for Elcodi\Plugin\StoreTemplateBundle into web/bundles/storetemplate
Installing assets for Elcodi\Plugin\PaypalWebCheckoutBundle into web/bundles/elcodipaypalwebcheckout
Installing assets for Elcodi\Plugin\FreePaymentBundle into web/bundles/elcodifreepayment
Installing assets for Elcodi\Plugin\StripeBundle into web/bundles/elcodistripe
Installing assets for Elcodi\Plugin\CustomShippingBundle into web/bundles/elcodicustomshipping
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution

But after that, more errors:

  [Doctrine\DBAL\Exception\DriverException]
  An exception occurred while executing 'SELECT t0.namespace AS namespace_1, t0.hash AS hash_2, t0.type AS type_3, t0.category AS category_4, t0.enabled AS enabled_5, t0
  .plugin_configuration AS plugin_configuration_6 FROM plugin t0 WHERE t0.namespace = ? LIMIT 1' with params ["Elcodi\\Plugin\\StripeBundle\\ElcodiStripeBundle"]:
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

  [PDOException]
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [--] [<write_to>]

[elcodi] Command finished in 30410 milliseconds
[elcodi] Max memory used: 65011712 bytes

3) When I run the server and browse the given URL, I get this error message:

elcodi_error

EmanueleMinotto commented 8 years ago

@javiereguiluz probably memory usage needs a more in depth investigation, can you try the (not yet) documented way using Vagrant? Just do a vagrant up from the vagrant/ subdirectory and once completed you should see it from http://10.10.10.10/app_dev.php/

javiereguiluz commented 8 years ago

@EmanueleMinotto sorry, no Vagrant for me.

novadaemon commented 8 years ago

The same error happened to me right now (10/2/2015)

mmoreram commented 8 years ago

@novadaemon

Hmmm, wow, same one? Can you provide us a little bit of your environment?

Thanks :)

javiereguiluz commented 8 years ago

@mmoreram I forgot to mention that my environment is Mac OS X and this is the PHP version:

$ php -v
PHP 5.6.2 (cli) (built: Oct 19 2014 15:53:04)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with blackfire v1.6.0, https://blackfire.io, by Blackfireio Inc.
novadaemon commented 8 years ago

@mmoreram My environment: Windows 10 x64, WampServer Version 2.5 PHP 5.5.12 (cli) (built: Apr 30 2014 11:20:58) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

First error happen with paths to fixtures: [InvalidArgumentException] Could not find any fixtures to load in:

Then: [Elcodi] Country ES not installed

and after: [Elcodi\Component\Store\Exception\StoreNotFoundException] Store not found.

I install the fixtures manually, but the below exception show when I go to http://localhost:8000 FatalErrorException in appDevDebugProjectContainer.php line 9070: Error: Call to a member function getFieldValue() on a non-object

mmoreram commented 8 years ago

Oh, different environments... than makes it more difficult. Okay, I will take care of that tomorrow morning.

Thank you guys! :)

novadaemon commented 8 years ago

@mmoreram Thanks a lot.

rodrigoriera commented 8 years ago

Hi, I just ran into the same problem on my mac and I got a quick solution for this. With the mysql CLI go and set the max allowed size to a bigger size :

mysql> set global max_allowed_packet=1024_1024_16; (In my case).

and then just give it more memory to the php command.

php -d memory_limit={limit}M app/console elcodi:install.

Hope this helps !

axelvnk commented 8 years ago

This should be closed I think, install command is working fine now.

Although installing the fixtures manually still causes mysql exceptions on my end. Currency USD is added twice for some reason and gives an error on primary key constraint. Maybe a separate issues should be made and this one closed.

rodrigobb commented 8 years ago

Same issue here. Very similar output than @javiereguiluz. And I'm also in Mac OS X

$ php -v
PHP 5.5.29 (cli) (built: Sep  6 2015 20:20:34)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

@rodrigoriera workaround also worked for me. Btw, my package limit prior was

mysql> SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+---------+
| Variable_name      | Value   |
+--------------------+---------+
| max_allowed_packet | 4194304 |
+--------------------+---------+
1 row in set (0,00 sec)
castler commented 8 years ago

+1 here.

Windows 8.1 Pro

Using XAMPP:

PHP 7.0.1 (cli) (built: Dec 16 2015 13:36:30) ( ZTS ) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans

@mmoreram do you have an idea what the problem could be?

mmoreram commented 8 years ago

I've investigated a little bit about this, and seems that the @rodrigoriera answer is the right one.

Hi, I just ran into the same problem on my mac and I got a quick solution for this.
With the mysql CLI go and set the max allowed size to a bigger size :

mysql> set global max_allowed_packet=1024102416; (In my case).

and then just give it more memory to the php command.

php -d memory_limit={limit}M app/console elcodi:install.

Hope this helps !

would be nice if this question is indexed in stackoverflow :)

Closing it.

fabirus commented 8 years ago

hello i tried your solution but i have this error everytime my command is php -d memory_limit=100M app/console elcodi:install. PHP Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 12288 bytes) in /opt/lampp/htdocs/testEcommerce/bamboo/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php on line 482

axelvnk commented 8 years ago

@fabirus why would you execute it with less memory than default. Try with 256M.

fabirus commented 8 years ago

the same problem.. i used ubuntu with lampp error message [Doctrine\DBAL\Exception\DriverException] An exception occurred while executing 'SELECT t0.iso AS iso_1, t0.name AS n ame_2, t0.enabled AS enabled_3 FROM language t0 WHERE t0.enabled = ?' with params [1]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away [Doctrine\DBAL\Driver\PDOException] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away [PDOException] SQLSTATE[HY000]: General error: 2006 MySQL server has gone away [elcodi] Command finished in 107305 milliseconds [elcodi] Max memory used: 82575360 bytes

fabirus commented 8 years ago

i get the solution bad config with mysql

thanks you!!!

ufhy commented 8 years ago
[Doctrine\DBAL\Exception\DriverException]
  An exception occurred while executing 'INSERT INTO zone (name, code, locations, created_at, updated_at, e
  nabled) VALUES (?, ?, ?, ?, ?, ?)' with params ["C\u00f3rdoba", "\x63\xb3\x72\x64\x6f\x62\x61", "ES_an_co
  ", "2016-03-21 10:25:18", "2016-03-21 10:25:18", 1]:
  SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xB3rdoba' for column 'code' at row 1

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xB3rdoba' for column 'code' at row 1

  [PDOException]
  SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xB3rdoba' for column 'code' at row 1
ostark commented 8 years ago

Similar error here (local Mysql 5.5 (Mac) and remote Mysql 5.6 (RDS))

  [Doctrine\DBAL\Exception\DriverException]                                                                                                                          
  An exception occurred while executing 'SELECT t0.iso AS iso_1, t0.name AS name_2, t0.enabled AS enabled_3 FROM language t0 WHERE t0.enabled = ?' with params [1]:  
  SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

set global max_allowed_packet=500000000; solved it