Use of undefined constant php - assumed 'php'

I'm getting a serious show stopping error on my application which i need to deploy to a VPS environment now:

Use of undefined constant php - assumed 'php'

Which is strange because i don't remember using that anywhere.

Any ideas anyone?

Do you have anything like:

$someArray[php]

in your code?

It should be

$someArray['php']

No i don't actually.

may be you typed

<? php

instead of

<?php

in some places.

This really is a headscratcher.

I did find one instance of that in a portuguese error document in the framework, but on my local machine instance it works perfectly.

Will try it on VPS and see if it makes a difference…

By Gosh that was the problem

Now my app throws a silent error. ;D

FYI, I just fixed a syntax error in the Portuguese error500.php error view.

Quote

FYI, I just fixed a syntax error in the Portuguese error500.php error view.

qiang, I see quite a few(>=10) syntax errors and typos in the svn trunk as well as in 1.0.x branch when I open the project in IDE like Eclipse, just wondering why don't you use some IDE to detect those errors automatically, which, in fact, could be avoid at the first place.

Could you point out what are the errors?

Quote

Could you point out what are the errors?

Here is what I found in svn/trunk

CMssqlSchema.php

CViewRenderer.php

CDbAuthManager.php

hmm…I can't tell what are the errors in these code…

Quote

hmm...I can't tell what are the errors in these code...

Though I still consider myself newbie to yii, here are a few obvious syntax errors:

CMssqlSchema.php

should be

CViewRenderer.php

where $viewFile may not be defined.

CDbAuthManager.php

where $bizRule and $data may not be defined.

hope my notes helps.

Thank you very much! All are fixed. Please let me know if you find more errors.

Quote

Thank you very much! All are fixed. Please let me know if you find more errors.

ControllerCommand.php

CrudCommand.php

should be:

CMssqlSchema.php

$name, $result not defined.

Fixed. Thanks!

CMaskedTextField.php

is $this->$func defined?

BTW, don’t forget check ticket #240 &#242 :)