Forum post attachments fail [message #166421] |
Tue, 06 December 2011 00:58 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
The admin control panel upload features all work fine - the file manager, avatars, smiley icons, etc.
However, the forum post attachment uploads fail.
Not only do they fail, but even when not uploading any attachments, the error message saying the file is too big appears. Usually when you select "preview" before submitting the post.
Any help would be appreciated.
My system configuration overview:
FUDforum version: 3.0.3
PHP version: 5.2.17
PHP built on: Linux box269.bluehost.com 2.6.32-46.1.BHsmp #1 SMP Tue Sep 6 12:18:02 MDT 2011 x86_64
Database type: mysql (mysqli)
Database version: 5.1.60-community-log
Web server: Apache
Web Server load: 15.68
Web server to PHP interface: cgi-fcgi
WebServer User/Group: xxxxxxxx / xxxxxxxx (nnn/nnn)
Relevant PHP settings:
Safe mode: OFF
Open basedir: none
Display errors: ON
File uploads: ON
Maximum file upload size: 10M
Magic quotes: ON
Output buffering: No
Disabled functions: none
PSpell support: Yes
Zlib support: Yes
Please let me know if you need any more info or if there is anything I can do to debug this process. I believe bluehost has zend support, so perhaps I could insert the debugger code and step through the process with eclipse, or something.
I had this tacked onto the end of a can't upload anything thread but was getting no response, so I figured maybe you don't respond to old threads, so I'd start my own. Sorry if that's bad.
One more bit of possibly-relevant info: I am using a path_info theme. Did not check to see if the problem exists with the default template/theme.
[Updated on: Tue, 06 December 2011 01:31] Report message to a moderator
|
|
|
|
|
|
Re: Forum post attachments fail >SOLVED< [message #166433 is a reply to message #166432] |
Sat, 10 December 2011 22:33 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Ok that would be the php.ini file on my server.
That's ok I was making sure there were no setting/access from the admin control panel.
Thanks
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|
Re: Forum post attachments fail >SOLVED< [message #166434 is a reply to message #166433] |
Sun, 11 December 2011 03:39 |
|
ShineOn
Messages: 53 Registered: July 2011
Karma: 1
|
Member |
|
|
Nope, not a FUDforum setting, but a php.ini setting. One that you should only have to worry about if you're not yet running php 5.3, unless 5.3 has a "backward compatibility with 5.2" setting that makes deprecated functions available. Hopefully not.
You can see from the display from FUDforum admin panel system config overview I posted in the OP code snippet that it shows "Magic quotes: ON" which apparently will show if any of the magic_quotes settings are on.
In my 5.2.x php.ini there are three "magic_quotes..." settings. Two were off, but the magic_qotes_gpc was on - and that's the one that sets the php magic quotes feature that handles posts, which is where the error was showing up.
Magic quotes essentially escapes stuff going in to php with slashes. It was intended to make database entry easier, by pre-escaping stuff just in case. However, because the pre-escaping caused problems of its own necessitating work-around code to remove slashes, and by its very existence promoted lazy programming practices, it's deprecated as of 5.3, and all magic quotes type data handling should be properly coded for in order to be 5.3 compatible. The FUDforum code is probably already coded such that magic quotes functionality is not needed, so when it was enabled it was interfering with proper operation of the FUDforum code, resulting in the error I was experiencing.
|
|
|
Re: Forum post attachments fail >SOLVED< [message #166435 is a reply to message #166434] |
Sun, 11 December 2011 03:54 |
The Witcher
Messages: 675 Registered: May 2009 Location: USA
Karma: 3
|
Senior Member |
|
|
Gotcha! I know where the php display is, and one of my hosts has a PHP.ini I've had to edit to increase the size of the upload but I didn't recall seeing magic quotes. Thanks for the clarification.
"I'm a Witcher, I solve human problems; not always using a sword!"
|
|
|