Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Can't upload avatar
Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2014 - 10:27 am

Although commenting it out might work, I doubt it's the source of the problem. exif_imagetype simply checks to make sure the image being uploaded holds the correct image type value, e.g .gif = 1, jpeg = 2, png = 3. SP Only supports these first 3 formats. Bypassing this I'm guessing will just allow you to upload whatever image you like as long as it is a web format (although I could be wrong).

I'm guessing you managed to use the same picture here, where you have uploaded the same image as an attachment, and also for your avatar, so there is nothing wrong with the image itself. Also the image would have been run through the same '# check image file mimetype' process when you did this here..

Did you check to see if your PHP tmp folder was correctly set up as Andy suggested? Also have you checked your PHP error log?

It would be worth noting that commenting out the code is probably not the solution. Also, It will most likely revert or be overwritten the next time you have an update from SP.

Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 8, 2014 - 10:42 am

The tmp directory is ok.

 

The Apache error log indicates this :

[Mon Sep 08 16:40:48.954010 2014] [:error] [pid 804:tid 1128] [client 31.34.57.3:63702] PHP Warning - getimagesize(C:\\Program%20Files%20(x86)\\EasyPHP-12.1\\tmp\\phpA440.tmp): failed to open stream: No such file or directory - file: /simple-press/forum/profile/ahah/sp-ahah-profile-save.php - line: 16 - function: getimagesize
, referer: http://www.aceos-93-95.fr/forum/profile

[Mon Sep 08 16:40:48.954010 2014] [:error] [pid 804:tid 1128] [client 31.34.57.3:63702] PHP Warning - getimagesize(): Filename cannot be empty - file: /simple-press/forum/profile/ahah/sp-ahah-profile-save.php - line: 16 - function: getimagesize
, referer: http://www.aceos-93-95.fr/forum/profile
[Mon Sep 08 16:40:48.954010 2014] [:error] [pid 804:tid 1128] [client 31.34.57.3:63702] PHP Warning - getimagesize(): Filename cannot be empty - file: /simple-press/forum/profile/ahah/sp-ahah-profile-save.php - line: 16 - function: spHandleShutdown
, referer: http://www.aceos-93-95.fr/forum/profile

Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 8, 2014 - 11:01 am

The PHP default upload directory was C:\\Program Files (x86)\EasyPHP-12.1\tmp.

I changed it to c:\Temp and now the avatar upload is ok even with the code uncommented !!

Why ? I don't know.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2014 - 11:38 am

Well the warnings generated regarding sp-ahah-profile-save.php are only generated as a result of the original error, in which I would assume it was trying to access a folder that didn't exist, or didn't have access to. Although I'm sure someone who has a bit more experience with this side of things will enlighten us to the exact reason!

but in any case, glad you have it working

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 8, 2014 - 12:59 pm

Program FIles from the C: drive is way outside of the website scope and I should imagine that access to calls like getimagesize() would never work. It seems an odd place to keep a php temp folder. But there again so does having it off of the C root.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620