News:

Join the Facebook Fan Page.

Main Menu

Cannot upload attachments

Started by WolfLust, February 23, 2008, 02:11:08 AM

Previous topic - Next topic

Rumbaar

What is the exact error you are getting when you try to upload and what is the corrisponding error you get in your AdminCP error log?

Just a few things:
Attachments mode: Enable all attachments
Allowed attachment extensions: Has the file extensions of the type of files you're uploading
Attachments directory: (text isn't red!) What is here?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

WolfLust

Thank you for replying Rumbaar,

Please note that when I try to attach an image I get the following error:

"An Error Has Occurred!
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."

Please note that the file size and extension are allowed and so is attachment mode.

The AdminCP error log shows:

"Apply Filter: Only show the error messages of this member  admin       Today at 05:19:52 AM
Apply Filter: Only show the error messages of this IP address 92.62.160.3      Apply Filter: Only show the error messages of this session 9a3460d6e230bdb56d9483b451ab3d5c
Apply Filter: Only show the error messages of this URL http://www.metalje.com/forum/index.php?action=post2;start=0;board=13
Apply Filter: Only show the errors with the same message
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."

Attachments directory is: /var/www/virtual/metalje.com/htdocs/forum/attachments/

Please find more the attachment information attached to this msg.
For the great day of wrath is coming, and who shall be able to stand?

Rumbaar

What is the file size of the actual attachment?  You might still be running into php.ini restrictions of your server.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

WolfLust

Thanks for answering again.

The files I tried to upload were:
1 jpg file with the size of: 130Kb
1 jpg file with the size of: 49Kb
1 txt file with nothing but a line in it.
For the great day of wrath is coming, and who shall be able to stand?

greyknight17

Going back to the directory path again....

Go to Admin->Attachments and Avatars. Do you see any red text near the attachment directory path there? Try using /htdocs/forum/attachments/ and see if it helps with the attachment problem.

WolfLust

Thank you for your reply greyknight17,

I changed the path to /htdocs/forum/attachments/ which made a red text to be lit near the attachment directory. Got the same error as well.
For the great day of wrath is coming, and who shall be able to stand?

greyknight17

If you want, send me a PM with temporary access to a admin account and also FTP access (change the password first). I'll take a quick look and see if I can see what the problem is.

WolfLust

Thank you greyknight17, I sent you the private msg
For the great day of wrath is coming, and who shall be able to stand?

greyknight17

OK, you have more than one error in your log there (877 pages worth....). The one you should have mentioned is probably the below since it gives us more details:

2: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/htdocs/forum/attachments/) is not within the allowed path(s): (/var/www/virtual/metalje.com:/usr/share/php:/tmp/)
File: /var/www/virtual/metalje.com/htdocs/forum/Sources/ManageAttachments.php
Line: 176


You might have to get your host involved in this unless they allow you to change the open_basedir value using a php.ini file. They need to turn that restriction off.

WolfLust

I can change anything there, can you please guide me concerning what to do?
For the great day of wrath is coming, and who shall be able to stand?

greyknight17

Open up your php.ini file and look for:

open_basedir

See what is it set to now (just curious ;)). Replace it with:

;open_basedir

and see if it helps

WolfLust

in: /etc/php4/apache2/php.ini and in /etc/php5/apache2/php.ini

It already is set to: ;open_basedir =

Thanks again.
For the great day of wrath is coming, and who shall be able to stand?

greyknight17

#32
Try using open_basedir = none.....

Otherwise, contact your host and ask them how you can disable it. I thought that should have commented it out already...

Not sure if this plays a role, but in your phpinfo file, there is no value set for the Master Value column.

WolfLust

I will do that first thing in the morning.

Thank you for all the help!!
For the great day of wrath is coming, and who shall be able to stand?

Rumbaar

It's strange the path of /htdocs/forum/attachments/ should be /var/www/virtual/metalje.com/htdocs/forum/attachments/ and you've got that set in your attachment settings.  So don't know what it's not hitting the correct full path.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

SlammedDime

Quote from: WolfLust on March 08, 2008, 10:11:11 PM
in: /etc/php4/apache2/php.ini and in /etc/php5/apache2/php.ini

It already is set to: ;open_basedir =

Thanks again.
The problem probably lies in a .htaccess file in the directory.  If you view your phpinfo.php file, it shows the master value as none, but the local value as a directory... look at the .htaccess file in your htdocs directory and see if it has a line setting the open_basedir
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

WolfLust

Thanks for replying SlammedDime,

Here's what's in: /htdocs/forum/attachments/.htaccess

<Files *>
        Order Deny,Allow
        Deny from all
        Allow from localhost
</Files>


Please advise
For the great day of wrath is coming, and who shall be able to stand?

SlammedDime

No no, just look in "/htdocs/" and see if there is an .htaccess file with open_basedir info.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

WolfLust

Sorry for the late reply.

I don't have a .htaccess file in /htdocs/

there's only:

/htdocs/htm.htaccess
/htdocs/htmV4.htaccess
/htdocs/html.htaccess
/htdocs/htmlV4.htaccess
/htdocs/phtml.htaccess
/htdocs/phtmlV4.htaccess
/htdocs/htaccess.txt

And in all these the rule is:
;open_basedir =

For the great day of wrath is coming, and who shall be able to stand?

SlammedDime

It may be a bit time consuming, but look in each of the following files and look for anything related to open_basedir

/etc/php5/apache2/conf.d/curl.ini, /etc/php5/apache2/conf.d/gd.ini, /etc/php5/apache2/conf.d/mcrypt.ini, /etc/php5/apache2/conf.d/mhash.ini, /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/pspell.ini
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: