You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 64 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Can no longer upload to my site!! [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Tue Jan 06, 2004 2:26 am Reply with quoteBack to top

My web host was hacked over xmas and they have changed their servers to make them more "secure" since this I have no longer been able to upload to my site, either in the gallery or the downloads module.

I get the following error

Warning: copy(): open_basedir restriction in effect. File(/tmp/php8GNRLV) is not within the allowed path(s): (/home/www/) in /home/www/mysite/modules/Downloads/index.php on line 448

Warning: unlink(): open_basedir restriction in effect. File(/tmp/php8GNRLV) is not within the allowed path(s): (/home/www/) in /home/www/mysite/modules/Downloads/index.php on line 453

I get a similar error when trying to upload to my gallery.

I emailed my hosts and they said



Quote:
Also,
it sounds like you are using php_upload to upload your files, you need to make
sure that your scritps are streaming the files from the

tmp folder to your upload folder

the code for php uploads should be

eg

if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
...
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $dest)) {
...
}
}

where $dest is in my home dir. move_uploaded_file fails. As you can see
this is standard PHP code.

php script do not have access directly to the /tmp folder, as it is a big
security whole with php, which it would appear that your scripts

are doing, you therefore need to make the necessary changes in your code for the
php_upload to work


This is all new to me as the site was working fine a week ago and now it wont let me upload.
I have tried chmodding the tmp/ folder to have write permissions but that didnt work, can someone help me out

Cheers
Find all posts by BongolonianView user's profileSend private message
billy
Nuke Soldier
Nuke Soldier


Joined: Aug 13, 2003
Posts: 16

Location: huntington VT

PostPosted: Tue Jan 06, 2004 7:33 am Reply with quoteBack to top

the same thing happened to me...you, by chance aren't using greenmountaccess.net are you!? figures that the only time i really need to use my gallery, for a portfolio that a customer needs to see, it doesn't work...i NEED a new module that allows upload via html now...i am so pissed! i paid good money for that module!

_________________
remember where you've been, it's helps with where you're going!
Find all posts by billyView user's profileSend private messageSend e-mailVisit poster's websiteYahoo Messenger
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Wed Jan 07, 2004 4:49 am Reply with quoteBack to top

No Im with web-mania

Can someone help me out with getting my uploads working again.

Another weird thing that has happened is that I cant enter any fields into my polls, if i enter any it still saves the poll with no fields!!
Find all posts by BongolonianView user's profileSend private message
graphicalx
Nuke Cadet
Nuke Cadet


Joined: Jan 07, 2004
Posts: 4


PostPosted: Wed Jan 07, 2004 10:39 am Reply with quoteBack to top

Not sure 100 % about this, but Ive seen this error on my own site and what I did to fix it was to restore the saved (backed up) (last known working copy)database file in mysql on my web host.... problem solved.... I think this error may be just a table or 2 in the databse got corrupted somehow
Find all posts by graphicalxView user's profileSend private message
graphicalx
Nuke Cadet
Nuke Cadet


Joined: Jan 07, 2004
Posts: 4


PostPosted: Wed Jan 07, 2004 10:41 am Reply with quoteBack to top

Also check folder and file permissions again in case they too have changed after some hackers were there or whatever.....I know this is obvious, but the easiest stuff to forget is usually the most obvious heh...
Find all posts by graphicalxView user's profileSend private message
graphicalx
Nuke Cadet
Nuke Cadet


Joined: Jan 07, 2004
Posts: 4


PostPosted: Wed Jan 07, 2004 11:01 am Reply with quoteBack to top

umm check your folders permissions first before doing any database restore... hopefully you wont need to do that, and Im not sure that will even fix it...Im not an expert but doing recent installs the things are fresh in my mind...
Find all posts by graphicalxView user's profileSend private message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Wed Jan 07, 2004 11:26 am Reply with quoteBack to top

what should the folder permissions be?

e.g. what chmod parameter?

cheers
Find all posts by BongolonianView user's profileSend private message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Thu Jan 08, 2004 8:35 am Reply with quoteBack to top

can anyone else offer some help here, this problem is really getting on my nerves!
Find all posts by BongolonianView user's profileSend private message
kipuka
Sergeant
Sergeant


Joined: Dec 19, 2003
Posts: 105


PostPosted: Thu Jan 08, 2004 10:50 am Reply with quoteBack to top

Directory permissions need to be 777 (read/write/execute for owner, group, public). On some server setups you can get away with as little as 666 (read/write for owner, group, public). The warning messages you received though do not indicate this to be the problem. They say the script is trying to use the copy() and unlink() functions on the server's /tmp directory which you aren't allowed to do. I agree with your host; scripts should not have direct access to that folder because it's an easy way to break into a server.

I haven't looked at or used either script; however, your host did tell you what needed to be fixed. The scripts have to be modified to use move_uploaded_file() instead of copy/unlink. Depending on how your server is set up, you might also be able to do this by merely creating and using a /tmp directory for uploads located within your own allowed directory structure.
Find all posts by kipukaView user's profileSend private message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Thu Jan 08, 2004 12:54 pm Reply with quoteBack to top

thanks for the help mate!

Im getting even more stuck now.
It seems I have 2 gallery folders on my website, one in my home dir and on in the modules/ folder.

I tried deleting each one at a time and one will not work without the other, so I created a new temp folder called "tempdir" and cmodded it as you said but it seems that the gallery is still trying to use the /tmp folder even though I have run through the config to tell it to use the new tempdir folder

It still states

Error: The file "/tmp/phpVsByDd" does not exist


Cheers for any more help
Find all posts by BongolonianView user's profileSend private message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Fri Jan 09, 2004 5:24 am Reply with quoteBack to top

also if i was to try and edit the scripts, which files would I need to edit ?
Find all posts by BongolonianView user's profileSend private message
kipuka
Sergeant
Sergeant


Joined: Dec 19, 2003
Posts: 105


PostPosted: Fri Jan 09, 2004 1:14 pm Reply with quoteBack to top

Which specific scripts and versions are you running? There seems to be a few of each type around.
Find all posts by kipukaView user's profileSend private message
Bongolonian
Private
Private


Joined: Jun 20, 2003
Posts: 36


PostPosted: Fri Jan 09, 2004 3:05 pm Reply with quoteBack to top

gallery 1.4.1
and advanced downloads module

But the gallery is the main one I am wanting to fix!
Find all posts by BongolonianView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.414 Seconds - 417 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::