Yii Framework Forum: CUploadedFile::getInstance returning upload data - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CUploadedFile::getInstance returning upload data Rate Topic: -----

#1 User is offline   nuttynibbles 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 04-February 11

Posted 17 October 2011 - 12:11 AM

hi,

i have a upload photo function. i used CUploadedFile::getInstance to get the uploaded filename. i have been running it on macOsx and it works fine. now i migrated to CentOs and and the upload stop working.

i did some debug and realise the return value is incorrect. previously, i was able to get the image filename. but now, im getting Object id #68 as the returned value.

im using PHP Version 5.1.6 on a CentOS release 5.3 32bit
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,317
  • Joined: 12-October 09
  • Location:Croatia

Posted 17 October 2011 - 02:22 AM

It's because of the PHP version... check this thread/post - http://www.yiiframew...dpost__p__79378

On PHP < 5.2 you need to use the attribute "name" to get the uploaded picture name... check the example on the above thread...
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   nuttynibbles 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 04-February 11

Posted 17 October 2011 - 06:52 AM

Hey mdomba,

yes you're right. I updated php version and it works. Thank you very much

View Postmdomba, on 17 October 2011 - 02:22 AM, said:

It's because of the PHP version... check this thread/post - http://www.yiiframew...dpost__p__79378

On PHP < 5.2 you need to use the attribute "name" to get the uploaded picture name... check the example on the above thread...

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users