CUploadedFile::getInstance returning upload data

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

It’s because of the PHP version… check this thread/post - http://www.yiiframework.com/forum/index.php?/topic/15949-some-mistakes-with-php-version/page__view__findpost__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…

Hey mdomba,

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