Advertisement:

Author Topic: Cannot upload attachments  (Read 16313 times)

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,802
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Cannot upload attachments
« Reply #20 on: March 06, 2008, 01:48:53 AM »
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 ]

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #21 on: March 07, 2008, 09:39:22 PM »
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?

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,802
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Cannot upload attachments
« Reply #22 on: March 07, 2008, 10:10:54 PM »
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 ]

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #23 on: March 08, 2008, 03:30:52 PM »
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?

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Cannot upload attachments
« Reply #24 on: March 08, 2008, 04:14:36 PM »
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.

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #25 on: March 08, 2008, 04:49:18 PM »
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?

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Cannot upload attachments
« Reply #26 on: March 08, 2008, 05:15:34 PM »
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.

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #27 on: March 08, 2008, 08:18:56 PM »
Thank you greyknight17, I sent you the private msg
For the great day of wrath is coming, and who shall be able to stand?

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Cannot upload attachments
« Reply #28 on: March 08, 2008, 09:42:00 PM »
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.

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #29 on: March 08, 2008, 09:43:16 PM »
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?

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Cannot upload attachments
« Reply #30 on: March 08, 2008, 10:04:22 PM »
Open up your php.ini file and look for:

Code: [Select]
open_basedir
See what is it set to now (just curious ;)). Replace it with:

Code: [Select]
;open_basedir
and see if it helps

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #31 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.
For the great day of wrath is coming, and who shall be able to stand?

Offline greyknight17

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 14,890
  • Gender: Male
    • Kevin's Resource Center
Re: Cannot upload attachments
« Reply #32 on: March 08, 2008, 10:21:48 PM »
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.
« Last Edit: March 08, 2008, 10:23:34 PM by greyknight17 »

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #33 on: March 08, 2008, 10:23:03 PM »
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?

Offline Rumbaar

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,802
  • Gender: Male
  • Inherent Omniscience
    • Rumbaar.net
Re: Cannot upload attachments
« Reply #34 on: March 08, 2008, 10:23:22 PM »
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 ]

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: Cannot upload attachments
« Reply #35 on: March 09, 2008, 01:14:02 AM »
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...
                     

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #36 on: March 09, 2008, 11:12:59 AM »
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?

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: Cannot upload attachments
« Reply #37 on: March 09, 2008, 12:28:05 PM »
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...
                     

Offline WolfLust

  • Semi-Newbie
  • *
  • Posts: 53
  • Gender: Male
Re: Cannot upload attachments
« Reply #38 on: March 10, 2008, 07:31:23 PM »
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?

Offline SlammedDime

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,280
  • School of Air Ride
    • matt.zuba on Facebook
    • @mattzuba on Twitter
    • ZubaFitness
Re: Cannot upload attachments
« Reply #39 on: March 12, 2008, 02:56:51 AM »
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...