I have been trying to get Sylius installed on my Bluehost server which is running on shared hosting and while I do have SSH access, it is somewhat limited. It did not come with the php intl extension and the version of ICU on it is 4.2 which produces errors when installing Sylius because it wants a newer version.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Try this:
I tried this on a clean install of Sylius on my Bluehost server and got it to work.
I had previously installed the
intl
extension on my BlueHost server following https://my.bluehost.com/cgi/help/534The
intl
extension is not required. See below. (I was attempting to install it before I realized I didn't need it)After installing the extension, phpinfo() said the version of ICU was 4.2.
Note: on BlueHost you have to use
php-cli
instead ofphp
to run php scripts from the command lineTo install Sylius I ran:
When running create-project, I recieved the error:
I then used
cd sylius
to move into the new directory made from the partial project install.From the section on http://symfony.com/doc/current/components/intl.html about ICU and deployment problems I added
"symfony/icu": "1.1.*",
(or add"symfony/icu": "1.0.*",
if you do not have theintl
extension installed) to the require section of composer.jsonI then ran
php-cli composer.phar update
to get all the dependencies which takes a while (make sure you reference composer.phar correctly as it was downloaded into the parent directory)After all the packages were downloaded, it asked for config parameters such as Database info
Then I ran
php-cli app/console sylius:install
I ran
php-cli app/console doctrine:fixtures:load
and recieved the error:From info at https://github.com/symfony/symfony/issues/5279#issuecomment-12477297 and https://github.com/kbsali/sf2-icu I ran
and then edited
vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php
and changedto
I ran
php-cli app/console doctrine:fixtures:load
again and loaded all of the Data Fixures until LoadOrdersData failed with the error:Then made the changes described at https://github.com/Sylius/Sylius/pull/216/files - hopefully this becomes part of the master branch and doesn't have to be changed when installing sylius
and ran
php-cli app/console doctrine:fixtures:load
a third timeI added my IP to the array of valid IP addresses in
web/app_dev.php
so I can run app_dev.php remotely from the BlueHost serversIn your browser you can go to
web/app_dev.php
and login to the admin area withas the page suggests
Hopefully this helps anyone having problems with installing Sylius. It took me a while to figure it out. Let me know if there are any better ways of going about this.