Laravel project deployment error

Laravel project deployment error

Albert He: laravel project deployment error

Albert He: This question is related to account: hostlike.com

Lilia D.: Welcome to SiteGround Hosting Services!

Albert He: hi

Lilia D.: How are you today Albert?

Albert He: im great, thank you!

Albert He: how about you?

Lilia D.: I am very well, thank you for asking 🙂

Albert He: I’m deploying laravel project,but i got error

Albert He: Parse error: syntax error, unexpected ‘=’ in /home/hostlike/pubweb21173/hostnetdev/crawl/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388

Albert He: my developer told me I have to change php.ini, but not sure where the file is located

Lilia D.: Can you please provide me with the steps to recreate the error on my end?

Albert He: ok

Albert He: under folder: /home/hostlike/pubweb21173/hostnetdev/crawl

Albert He: I executed cmd: php artisan migrate:refresh –seed

Albert He: then got the error

Lilia D.: Thank you for the information. May you allow me a few moments to review all settings on my end?

Albert He: thanks

Lilia D.: Can you please provide me with the details, your developer adviced you on?

Albert He: environment requirement:

Albert He:PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
BCMath PHP Extension

Albert He: change settings on .evn file. already changed to correct value.

Albert He: then run the cmd: php artisan migrate:refresh –seed

Lilia D.: Thank you ,allow me a moment to check the settings please and confirm they are correct

Albert He: ok

Lilia D.: Albert , I have just added php. ini to the entire directory and ran the command again, however the error still persists

Lilia D.: As the case is strictly developer related I will kindly advice you to ask your developer to double check the correct settings and if there is anything we can do to assist on our end, please contact us immediately

Albert He: are the listed requirements matched?

Albert He: how can we verify them?

Lilia D.: Allow me a moment please as I am double checking on the extension requirements for you

Albert He: thanks

Lilia D.: I confirm the PHP version is set to 7.3 and all PHP Modules are supported as you can review the information on our official page for
The following PHP versions and modules are available on our servers:
www.siteground.com/php-hosting.htm

Albert He: ok

Albert He: the developer mentioned that all the module in the php.ini must be opened, and then restart apache

Lilia D.: Can you please allow me a moment

Albert He: sure, thanks

Lilia D.: I did my best to resolve the issue on my end, but as it will require a higher technical knowledge and tools I will post a ticket on your behalf to our tech experts team.

Albert He: ok, very appreciated!

Lilia D.: Allow me a moment to provide you with ticket ID please

Lilia D.: I have just posted ticket ID:2947271
You can view it from your User Area> Support > View my tickets and add more information if you wish by updating it. I have personally contacted our team to make sure they are reviewing the case and they will have you updated in up to 10 – 15 minutes!

Albert He: great, thanks!

Lilia D.: Most welcome!

Lilia D.: I wish you the best of luck with your project Albert!

Lilia D.: Bye 🙂

Albert He: have a wonderful weekend

Chat Duration: 
Joined SiteGround on 2018-07-23.

Are you happy with me? Let my manager know


 

Ticket Messages:

Avatar

You
  • Posted On 7 Dec, 2018 22:34 CST

On behalf of client:
Hello,
I’m deploying laravel project,but i got error
Parse error: syntax error, unexpected ‘=’ in /home/hostlike/pubweb21173/hostnetdev/crawl/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388

my developer told me I have to change php.ini. the developer mentioned that all the module in the php.ini must be opened, and then restart apache

Can you please help?

 

Avatar

Dimitar R.
  • Support Guru
  • Posts: 52366
  • Posted On 7 Dec, 2018 22:45 CST

Hello Albert,

Thank you for contacting our Help Desk.

Can you please provide us with detailed, step-by-step instructions on how to recreate the issue on our end?

We look forward to your reply.

Best Regards,

Dimitar Ruzhinov
Senior Technical Support

 

Avatar

You
  • Posted On 8 Dec, 2018 09:33 CST
under folder: /home/hostlike/pubweb21173/hostnetdev/crawl
I executed cmd: php artisan migrate:refresh –seed
then got the error:

Parse error: syntax error, unexpected '=' in /home/hostlike/pubweb21173/hostnetdev/crawl/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388

 

Avatar

Aleksandar Stoev
  • Support Guru
  • Posts: 15392
  • Posted On 8 Dec, 2018 09:45 CST

Hello Albert,

The issue in this situation is coming from the fact that you are executing the command with the default PHP binary, which is using PHP version 7.0.

I tweaked your command to the following one:

/usr/local/php71/bin/php-cli artisan migrate:refresh --seed

Then the command was executed properly:

hostlike@usm92 [~/pubweb21173/hostnetdev/crawl]# /usr/local/php71/bin/php-cli artisan migrate:refresh --seed
Migration table not found.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrating: 2018_11_27_031752_create_sites_table
Migrated: 2018_11_27_031752_create_sites_table
Migrating: 2018_11_27_031935_create_categories_table
Migrated: 2018_11_27_031935_create_categories_table
Migrating: 2018_11_27_032034_create_links_table
Migrated: 2018_11_27_032034_create_links_table
Seeding: UsersTableSeeder
Seeding: SitesTableSeeder
Seeding: CategoriesTableSeeder
Database seeding completed successfully.

I hope this helps.

Best Regards,

Aleksandar Stoev
Technical Support Team

 

Avatar

You
  • Posted On 8 Dec, 2018 10:23 CST

Thank you!
I followed your steps, but I got another message:

hostlike@usm92 [~/pubweb21173/hostnetdev/crawl]# /usr/local/php71/bin/php-cli artisan migrate:refresh --seed
-bash: php-cli: command not found

 

Avatar

Aleksandar Stoev
  • Support Guru
  • Posts: 15392
  • Posted On 8 Dec, 2018 10:29 CST

I just accessed your account and successfully executed the command once again:

hostlike@usm92 [~/pubweb21173/hostnetdev/crawl]# /usr/local/php71/bin/php-cli artisan migrate:refresh --seed
Rolling back: 2018_11_27_032034_create_links_table
Rolled back: 2018_11_27_032034_create_links_table
Rolling back: 2018_11_27_031935_create_categories_table
Rolled back: 2018_11_27_031935_create_categories_table
Rolling back: 2018_11_27_031752_create_sites_table
Rolled back: 2018_11_27_031752_create_sites_table
Rolling back: 2014_10_12_100000_create_password_resets_table
Rolled back: 2014_10_12_100000_create_password_resets_table
Rolling back: 2014_10_12_000000_create_users_table
Rolled back: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrating: 2018_11_27_031752_create_sites_table
Migrated: 2018_11_27_031752_create_sites_table
Migrating: 2018_11_27_031935_create_categories_table
Migrated: 2018_11_27_031935_create_categories_table
Migrating: 2018_11_27_032034_create_links_table
Migrated: 2018_11_27_032034_create_links_table
Seeding: UsersTableSeeder
Seeding: SitesTableSeeder
Seeding: CategoriesTableSeeder
Database seeding completed successfully.
hostlike@usm92 [~/pubweb21173/hostnetdev/crawl]#

Please note that the exact command is this one:

/usr/local/php71/bin/php-cli artisan migrate:refresh --seed

From the error you have provided it appears that ‘php-cli’ has been put in the beginning of the line without the full path.

If other assistance is required, do not hesitate to contact us.

Best Regards,

Aleksandar Stoev
Technical Support Team

 

Avatar

You
  • Posted On 8 Dec, 2018 13:20 CST

Got it. Thank you very much!
Albert

175 total views, 2 views today

Author: Albert

Leave a Reply