0

I have hired a developer to fix some bugs on my site built on CakePHP framework, but when uploaded the changes he made i got an error: "Parse error: syntax error, unexpected T_STRING in...."

The strange thing is that the file works OK on the demo, but when try to upload file to the main site the error appears. Can you please have a look at the code and tell me where is that error. Here is the uploaded file: http://textuploader.com/xhok

  • the fun is that you stopped reading the error message exactly at the point where a answer to your question is given :) – ptica Apr 07 '15 at 07:04
  • HI, the problem is that i'm not a coder...so can you be more specific? – user3551564 Apr 07 '15 at 09:55
  • the other part of the error was: " on line1", but after checking the file, i found that entire code was moved to line 1 for unknown reason. – user3551564 Apr 07 '15 at 10:14
  • I don't think stackoverflow was ment to be a mechanical turk clone for business people: – ptica Apr 07 '15 at 14:33

2 Answers2

0

line 41 $this->ListingProperty->initialize(&$controller); uses call time pass-by-reference removed in php 5.4

line 49 $this->CommonFunctions->initialize($controller); has the same issue

see PHP 5.4 Call-time pass-by-reference - Easy fix available?

otherwise the file has no syntactic problems on php 5.5

>php -l a.php
No syntax errors detected in a.php
Community
  • 1
  • 1
ptica
  • 749
  • 8
  • 16
0

I managed to fix this issue.The problem was in the FTP program (Filezilla). Forsome reason Filezilla was uploading the files as ASCII and that makes a huge error in some PHP files. I have fixed the issue by changing the upload method as Binary. Here is how to change it: Edit > Settings > Transfers > File Types > select Binary