Damn... i've spent two days trying to solve the problem, and the 
solution was right in front of my eyes! The file for the GenericResult 
class starts with <? (and it's the only file starting like that, the 
others use <?php), and the php doesn't have short tags enabled. :P

Problem solved! Thanks.

João Saleiro



João Saleiro wrote:
> Hey guys,
>
> we have decided to migrate our prototype of CastingOffice (our "old" 
> osflash RIA :) ) to another server. (and, btw, soon we might starting 
> working the full version of CastingOffice :D)
>
> Unfortunately i've spent two days trying to figure out why on the new 
> server our remote services are returning the PHP code of our VO classes, 
> without having a clue of what's happening.
>
> On the old server everything works fine (try www.castingoffice.net, 
> user: osflash pass: test). When someone tries to login, the client sends 
> a VO with the credentials to the "testLogin" method on the 
> "GestorDeUtilizadores" service. The credentials are checked by an SQL 
> query, and then a result VO (GenericResult) should be returned to the 
> client. On the new server what's being returned is the PHP code itself... :
>
> <?
>     class GenericResult
>     {
>         var $resultMessage; // String
>         var $resultCode; // Number  
>     }
> ?>
>
> If you open an AMF sniffer like Service Capture and try logging in on 
> http://www.webfuel.pt/castingoffice/ , with user: osflash pass: test  , 
> you'll receive the above PHP as the result instead of a a GenericResult 
> instance.
>
> On my local computer it works just fine. I have tried to find the error, 
> removing all the code inside the testLogin method, leaving only the line:
>
>     $result=new GenericResult();
>
> If i keep this line, i get the above error (the PHP code is returned). 
> If i remove this line and keep all the others, i have no errors (but, of 
> course, it doesn't work as supposed), so the problem is with this line.
>
> It's not the AMFPHP PHP 5.2.2 incompatibility described on 
> http://www.5etdemi.com/blog/archives/2007/05/amfphp-fix-for-php-522-compatibility-issue/
>   
> since our AMFPHP version is properly fixed.
>
> I don't know if this has something to do , but I am using PHP 5 autoload 
> function as described here: http://pt.php.net/autoload . The code of our 
> autoload function is:
>
> <?php
>     function __autoload($class_name) {
>
>         $vo_file=VALUEOBJECTSPATH."/".$class_name.'.php';
>    
>            elseif (file_exists($vo_file))
>                require_once($vo_file);
>     }
>
> ?>
>
> On the previous server (where Castingoffice works) we have PHP 5.2.4 
> installed with the following config: https://www.castingoffice.net/info.php.
>
> On the server where we are having problems, we have PHP 5.2.0 installed 
> with the following config: http://www.webfuel.pt/castingoffice/info.php
>
> I can try to update PHP, but first i would like to know your opinion...
>
> Thank you in advance!
>
> João Saleiro
>
>
>
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>   

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to