Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal after sylius/console sylius:install --fixtures #32

Closed
netandreus opened this issue Apr 12, 2013 · 16 comments
Closed

Fatal after sylius/console sylius:install --fixtures #32

netandreus opened this issue Apr 12, 2013 · 16 comments
Labels
Potential Bug Potential bugs or bugfixes, that needs to be reproduced.

Comments

@netandreus
Copy link

After sylius/console sylius:install --fixtures
get an error:
...
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/assets/compiled/backend_backend_3.css
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/js/b7d7eda.js
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/js/b7d7eda_sylius-property-choices_1.js
Careful, database will be purged. Do you want to continue Y/N ?Y

purging database
loading [1] Sylius\Bundle\CoreBundle\DataFixtures\ORM\LoadPromotionsData
loading [1] Sylius\Bundle\CoreBundle\DataFixtures\ORM\LoadCountriesData
PHP Fatal error: Class 'ResourceBundle' not found in /home/andrey/sandbox/sylius.loc/sylius/vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php on line 51

After going to hyttp://sylius.loc/ got blank page. Turning on errors_reporing in index.php changes nothing.

andrey@z11:~/sandbox/sylius.loc/sylius$ php -v
PHP 5.4.6-1ubuntu1.2 (cli) (built: Mar 11 2013 14:57:54)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.

@decoder1
Copy link

+1

@pjedrzejewski
Copy link
Member

Do you have intl installed? What locale have you set in parameters.yml it happens with en too?

@netandreus
Copy link
Author

My locale is "en". Intl isn't installed.

php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
ionCube Loader
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
the ionCube PHP Loader

@ekyna
Copy link
Contributor

ekyna commented Apr 24, 2013

Got the same problem with <intl> installed and locale set to <en> :s

@ghost
Copy link

ghost commented Apr 26, 2013

@ekyna: it's likely that your installed ICU version doesn't match the version in the Locale component. This won't be properly fixed until symfony 2.3 which will support multiple ICU data files (not sure how) to match various ICU versions.

A quick fix is to go into vendor/symfony/symfony/src/Component/Locale/Locale.php and change

const ICU_DATA_VERSION to match your installed ICU version.

NOTE: just use the major and minor version like 4.2 (not 4.2.1)

then go into vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/data/

and run:

php build-data.php <your ICU version>

you can discover your ICU version by running:

icu-config --version

@pjedrzejewski
Copy link
Member

Thanks @jrobeson - most probably that's the issue.

@amitris
Copy link

amitris commented May 9, 2013

i had the same problem and i didn't find any solution, if someone can give me the database generated with the command sylius:install --fixtures (sql file)

@ghost
Copy link

ghost commented May 9, 2013

@amitris : i just gave the solution.

@ekyna
Copy link
Contributor

ekyna commented May 9, 2013

Thank you @jrobeson.
I didn't managed to get this working (cause i'm on windows and it's hard to get all the depencies working well).
I should probably look for vagrant/virtualbox ...

@antonellopasella
Copy link

On OSX I can't have icu-config installed? Any suggestion?

brew install icu4c
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/icu4c-50.1.mountain_lion.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring icu4c-50.1.mountain_lion.bottle.2.tar.gz
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

Conflicts; see: https://github.com/mxcl/homebrew/issues/issue/167

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS:  -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include

==> Summary

No icu-config and still the same error as above

@dyjo
Copy link

dyjo commented May 24, 2013

@antonellopasella This probably isn't the instant fix you're looking for, but on Mac it has made my life much easier to use Vagrant (and automated provisioning if you can find it; I've got a poorly documented Sylius repo you can try: https://github.com/Eponymi/sylius-sys).

If nothing else, Vagrant affords you the ability to use a Linux package manager instead of Homebrew, which has caused me all kinds of headaches in the past.

@OzzieOrca
Copy link

How great is the requirement for lib-icu? I have had trouble installing Sylius on shared hosting because they don't have icu installed. I know GoDaddy isn't a very good host but I would think someone would want to set up a small store using shared hosting such as GoDaddy. It doesn't have icu installed and doesn't even have make. There might be some way to get it installed but it would not be easy for someone who doesn't have lots of experience with linux. Also I have BlueHost and had to manually install php lib-icu using pecl. It had icu installed but it is only version 4.2.1. I haven't tried the above method to change the version needed yet since at the time I hadn't found this thread.

I'm sure the international features are used in tons of places in Sylius and it would be hard to bypass them. Maybe the aim of Sylius is for larger businesses who would have their own servers or use vps hosting but it would be nice to install Sylius on any server and have it work. Is there any way for Sylius to not need lib-icu, especially if there are no plans for creating an international store?

I have found it very inconvenient to get it working on shared hosting due to the requirement for lib-icu. Maybe I have not been looking at very good web hosts. What do you guys think and is there any way to address this?

Sorry if this is not the best place to ask this but Google Groups and StackOverflow don't seem very active. I know you guys are trying to focus on writing code so feel free to ignore this if it is too specific to address but I would like to be able to use Sylius for some of my projects and would like to see Sylius usable by anyone and not force people to pay for more expensive hosting just for this feature.

@OzzieOrca
Copy link

Maybe I started assuming too much. I found http://symfony.com/doc/current/components/intl.html which seems to indicate that you can require a certain version of symfony/icu to deal with servers with icu <= 4.2 and servers without the intl extension installed. Idk if I'm on the right track but I'll try it.

@Eponymi
Copy link
Contributor

Eponymi commented Jul 3, 2013

@OzzieOrca It would be nice to use Symfony (and, by extension, Sylius) on popular shared hosting providers. But that is dependent on the hosts providing the requisite software to run Symfony (many have outdated versions of PHP itself, or, as you've seen, extensions of PHP). Right now, many shared hosts seem hesitant to offer that required software.

I'd recommend using a host where you can provision your own servers. You can get an AWS micro EC2 instance for free for a year. Granted, it is not optimal for running Symfony, but you can make it work. After a year, hopefully the principal of your web store will have VPS in their budget.

@OzzieOrca
Copy link

I got it to work on Bluehost finally. Here's what I did if anyone has the same problem:
http://stackoverflow.com/questions/17458978/how-do-i-install-sylius-on-bluehost-or-any-other-server-that-has-an-old-version

But ya you have a valid point about web stores should be generating enough revenue to pay for a good VPS server.

pjedrzejewski pushed a commit that referenced this issue Aug 26, 2013
add check if cart exists without creating a new one
pjedrzejewski pushed a commit that referenced this issue Aug 26, 2013
pjedrzejewski pushed a commit that referenced this issue Aug 26, 2013
fix order number generator
pjedrzejewski pushed a commit that referenced this issue Aug 29, 2013
add check if cart exists without creating a new one
pjedrzejewski pushed a commit that referenced this issue Aug 29, 2013
fix order number generator
pjedrzejewski pushed a commit that referenced this issue Aug 29, 2013
@pjedrzejewski
Copy link
Member

I think we can close this. We should be more clear about the ICU/Intl requirement.

pamil referenced this issue in pamil/Sylius Mar 21, 2016
CoderMaggie pushed a commit to CoderMaggie/Sylius that referenced this issue Jun 1, 2016
[CJMAX-29] Payment list page integration + Paypal configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug Potential bugs or bugfixes, that needs to be reproduced.
Projects
None yet
Development

No branches or pull requests

9 participants