News:

Wondering if this will always be free?  See why free is better.

Main Menu

Attachments not working after php5.ini installed

Started by Dan_, December 18, 2013, 02:07:00 PM

Previous topic - Next topic

Dan_

GD tech support helped me with the log out problem by writing a php5.ini file.  Now I have this attachment error "Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.  Please consult your server administrator for more information."

I called them back today and they said he should not have helped me because it is something they are not supposed to support, and he caused more problems...

Here is the content of the php5.ini:

memory_limit = 128M
max_execution_time = 300
upload_max_filesize = 192M
post_max_size = 128M
session.save_path = "/home/content/xx/xxxxxxxx/html/savedir"

The max_execution_time =300 line was 120 but I changed it.  It did not help.

Any ideas..?

Also I uploaded an phpinfo file but dunno what it is telling me.

TIA

Arantor

How big was the attachment you were trying to upload?

Dan_

#2
I have the resizer mod ...  attachments large and small give the same error.  Same error is in the error log.



Attachment Settings attached

Chen Zhen


Dan_,

  Ensure that the temporary file directory exists and to set its file permissions and ownership (ie. apache) properly.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen

Dan_,

  It will be this setting in your php.ini file: upload_tmp_dir  ... set it to a folder located in a parent dir of your forum directory and make sure the folder exists with the proper permissions and ownership so that your web server application (ie. apache) can use it.  After updating PHP it may be that the setting is either blank or perhaps a different folder name is used.  Imo this could likely be your issue.


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dan_

#5
Thanks for the reply..!

I changed the php5.ini to this:

memory_limit = 128M
max_execution_time = 300
upload_max_filesize = 192M
upload_tmp_dir = tmp
post_max_size = 128M
session.save_path = "/home/content/XX1/XXXXXXXX/html/savedir"

Still can't attach a file. 

savedir and tmp both reside in the publci/html directory.  savedir is set to 705, tmp is set to 777 as attachement..

Thanks again.

Dan_

woops, I dint put the correct path to tmp or the " "...  working on it now.

Chen Zhen

Dan_,

  You need to set the full path for the upload_tmp_dir and it should be in quotes.  This is how your session.save_path is set below it which does not appear to be your public_html folder.  File permissions should never be set permanently to 0777 and imo you should change that to 0755. Also ownership of those files is different than permissions whereas it should probably be set to www-data:www-data


My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dan_

Thanks for all the help.

The file looks like this now and the attachment are working again..!

memory_limit = 128M
max_execution_time = 300
upload_max_filesize = 192M
upload_tmp_dir = "/home/content/XX/XXXXXXXX/html/tmp"
post_max_size = 128M
session.save_path = "/home/content/XX/XXXXXXXX/html/savedir"

Thanks again -Underdog-

Chen Zhen

Dan_,

  Great to hear that you resolved your issue & I chalked your topic as solved.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Dan_

Awesome support.  Sorry to be so needy. :o

I set them both to 705.

Thanks again for the help.  I really do appreciate it, and would not be able to carry on without it obviously.

Advertisement: