I don't see it anywhere in the documentation or ReadMe but what is the PHP version requirements for the Parse PHP SDK?
I am running PHP Version 5.3.2-1ubuntu4.22, this is a Virtual Machine running Ubuntu. And I get the following error:
Parse error: syntax error, unexpected '[' in /vagrant/www_root/vendor/parse/php-sdk/src/Parse/ParseObject.php on line 317
I guess the Parse SDK requires PHP 5.4 with support for short array syntax.
That error is definitely a version issue. That code requires requires PHP 5.4+ but you are running PHP 5.3.
But you can fix this but changing that code to:
if (!is_array($value)) {
$value = array($value);
}
Related
Everything is working perfectly but on running I get this error
PHP Parse error: syntax error, unexpected '?' in htdocs\example\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 500
on line 500
return $factory->of($arguments[0], $arguments[1])->times($arguments[2] ?? null);
The ?? operator was introduced in php 7. You should upgrade your php version to the one required by the laravel version you are using.
Just upgrade the php version into PHP 7.1 (ea-php71) on cpanel using MultiPHP Manager .
It seems your php is lower than version 7.1.3, you need to have version above that. try to run phpinfo(). Hope it helps
I'm using laravel 5.5 framework.It requirements PHP >= 7.0.0.
when I run server I got this error (php artisan serve):
PHP Parse error: syntax error, unexpected '?' in E:\xampp\htdocs\dibit\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 233
I've installed the last version of xampp and phpstorm.
I think this error show I'm not using php 7.
in my console of my phpstorm when I run this commend:
php -v
it returns PHP 5.6.21.
where is my problem?
the result of this code:
<?php
echo phpversion();
?>
is:
7.2.1
http://localhost/p.php
I have two xampp software but them have been installed an
It looks to me like your command prompt uses an old php version. To confirm that, run
where php
in a command prompt and find out whether it prints the right path (to PHP7). If it's incorrect, check the PATH environment variable and modify it with the correct path to PHP7.
Hope it helps.
I am trying to use the changePassword.php command in MediaWiki 1.27.0 in order to change a user password. Unfortunately I get the following error message:
<br />
<b>Parse error</b>: syntax error, unexpected '[', expecting ')' in
<b>/wiki/maintenance/changePassword.php</b> on line <b>56</b><br />
Even the php changePassword.php --help command results in the same error (see MediaWiki manual page)...
Details of the system:
MediaWiki 1.27.0
PHP 5.6.27 (cgi-cgi)
MySQL 5.6.32-78.1-log
ICU 4.2.1
You are using PHP 5.3 or older. MediaWiki 1.27 requires PHP 5.5+; most notably, it has switched to short array syntax which is a PHP 5.4 feature. The line where you get the error uses short array syntax.
Chances are you have misconfigured the web server and the web and CLI PHP version are different.
My system is using ubuntu 12.10 and apache 2.2.22 and using doctrince 2.4.
I updated my Php from 5.4.x to 5.5.38.
But i still countered this error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) in /var/www/xxxxxx/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php on line 62
At first, i thought it was my php 5.4 caused and then i updated php to 5.5.38.
Yet i still get this error.
I really have no idea how to fix it.
I can't update Ubuntu's packages from outside of the server.
Please someone help me.
I would like to use laravel for my php project. I use WampServer2.2 (php 5.3.8 and Apache 2.2.21) on Windows 8.1. But after all kind of installation I tried (via composer or downloading the zip), when I get to the public folder in my browser I get PHP errors as :
Parse error: syntax error, unexpected '[' in C:\wamp\www\spi\laravel-master\vendor\laravel\framework\src\Illuminate\Support\helpers.php on line 411
or
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in C:\wamp\www\spi\laravel-master\bootstrap\compiled.php on line 506
What may be the problem?
You say that your php version is 5.3.8 and the laravel docs say that 5.4 is required. The latest version(2.5) of WampServer comes with php 5.5.
upgrade PHP to PHP 5.6
You can use this command for local development server
php artisan serve