News:

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

Main Menu

Cannot upload attachments

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

Previous topic - Next topic

Rumbaar

Can you do that from your base folder of your forum as well, I think we need to see the actual folders.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

WolfLust

Certainly, thank you for replying:

ls -l
total 680
-rwsrwsrwx  1 vu2017   vu2017     3355 2007-09-29 10:25 agreement.txt
drwsrwsrwx  2 vu2017   vu2017     4096 2008-03-26 05:35 attachments
drwsrwsrwx  8 vu2017   vu2017     4096 2008-02-13 21:10 avatars
-rwxrwxrwx  1 vu2017   vu2017   439118 2007-09-29 10:25 changelog.txt
drwxrwxrwx 16 vu2017   vu2017     4096 2008-02-17 21:25 chat
-rw-rw-rw-  1 www-data www-data     73 2008-03-19 21:18 dologout.php
-rwxrwxrwx  1 vu2017   vu2017    14803 2008-03-19 21:18 index.php
-rwxrwxrwx  1 vu2017   vu2017    14732 2008-03-19 21:18 index.php~
-rwxrwxrwx  1 vu2017   vu2017     4001 2007-09-29 10:25 license.txt
-rwxrwxrwx  1 vu2017   vu2017     2646 2007-09-29 10:25 news_readme.html
drwsrwsrwx  3 vu2017   vu2017     4096 2008-03-19 21:18 Packages
-rwxrwxrwx  1 vu2017   vu2017     8747 2007-09-29 10:25 readme.html
-rwxrwxrwx  1 vu2017   vu2017     3762 2008-03-25 12:07 Settings_bak.php
-rwsrwsrwx  1 vu2017   vu2017     3762 2008-02-27 18:42 Settings.php
-rwxrwxrwx  1 vu2017   vu2017     3759 2007-09-30 15:45 Settings.php~
drwsrwsrwx  7 vu2017   vu2017     4096 2007-09-29 10:25 Smileys
drwxrwxrwx  2 vu2017   vu2017     4096 2008-03-24 17:52 Sources
-rwxrwxrwx  1 vu2017   vu2017     5692 2007-09-29 10:26 ssi_examples.php
-rwxrwxrwx  1 vu2017   vu2017     5391 2007-09-29 10:25 ssi_examples.shtml
-rwxrwxrwx  1 vu2017   vu2017    60028 2008-03-19 21:18 SSI.php
-rw-rw-rw-  1 www-data www-data  57681 2008-03-19 21:18 SSI.php~
drwsrwsrwx  6 vu2017   vu2017     4096 2007-09-29 10:25 Themes
For the great day of wrath is coming, and who shall be able to stand?

WolfLust

Hello again everyone,

www-data is the apache user, so I chown the forum directory with a -R to www-data

Still cannot upload attachments.

Thank you for taking the time to read this.
For the great day of wrath is coming, and who shall be able to stand?

SlammedDime

Do you know how to configure virtual hosts in the Apache httpd.conf file?  Or do you at least have access to that file?  It would normally be located in /etc/php5/apache2/conf/http.conf (based on your file paths).  I know you posted two earlier, but those directories didn't seem right... there should be one in the /php5/apache2 directory somewhere as well.  You could do a "find /etc/php5 -name 'httpd.conf'" at your shell prompt to find it if its not in the folder I mentioned.  If so, could you post that file here (attach it to a post, don't post the whole contents in a post)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

WolfLust

Thank you for taking the time to reply SlammedDime,

find /etc/php5 -name 'httpd.conf' returns nothing.

I also tried to updatedb and then locate http.conf and the result is attached to a file in this message.

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

SleePy

WolfLust,

Did you get this resolved?

Have you checked the tmp folder is writable in php?
Do a <?php phpinfo(); ?>
Then check to see where the tmp folder is and if it is writable.

When files are uploaded they go to the tmp folder and then are moved by SMF to their new location.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

WolfLust

Hello SleePy,

By doing what you asked me I get:
                                             Local Value                                                   Master Value
open_basedir   /var/www/virtual/metalje.com:/usr/share/php:/tmp/   no value

This means that /tmp is my temp folder right?
by doing ls -al at / I get:
drwxrwxrwx   6 root root      8192 2008-04-10 14:49 tmp

the apache user is: vu2017

Please advise and thank you for your time
For the great day of wrath is coming, and who shall be able to stand?

SleePy

WolfLust,

Well thats not the tmp folder, but that does raise another question.
Is your attachment folder in one of those paths set by open_basedir restrictions?

What is the exact error message smf is giving you when you try to upload something?
Hopefully this will point us in the right direction to why it doesn't work.

Are uploads configured in php.ini?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

WolfLust

Thanks for replying SleePy,

my attachments folder is: /var/www/virtual/metalje.com/htdocs/forum/attachments/

How can I tell if uploads are configured in php.ini?

And the error msg I get is:

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.

SleePy please note that the attachments I'm trying are txt files with a very few lines written inside, and the extension is allowed.

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

Sarge

Hello WolfLust,

I read through the whole topic. What I'm thinking is that, if we assume that the attachments directory is correctly set, then either 1) the routines used for checking that the directory is writable are buggy, or 2) the configuration of your OS somehow prevents attachments from working as expected.

What is the operating system on the server?

If you can send me the login info for an SMF admin account and your own FTP account (change the password first) via PM, I should be able to take a closer look at it.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

WolfLust

Hello Sarge,

Thank you for taking the time to read the topic and for replying.

The OS is Linux version 2.6.8-2-386 ([email protected]) (gcc version 3.3.5 (Debian 1:3.3.5-13)) ,  and please find the log in and ftp information in a private message sent to you.

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

WolfLust

Thank you Sarge!!!!

What a life saver.

Thanks man, attachments finally work.
For the great day of wrath is coming, and who shall be able to stand?

Sarge

You're welcome! :)

For the record, the solution was to set the temporary upload directory in php.ini:


upload_tmp_dir = /tmp

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Advertisement: