Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Other
Author Message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Wed Apr 12, 2006 9:41 am Reply with quote

how can I change the file upload restriction size? I need it a tad bit larger. Thanks!
 
View user's profile Send private message Visit poster's website
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Wed Apr 12, 2006 11:30 pm Reply with quote

Larger than what - 2 MB? There are 2 places for that: 1) in the HTML on the upload page, and 2) in the php.ini.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
blith







PostPosted: Thu Apr 13, 2006 2:58 am Reply with quote

Thank you. Now I see that the size was not the problem. I am getting this error in my error log when people try to upload, I talked about this once before and I though it was solved, it is not. The error:
Code:
PHP Warning:  move_uploaded_file(): Unable to move '/tmp/phpFviUO3' to '/home/*****/public_html/Files/AlleywayTrader.zip' in /home/*****/public_html/modules/Submit_Downloads/index.php on line 202

PHP Warning:  move_uploaded_file(/home/*****/public_html/Files/AlleywayTrader.zip): failed to open stream: Permission denied in /home/*****/public_html/modules/Submit_Downloads/index.php on line 202

Line 202 is:
Code:
} elseif (move_uploaded_file($imageurl_temp, $cidinfo['uploaddir']."/$imageurl_name")) {

Can anyone please help me... thank you.
 
kguske







PostPosted: Thu Apr 13, 2006 8:36 am Reply with quote

Looks like a permissions problem on the /public_html/Files directory. It needs write access - try 666 or 777.
 
blith







PostPosted: Thu Apr 13, 2006 4:07 pm Reply with quote

kguske wrote:
Looks like a permissions problem on the /public_html/Files directory. It needs write access - try 666 or 777.

Okay I changed permissions on the folder and it is working... at least i was able to upload a file... is it unsecure to have a folder permissions at 666 or 777? Thanks!
 
kguske







PostPosted: Thu Apr 13, 2006 5:40 pm Reply with quote

It might depend on your host. If 666 works, you should use that.
 
blith







PostPosted: Fri Apr 14, 2006 7:54 am Reply with quote

What would have caused this to stop working? I had received submissions through it before and got the email telling me about them and everything. Then people started telling me of errors and I found them in my error log...
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Apr 14, 2006 8:21 am Reply with quote

Let me ask you this, has this ever happened to you on your .htaccess file that Sentinel uses?

Also, had you by chance uploaded some directories/files that could have "touched" this directory at all?

I am not 100% certain yet where this is going, but trying to look for clues...

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
blith







PostPosted: Sat Apr 15, 2006 3:35 pm Reply with quote

hmm no I do not think so about Sentinel. Can you give an example of your second question? Thank you for your help.
 
montego







PostPosted: Sat Apr 15, 2006 3:55 pm Reply with quote

Regarding the second question, I think I have seen some FTP client reset permissions on a file/folder upon uploading. So, I was wondering if maybe you re-uploaded something and it reset the directory permissions.
 
blith







PostPosted: Sat Apr 15, 2006 4:28 pm Reply with quote

ah. I have had one person ftping files..... interesting. I will see what client he was using.
 
montego







PostPosted: Sat Apr 15, 2006 4:33 pm Reply with quote

You might want to run a test with him/her to see if it is changing the directory permissions.
 
kguske







PostPosted: Sun Apr 16, 2006 11:19 am Reply with quote

That is unusual - I haven't heard of FTP clients changing permissions by default, but you can certainly do that on purpose.
 
blith







PostPosted: Fri Apr 21, 2006 8:42 am Reply with quote

kguske wrote:
Larger than what - 2 MB? There are 2 places for that: 1) in the HTML on the upload page, and 2) in the php.ini.

I'm sorry I do not know where the php.ini is inside the NSN GR downloads. I need to change the size of allowed uploads...
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Apr 21, 2006 2:14 pm Reply with quote

It isn't - it is a server file. If you don't have access to it, you need to talk to your host

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
kguske







PostPosted: Fri Apr 21, 2006 6:21 pm Reply with quote

In some cases, you can override it by creating a local PHP.ini - but unfortunately, you'll need a complete INI. You can only override certain settings locally and / or through php commands (which could be added to your config.php file, if desired.
 
kguske







PostPosted: Sat Apr 22, 2006 7:16 am Reply with quote

In your .htaccess file, you could try something like: php_value upload_max_filesize 20M

Or, in your config.php: ini_set(upload_max_filesize, 20M);

Remember that the HTML setting must also be override (it checks on the client browser and defaults to 2MB, if I remember correctly).
 
montego







PostPosted: Sat Apr 22, 2006 8:02 am Reply with quote

kguske wrote:
That is unusual - I haven't heard of FTP clients changing permissions by default, but you can certainly do that on purpose.


I have personally had this happen to me back in the days when I was using Exceed's terrible FTP client. Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NSN Other

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©