Browsing articles tagged with "fileupload - 2/2 - Admins Goodies"
Aug 16, 2011
tom

File Permissions: Who are the user, group, and others on my web server? What perms should i use for uploaded files, php files, etc.?

I am using cPanel with apache 2 and php 5.2. I have a file upload script, which currently puts the uploaded files in a directory with 0777 perms and the file itself also has 0777 perms. this is because with other perms, i would be thrown an “Invalid Access” error. so, what perms should i use so that the files are secure, but can still be accessed when a user wants to download them via […]

Continue Reading »
Aug 13, 2011
tom

Is it possible to upload only files that have been updated into a server?

Suppose I have a server accessible via FTP and it hosts websites Suppose I want to edit the website locally so it wont affect the site live, and suppose I edit a whole bunch of files, and I don’t want to deal with the hassle of keeping track of which files I’ve edited all the time… Once I finished editing I want to upload it to the server via FTP….is there some FTP software that […]

Continue Reading »
Aug 12, 2011
tom

500 Internal Server Error when uploading large files to MediaWiki

When I upload a large (>245 Mb) file to my MediaWiki wiki (using Upload file, same as for images), I see: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. This is a .avi file. I have set this as a permissible file type in LocalSettings.php. How can I solve this? Is there a time out for uploading files (though this takes less than 10 seconds)? […]

Continue Reading »
Aug 9, 2011
tom

Directory and files stuck on server after upload

I’ve uploaded some files into a directory i’ve created (using a php upload script). At first I didn’t set the right chmod for dir. and files (411 instead of 777). Now this folder and files are stuck on the server, can’t delete using FTP, cant delete using script: unlink/rmdir. I don’t have server acces. Is there any way to still do this using PHP scripting? If chmod (“/somedir/somefile”, 755); // php script code does not […]

Continue Reading »
Aug 9, 2011
tom

Apache Uploads and Security

Recently it has become an issue that a user on one of our systems needs the ability to have the apache user have read and write capability to their site so that the upload portion of their site works correctly. How would you minimize the risk of somebody malicious going in and submitting a file that ends up being able to delete files in the web directory or worse yet taking over the apache daemon? […]

Continue Reading »
Aug 9, 2011
tom

Pushing updates to live server… FTP isn’t cutting it… a better method?

I’m the lead developer in a team of 2. My partner has only just joined the project and despite using GIT for version control etc, we are still stuck in the dark ages when it comes to code deployment. Currently I make all site updates via FTP (this way I have control / responsibility over everything that goes live), using Filezilla. I’ve done this for years, but we now have some large PHP classes (300KB), […]

Continue Reading »
Aug 9, 2011
tom

PHP Image upload folder

What is the correct way to allow users to upload images to a site? I’m using mod_php so everything is done by apache, not the domains user. Right now I just chmod 777 the images folder and hope for the best I’ve been looking at adding an .htaccess file to prevent PHP from running in that folder. “I’m using mod_php so everything is done by apache, not the domains user.” I’d suggest stopping that right […]

Continue Reading »
Aug 9, 2011
tom

Uploads timing out – all server limits should be fine

I recently moved my file upload service to a new host, a Windows server (was on CentOS before). I’m running IIS + PHP on it, and moved all the php.ini settings from the previous server to the new one. The problem is, however, that large uploads seem to be timing out. The JS uploader never gets a response from the PHP script, as I guess it times out. Here are the most common upload related […]

Continue Reading »
Pages:«12