View Single Post
Old 06-18-2008, 02:42 PM   #22 (permalink)
ciprianmp
The Wanderer
 
ciprianmp's Avatar
 
Join Date: Jun 2008
Location: Bucharest, Romania
Posts: 14
Thanks: 6
ciprianmp is on a distinguished road
Arrow -> setSize(80) - fix for php4

Quote:
Originally Posted by Kalle View Post
Type casting was available as of PHP4, however it might be the new PHP5 keywords causing the error, even though I would expect an "Unexpected T_STRING" insted
That error came up on a php 4.3.11 server. Afterwards, I saw that server doesn't accept remote access for file(), file_exists(), is_file() or filesize() functions (allow_url_fopen is "On" though)

It had sometihng to do with the format of the class call:
PHP Code:
 $pAvatar = new TalkPHP_Gravatar();
 echo 
$pAvatar -> setEmail('example@example.com')
     -> 
setSize(80)
     -> 
setRating(GRAVATAR_RATING_PG)
     -> 
getAvatar(); 
threw the error on that server, while there is no error anymore after changing it to:
PHP Code:
$pAvatar = new TalkPHP_Gravatar();
   
$pAvatar->setEmail('example@example.com');
   
$pAvatar->setSize(80);
   
$pAvatar->setRating(GRAVATARS_RATING_PG);
   echo 
$pAvatar->getAvatar(); 
As you can see, it works fine now on Latest Developing version - phpMyChat-Plus (4.3.11 server)

PS: does anyone know what could be the disabled setting which makes file, file_exists, filesize and is_file not to work with remote files? They work just fine with local files though...

Last edited by ciprianmp : 09-10-2008 at 08:02 AM.
ciprianmp is offline  
Reply With Quote