PHP expects T_PAAMAYIM_NEKUDOTAYIM?
It’s the double colon operator ::
(see list of parser tokens).
Unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_NS_Separator
It looks like your new server is running PHP 5.3, while your old one was running an earlier version.
In PHP 5.3, namespace
is a keyword, thanks to the new namespace feature.
Your existing Namespace
class is going to need to be renamed. The parse error is occurring as the code tries to resolve Namespace::isTalk()
into a namespace name. (The syntax for doing so would be something akin to namespace Foo
; it becomes confused at seeing the ::
resolution operator.)
What does this mean? Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM
T_PAAMAYIM_NEKUDOTAYIM is the double colon scope resolution thingy PHP uses - ::
Quick glance at your code, I think this line:
return $cnf::getConfig($key);
should be
return $cnf->getConfig($key);
The first is the way to call a method statically - this code would be valid if $cnf contained a string that was also a valid class. The -> syntax is for calling a method on an instance of a class/object.
Syntax error, unexpected '', expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
It looks like you have an unmatched opening brace {
here:
url("category/{$category->id")
I suspect this is being parsed by the Blade template system, and it is struggling to make sense of it. This is why the error comes out of the cached file, rather than your own.
This sort of error can be discovered by committing the view file to version control, and then snipping away parts of it until the error no longer happens. By a process of trial and error, you can find the section that raises the exception.
T_PAAMAYIM_NEKUDOTAYIM error calling static method
static::
was introduced in 5.4 5.3, and likely you have older php
In your case you can replace it with
self::fetch_templates();
parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM' error in activecollab model class
foreach($roles as $role) {
if($role->getPermissionValue($name))
return true;
else
return false;
You're missing a closing } there. So it should be:
class Projectrequests extends DataManager {
...
....
function getPermissionValue($name){
$roles = Roles::find();
foreach($roles as $role) {
if($role->getPermissionValue($name))
return true;
else
return false;
} // <-- here
}
static function canAccess() {
if(self::getPermissionValue('can_use_project_request')) return true;
return false;
} // canAccess
...
..
}
Related Topics
How to Retrieve Utf-8 Accented Characters from Access via Pdo_Odbc
Memcached VS Apc Which One Should I Choose
Best Way to Determine If a Url Is an Image in PHP
How to Check If Time Is Between Two Times in PHP
PHP Function with Unlimited Number of Parameters
MVC (Laravel) Where to Add Logic
How to Use Where in with Doctrine 2
Get Latitude and Longitude Automatically Using PHP, API
Best Practice to Generate Random Token for Forgot Password
Call Laravel Controller via Command Line
PHP JSON Encode - Malformed Utf-8 Characters, Possibly Incorrectly Encoded
Jquery Ajax Request with JSON Response, How To