Vendor symfony polyfill php80 bootstrap php on line 23

Содержание
  1. public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23
  2. Saved searches
  3. Use saved searches to filter your results more quickly
  4. Parse error: syntax error, unexpected ':', expecting ' Local Machine PHP Version 7.4.8 Laravel 7 Live Server PHP Version 7.2.31 I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it. Beta Was this translation helpful? Give feedback. 2 You must be logged in to vote I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Your laravel version not compatable with your Server Use composer install --ignore-platform-reqs --ignore-platform-reqs ignores laravel versoin. Beta Was this translation helpful? Give feedback. 4 You must be logged in to vote Are you sure your live server is PHP 7.2? The error seems to hint at return types not being supported. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote Yes my live server has PHP 7.2 ,Additionally I have another server running on PHP 7.3 which is also giving me the same error. Beta Was this translation helpful? Give feedback. I have a similar problem when using composer or artisan command but no problem in cgi. Local Machine PHP Version 7.4.10 Laravel 7 Live Server PHP Version 7.2.33 In my case, i specify the php version in command and it work. $ php7 artisan $ php7 composer Make sure your apache/nginx is listening the port of php7. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote >'s edit >'s edit I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Finally restart apache service; sudo service apache2 restart Beta Was this translation helpful? Give feedback. Источник Saved searches Use saved searches to filter your results more quickly You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Parse error: syntax error, unexpected ':', expecting ' Local Machine PHP Version 7.4.8 Laravel 7 Live Server PHP Version 7.2.31 I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it. Beta Was this translation helpful? Give feedback. 2 You must be logged in to vote I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Are you sure your live server is PHP 7.2? The error seems to hint at return types not being supported. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote Yes my live server has PHP 7.2 ,Additionally I have another server running on PHP 7.3 which is also giving me the same error. Beta Was this translation helpful? Give feedback. I have a similar problem when using composer or artisan command but no problem in cgi. Local Machine PHP Version 7.4.10 Laravel 7 Live Server PHP Version 7.2.33 In my case, i specify the php version in command and it work. $ php7 artisan $ php7 composer Make sure your apache/nginx is listening the port of php7. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote >'s edit >'s edit I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Finally restart apache service; sudo service apache2 restart Beta Was this translation helpful? Give feedback. Источник Блог public_html/vendor/symfony/polyfill-php80/bootstrap.php на линии 23 Вопрос: [02-сен-2021 12:55:49 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t/public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t//public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] В PHP анализировать ошибка: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘ [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '
      * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use SymfonyPolyfillPhp80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') amp;amp; defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return pPhp80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return pPhp80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return pPhp80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return pPhp80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return pPhp80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return pPhp80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return pPhp80::get_resource_id($res); >>
    Комментарии:
    1. И какова ваша версия PHP?
    
    
    2. PHP 7.4 (ea-php74)
    
    
    3. Это уже ответ на ваш вопрос.
    
    
    4. Должна ли версия php быть 8?
    
    
    5. Это специально разработано для работы на PHP 7.4. Вы на 100% используете 7.4?
    
    
    Источник
    public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23
    
    
    
    [02-Sep-2021 12:55:49 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't/public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't//public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '

    [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '
    [email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Polyfill\Php80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return p\Php80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return p\Php80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return p\Php80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return p\Php80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return p\Php80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return p\Php80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return p\Php80::get_resource_id($res); >> Copy code
    Share solution ↓
    Additional Information:
    Didn't find the answer?
    
    
    Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
    Similar questions
    
    
    Find the answer in similar questions on our website.
    Write quick answer
    
    
    Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
    About the technologies asked in this question
    PHP
    
    
    PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites. The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
    https://www.php.net/
    Symfony
    
    
    Symfony compares favorably with other PHP frameworks in terms of reliability and maturity. This framework appeared a long time ago, in 2005, that is, it has existed much longer than most of the other tools we are considering. It is popular for its web standards compliance and PHP design patterns.
    https://symfony.com/
    Bootstrap
    
    
    Bootstrap is not exclusively a CSS framework, but its most popular features are CSS-centric. These include a powerful grid, icons, buttons, map components, navigation bars, and more.
    https://getbootstrap.com/
    HTML
    
    
    HTML (English "hyper text markup language" - hypertext markup language) is a special markup language that is used to create sites on the Internet. Browsers understand html perfectly and can interpret it in an understandable way. In general, any page on the site is html-code, which the browser translates into a user-friendly form. By the way, the code of any page is available to everyone.
    https://www.w3.org/html/
    Welcome to programmierfrage.com
    
    
    programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.
    Get answers to specific questions
    
    
    Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
    Help Others Solve Their Issues
    
    
    Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.
    
    
    Источник
  5. >'s edit
  6. >'s edit
  7. Saved searches
  8. Use saved searches to filter your results more quickly
  9. Parse error: syntax error, unexpected ':', expecting '

    Local Machine PHP Version 7.4.8 Laravel 7 Live Server PHP Version 7.2.31 I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it. Beta Was this translation helpful? Give feedback. 2 You must be logged in to vote I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Are you sure your live server is PHP 7.2? The error seems to hint at return types not being supported. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote Yes my live server has PHP 7.2 ,Additionally I have another server running on PHP 7.3 which is also giving me the same error. Beta Was this translation helpful? Give feedback. I have a similar problem when using composer or artisan command but no problem in cgi. Local Machine PHP Version 7.4.10 Laravel 7 Live Server PHP Version 7.2.33 In my case, i specify the php version in command and it work. $ php7 artisan $ php7 composer Make sure your apache/nginx is listening the port of php7. Beta Was this translation helpful? Give feedback. 1 You must be logged in to vote >'s edit >'s edit I finally fixed it by deploying the Laravel app on fresh server with I followed the procedures outlined here to install the environment >> PHP Install [https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/] Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost: Edited 000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf Added the following on 000-default.conf whereby public is my public folder in my laravel app Options Indexes FollowSymLinks AllowOverride All Require all granted Then have mod_rewrite enabled. Finally restart apache service; sudo service apache2 restart Beta Was this translation helpful? Give feedback. Источник Блог public_html/vendor/symfony/polyfill-php80/bootstrap.php на линии 23 Вопрос: [02-сен-2021 12:55:49 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t/public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t//public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] В PHP анализировать ошибка: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘ [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '
      * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use SymfonyPolyfillPhp80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') amp;amp; defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return pPhp80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return pPhp80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return pPhp80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return pPhp80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return pPhp80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return pPhp80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return pPhp80::get_resource_id($res); >>
    Комментарии:
    1. И какова ваша версия PHP?
    
    
    2. PHP 7.4 (ea-php74)
    
    
    3. Это уже ответ на ваш вопрос.
    
    
    4. Должна ли версия php быть 8?
    
    
    5. Это специально разработано для работы на PHP 7.4. Вы на 100% используете 7.4?
    
    
    Источник
    public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23
    
    
    
    [02-Sep-2021 12:55:49 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't/public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't//public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '

    [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '
    [email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Polyfill\Php80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return p\Php80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return p\Php80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return p\Php80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return p\Php80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return p\Php80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return p\Php80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return p\Php80::get_resource_id($res); >> Copy code
    Share solution ↓
    Additional Information:
    Didn't find the answer?
    
    
    Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
    Similar questions
    
    
    Find the answer in similar questions on our website.
    Write quick answer
    
    
    Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
    About the technologies asked in this question
    PHP
    
    
    PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites. The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
    https://www.php.net/
    Symfony
    
    
    Symfony compares favorably with other PHP frameworks in terms of reliability and maturity. This framework appeared a long time ago, in 2005, that is, it has existed much longer than most of the other tools we are considering. It is popular for its web standards compliance and PHP design patterns.
    https://symfony.com/
    Bootstrap
    
    
    Bootstrap is not exclusively a CSS framework, but its most popular features are CSS-centric. These include a powerful grid, icons, buttons, map components, navigation bars, and more.
    https://getbootstrap.com/
    HTML
    
    
    HTML (English "hyper text markup language" - hypertext markup language) is a special markup language that is used to create sites on the Internet. Browsers understand html perfectly and can interpret it in an understandable way. In general, any page on the site is html-code, which the browser translates into a user-friendly form. By the way, the code of any page is available to everyone.
    https://www.w3.org/html/
    Welcome to programmierfrage.com
    
    
    programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.
    Get answers to specific questions
    
    
    Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
    Help Others Solve Their Issues
    
    
    Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.
    
    
    Источник
  10. >'s edit
  11. >'s edit
  12. Блог
  13. public_html/vendor/symfony/polyfill-php80/bootstrap.php на линии 23
  14. Вопрос:
  15. Комментарии:
  16. public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23
  17. Share solution ↓
  18. Additional Information:
  19. Didn't find the answer?
  20. Similar questions
  21. Write quick answer
  22. About the technologies asked in this question
  23. PHP
  24. Symfony
  25. Bootstrap
  26. HTML
  27. Welcome to programmierfrage.com
  28. Get answers to specific questions
  29. Help Others Solve Their Issues

public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23

[02-сен-2021 12:55:49 Европа / Стамбул] Ошибка синтаксического анализа PHP: синтаксическая ошибка, неожиданный ‘:’, ожидание ‘t / public_html / vendor / symfony / polyfill-php80 / bootstrap. php в строке 23[02-сен-2021 12:55:54 Европа / Стамбул] Ошибка синтаксического анализа PHP: синтаксическая ошибка, неожиданный ‘:’, ожидание ‘ t // public_html / vendor / symfony / polyfill-php80 / bootstrap.php в строке 23[02-сен-2021 12:55:54 Европа / Стамбул] Ошибка синтаксического анализа PHP: синтаксическая ошибка, неожиданный ‘:’, ожидание ‘

 [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting ' 
[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Polyfill\Php80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return p\Php80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return p\Php80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return p\Php80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return p\Php80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return p\Php80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return p\Php80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return p\Php80::get_resource_id($res); >> 

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Parse error: syntax error, unexpected ':', expecting '

Local Machine
PHP Version 7.4.8
Laravel 7

Live Server
PHP Version 7.2.31

I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it.

image

Beta Was this translation helpful? Give feedback.

2 You must be logged in to vote

I finally fixed it by deploying the Laravel app on fresh server with

I followed the procedures outlined here to install the environment >>
PHP Install
[https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/]

Also I installed Apache and mysql

Then configured server to enable .htaccess by adding this to my vhost:
Edited 000-default.conf

sudo nano /etc/apache2/sites-available/000-default.conf

Added the following on 000-default.conf whereby public is my public folder in my laravel app

 Options Indexes FollowSymLinks AllowOverride All Require all granted 

Then have mod_rewrite enabled.

Your laravel version not compatable with your Server
Use composer install --ignore-platform-reqs
--ignore-platform-reqs ignores laravel versoin.

Beta Was this translation helpful? Give feedback.

4 You must be logged in to vote

Are you sure your live server is PHP 7.2?

The error seems to hint at return types not being supported.

Beta Was this translation helpful? Give feedback.

1 You must be logged in to vote

Yes my live server has PHP 7.2 ,Additionally I have another server running on PHP 7.3 which is also giving me the same error.

Beta Was this translation helpful? Give feedback.

I have a similar problem when using composer or artisan command but no problem in cgi.

Local Machine PHP Version 7.4.10 Laravel 7 Live Server PHP Version 7.2.33 

In my case, i specify the php version in command and it work.

$ php7 artisan $ php7 composer 

Make sure your apache/nginx is listening the port of php7.

Beta Was this translation helpful? Give feedback.

1 You must be logged in to vote

>'s edit

>'s edit

I finally fixed it by deploying the Laravel app on fresh server with

I followed the procedures outlined here to install the environment >>
PHP Install
[https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/]

Also I installed Apache and mysql

Then configured server to enable .htaccess by adding this to my vhost:
Edited 000-default.conf

sudo nano /etc/apache2/sites-available/000-default.conf

Added the following on 000-default.conf whereby public is my public folder in my laravel app

 Options Indexes FollowSymLinks AllowOverride All Require all granted 

Then have mod_rewrite enabled.

Finally restart apache service;

sudo service apache2 restart

Beta Was this translation helpful? Give feedback.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Parse error: syntax error, unexpected ':', expecting '

Local Machine
PHP Version 7.4.8
Laravel 7

Live Server
PHP Version 7.2.31

I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it.

image

Beta Was this translation helpful? Give feedback.

2 You must be logged in to vote

I finally fixed it by deploying the Laravel app on fresh server with

I followed the procedures outlined here to install the environment >>
PHP Install
[https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/]

Also I installed Apache and mysql

Then configured server to enable .htaccess by adding this to my vhost:
Edited 000-default.conf

sudo nano /etc/apache2/sites-available/000-default.conf

Added the following on 000-default.conf whereby public is my public folder in my laravel app

 Options Indexes FollowSymLinks AllowOverride All Require all granted 

Then have mod_rewrite enabled.

Are you sure your live server is PHP 7.2?

The error seems to hint at return types not being supported.

Beta Was this translation helpful? Give feedback.

1 You must be logged in to vote

Yes my live server has PHP 7.2 ,Additionally I have another server running on PHP 7.3 which is also giving me the same error.

Beta Was this translation helpful? Give feedback.

I have a similar problem when using composer or artisan command but no problem in cgi.

Local Machine PHP Version 7.4.10 Laravel 7 Live Server PHP Version 7.2.33 

In my case, i specify the php version in command and it work.

$ php7 artisan $ php7 composer 

Make sure your apache/nginx is listening the port of php7.

Beta Was this translation helpful? Give feedback.

1 You must be logged in to vote

>'s edit

>'s edit

I finally fixed it by deploying the Laravel app on fresh server with

I followed the procedures outlined here to install the environment >>
PHP Install
[https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/]

Also I installed Apache and mysql

Then configured server to enable .htaccess by adding this to my vhost:
Edited 000-default.conf

sudo nano /etc/apache2/sites-available/000-default.conf

Added the following on 000-default.conf whereby public is my public folder in my laravel app

 Options Indexes FollowSymLinks AllowOverride All Require all granted 

Then have mod_rewrite enabled.

Finally restart apache service;

sudo service apache2 restart

Beta Was this translation helpful? Give feedback.

Источник

Блог

public_html/vendor/symfony/polyfill-php80/bootstrap.php на линии 23

Вопрос:

[02-сен-2021 12:55:49 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t/public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] в PHP ошибка разбора: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘t//public_html/vendor/symfony/polyfill-php80/bootstrap.php в строке 23 [02-сен-2021 12:55:54 Европа/Стамбул] В PHP анализировать ошибка: синтаксическая ошибка, неожиданный ‘:’, ожидая ‘
 [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting ' 
  * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use SymfonyPolyfillPhp80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') amp;amp; defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return pPhp80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return pPhp80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return pPhp80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return pPhp80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return pPhp80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return pPhp80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return pPhp80::get_resource_id($res); >> 

Комментарии:

1. И какова ваша версия PHP?

2. PHP 7.4 (ea-php74)

3. Это уже ответ на ваш вопрос.

4. Должна ли версия php быть 8?

5. Это специально разработано для работы на PHP 7.4. Вы на 100% используете 7.4?

Источник

public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23

[02-Sep-2021 12:55:49 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't/public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting 't//public_html/vendor/symfony/polyfill-php80/bootstrap.php on line 23 [02-Sep-2021 12:55:54 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting '
 [02-Sep-2021 12:55:55 Europe/Istanbul] PHP Parse error: syntax error, unexpected ':', expecting ' 
[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Polyfill\Php80 as p; if (PHP_VERSION_ID >= 80000) < return; >if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) < define('FILTER_VALIDATE_BOOL', FILTER_VALIDATE_BOOLEAN); >if (!function_exists('fdiv')) < function fdiv(float $num1, float $num2): float < return p\Php80::fdiv($num1, $num2); >> if (!function_exists('preg_last_error_msg')) < function preg_last_error_msg(): string < return p\Php80::preg_last_error_msg(); >> if (!function_exists('str_contains')) < function str_contains(string $haystack, string $needle): bool < return p\Php80::str_contains($haystack, $needle); >> if (!function_exists('str_starts_with')) < function str_starts_with(string $haystack, string $needle): bool < return p\Php80::str_starts_with($haystack, $needle); >> if (!function_exists('str_ends_with')) < function str_ends_with(string $haystack, string $needle): bool < return p\Php80::str_ends_with($haystack, $needle); >> if (!function_exists('get_debug_type')) < function get_debug_type($value): string < return p\Php80::get_debug_type($value); >> if (!function_exists('get_resource_id')) < function get_resource_id($res): int < return p\Php80::get_resource_id($res); >> 

Share solution ↓

Additional Information:

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Similar questions

Find the answer in similar questions on our website.

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

About the technologies asked in this question

PHP

PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites. The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/

Symfony

Symfony compares favorably with other PHP frameworks in terms of reliability and maturity. This framework appeared a long time ago, in 2005, that is, it has existed much longer than most of the other tools we are considering. It is popular for its web standards compliance and PHP design patterns.
https://symfony.com/

Bootstrap

Bootstrap is not exclusively a CSS framework, but its most popular features are CSS-centric. These include a powerful grid, icons, buttons, map components, navigation bars, and more.
https://getbootstrap.com/

HTML

HTML (English "hyper text markup language" - hypertext markup language) is a special markup language that is used to create sites on the Internet. Browsers understand html perfectly and can interpret it in an understandable way. In general, any page on the site is html-code, which the browser translates into a user-friendly form. By the way, the code of any page is available to everyone.
https://www.w3.org/html/

Welcome to programmierfrage.com

programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.

Get answers to specific questions

Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.

Help Others Solve Their Issues

Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.

Источник

Читайте также:  Unit test fail java
Оцените статью