ok, so I have this problem on my server, no one can upload avatars to my phpBB forum. the folders are chmodded correctly and everything.
now many people have this problem, and finnaly someone found a workaround. Here is what they said:
areacode212 wrote:
I had this problem the other day, and came across this solution on another site. Basically, I had to add something for "upload_tmp_dir" in php.ini
Quote:
Solution is on the surface (as always, though).
1. Create folder anywhere on server’s local drive. For example, “C:\Inetpub\TempUploads”
2. Set to your server’s internet user account ( IUSR_<computer name> by default) full NTFS rights to this folder.
3. Edit your php.ini to contain these directives:
Code:
file_uploads = On
upload_tmp_dir = "C:\Inetpub\TempUploads\"
4. Remember to set to your server’s internet user account full NTFS rights to folder, which you set in forum configuration at Administration > General Admin > Configuration > Avatar Settings > Avatar Storage Path.
5. Have fun.
Problem cause: This PHP issue. PHP config says that “Temporary directory for HTTP uploaded files will use system default if not specified”, but it couldn’t because Internet user account NEVER has access to server’s (Win2k/XP/2k3) TEMP folder.
After I did this, I restarted Apache, and avatar uploading worked.
now, hopefully that will work for me, but can anyone tell me, first, what do do for steps 1 and 2, as it look slike this was written from a win machine. and then tell me where php.ini is and how to add the requested data.
Thanks in advance.
Your php.ini is located in the /etc directory, however do not edit this file as it is build from templates. These templates cam be fount in the /etc/e-smith folder. Have a look here:
The SME Developer Guide, Chapter 7. Configuration file templatesAbout your needs... the user that httpd is running under is called www on SMEServer 7, so you should give this user rights to a temporary upload directory, however I don;t think it is neccesarry to create a extra directory as on the *NIX systems the /tmp folder is most of the times writeable by the webserver, so your best bet is to simply use the /tmp folder (or create a subdirectory in there) for your temporary upload directory.
As I remember correctly file uploading is enabled by default on the SMEServer, you can simply check using the following command
cat /etc/php.ini | grep file_uploads
This will look for the file_uploads section in your php.ini file if it is there it will display the setting, if not you should modify your templates to have it implemented in the php.ini file.
To set the temporary ipload directory in your php.ini file do this:
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cp -p /etc/e-smith/templates/etc/php.ini/60FileUploads /etc/e-smith/templates-custom/etc/php.ini
Now edit the copy of the original template file we just put in the templates-custom directory:
pico /etc-e-smith/templates-custom/etc/php.ini/60FileUploads
At the bottom enter the following code:
upload_tmp_dir = /tmp
Press Ctrl-X, confirm save with Y, and press enter as we do not want to modify the filename.
Expand the template:
expand-template /etc/php.ini
Verify that the settings you made are incorporated in the /etc/php.ini file:
cat /etc/php.ini | grep upload_tmp_dir
And restart the httpd deamon:
/etc/rc7.d/S86httpd-e-smith sigusr1