Re: Lasting syntax error when there's none

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems the problem was caused by shared folder between host and guest systems, respectively by files’ owner and group. When I copied file to designated folder, everything started to work. However permissions and other things are the same from the point of readability and writability. It’s just that files are not shared between systems and are owned by someone else. It is strange anyway… And honestly, I see no reason why this is happening.

On Apr 10, 2013, at 12:57 AM, Filip Zrůst <frzng@xxxxxx> wrote:

> Hi Stephen,
> 
> I looked there before but I’ve increased debug level after you suggestion and there’s still nothing helpful I guess. But just to be sure:
> 
> Reverse proxy (“load balancer”):
> - error log: nothing
> - access log:
>> 192.168.60.2 - - [09/Apr/2013:15:25:08 −0700] "GET /offer/create HTTP/1.1" 500 42008 "http://localhost:8080/need/create"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.28.10 (KHTML, like Gecko) Version/6.0.3 Safari/536.28.10"
> 
> FPM pool:
> - error log:
>> [09-Apr-2013 22:25:08 UTC] PHP Parse error:  syntax error, unexpected $end in /mnt/hgfs/vagrant-root/temp/cache/_Nette.FileTemplate/_Offer.create.latte-76106eddfc5f39910a042247bcba6d4f.php on line 191
> 
> - access log:
>> 127.0.0.1 -  09/Apr/2013:22:25:08 +0000 “GET /index.php” 200
> 
> I’m not sure why FPM access log reports status code 200 but this value might mean something else.
> 
> As you can see, there’s really not much in the logs. AFAIK permissions are fine, otherwise applying `touch` on those files wouldn’t resolve a thing. Timezones are also somewhat messed up, but that’s just a configuration issue I guess.
> 
> I’ll try running everything on near production system instead of Vagrant which may solve the issue. But I would like know the mechanics behind this issue anyway.
> 
> I’m still playing with the idea that application framework we use is behind that, but I see no reason why and why it affects different SAPIs. I also don’t get why touching resolves the problem, because it means some caching is in play. But where can it be configured? Or, is it some OS specific trickery? Don’t know yet…
> 
> 
> Best,
> -- 
> frzng
> 
> On Apr 9, 2013, at 5:10 PM, Stephen <stephen-d@xxxxxxxxxx> wrote:
> 
>> You first step is to check the log files.
>> 
>> No matter how sure we are that there is no syntax error, always start with the logs.
>> 
>> It could be a file permission problem.
>> 
>> Stephen
>> 
>> On 13-04-09 11:00 AM, frzng@xxxxxx wrote:
>>> Hi everyone,
>>> 
>>> I have some weird problem with PHP compiler or something of this sort of things. We have some PHP files which are generated during the first request to the site. These files are normally executed via PHP then. For some reason PHP thinks that they contain syntax errors (verified using HTTP request, or `php -l`). I've found out it is extremely easy to resolve this issue manually when developing - simply renaming or touching that file resolves the issue. So, apparently those generated PHP files don't contain any syntax error. However, PHP thinks they do even across different SAPIs (CLI and FPM). Since fixing the issue in this manner doesn't seam reasonable even by some script on production, I'd like to know whether do you have any suggestion what settings to tweak or what might be the problem.
>>> 
>>> Here is some information about the environment (feel free to ask for more):
>>> - PHP version: 5.3.10-1ubuntu3.6
>>> - SAPI: FPM and CLI
>>> - OS: Ubuntu 12.04
>>> - Software: Ubuntu packages only (updated)
>>> - HTTP request handling: nginx load balancer → PHP FPM daemon
>>> - Machine: VMware Fusion (managed by Vagrant) hosted on OS X 10.8.3
>>> 
>>> 
>>> Thanks,
>> 
>> 
>> -- 
>> Stephen
>> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux