Allow Uploads From Different IP?

Mar 8, 2010

I have two sites with the same content on the same server but under two different IP addresses (which I suspect may be the problem) On user photo uploads, they fail on the new site that's under a different IP though the database and ever ything else is fine. They use the same photos with a symbolic link and the upload path is for the original site. So I suspect that its a php or Unix permissions issue with uploading from a different IP address.

View 1 Replies


File Uploads Over 40 MB Cause 500 Error - Smaller Uploads Work Just Fine

I use this PHP upload script that uses Ajax: [URL] Really great script. However, when people upload a file over 40 MB (or maybe after a specific amount of minutes) the upload fails at 100%, when I check the Ajax-response I see a "500 Error". I checked the global error_log and per-site error_log, couldn't find any error there. php.ini max filesize is 300M, post max size is also 300M. php.ini max execution time is 0. All of these values are in the global php.ini.

View 9 Replies

Uploads Folder Outside Of 'public_html' Enough To Keep Application Secure From Malicious Uploads?

Although I realise there are different approaches to securing upload process, I'm still confused when it comes to basic principles. I want to allow users to upload any kind of file they want, but keep my app secure. So my question is: Is it sufficient to store the files with their original names in 'uploads' folder outside 'webroot' and fetching them via some download.php script?

If it't not secure enough, please point me in the right direction, or suggest what additional steps I should take to make it safe.

View 2 Replies

Post - File Uploads Being "hijacked" By Partial Uploads?

I have a site that is receiving 30-40k photo uploads a day and I've been seeing an issue pop up with more frequency now. This issue is this:

Our upload script receives (via $_FILES['name']['tmp_name']) a file (photo) that was NOT uploaded by the user & the majority of the time the file received is a "partial" upload.

Of course at first I thought it was my PHP code making a simple mistake and I've spent days looking over it to make sure, but after placing checks in the code I've found that the file received via a HTTP POST upload to PHP is actually the wrong file. So the issue is happening before it reaches my code. The tmp file (phpxxxx) received by the script is sometimes incorrect, as if it was somehow being overwritten by another process and its usually overwritten by a file that was partially uploaded.

Has anyone every seen an issue like this? Any help is greatly appreciated. I'm turning to this as a last resort after days of searching/asking other PHP devs

So to recap:

User uploads a photo PHP script receives a file that was not uploaded by the user (pre code, via $_FILES in /var/tmp) Usually the incorrect file received is a partial upload or a broken upload It seems to happen randomly and not all the time

View 2 Replies

FTP Uploads

I have written an ftp script. When I execute it, the file is recognized by the script, the remote server is connected, and the ftp user is able to log in. However, I have only been able to upload one particular file and no others. I know this is weird, but the only file that it will accept is the source code of the script itself. It transfers this file with no problems.

This is a weird problem. At the risk of spamming my code and iritating people, in order to save time, I will go ahead an post the code for this script.

<input type=file name=target_file>
<input type=submit name=submit_file>


$filename = $_FILES['UPLOADED_FILE']['name'];
$filesize = $_FILES['UPLOADED_FILE']['size'];

$ftp_server = "server";
$ftp_login = "user";
$ftp_pass = "pass";
$remote_path = "remote_path/ftp_uploads";

echo "<font color="#D20000">ERROR:</font> Please select a valid file to upload.<br>";
{ $ftp_connection_handle = ftp_connect($ftp_server, 21);

echo "<font color="#D20000">ERROR:</font> Could not establish an ftp connection.<br>";
$ftp_login_handle = ftp_login($ftp_connection_handle, $ftp_login, $ftp_pass);

echo "<font color="#D20000">ERROR:</font> Could not successfully login to ftp server.<br>";

ftp_pasv($ftp_connection_handle, true);

if(ftp_put($ftp_connection_handle, $remote_path.$filename, $filename, FTP_BINARY))
echo "File <b>$filename</b> uploaded successfully in BINARY format.<br>";
else if(ftp_put($ftp_connection_handle, $remote_path.$filename, $filename, FTP_ASCII))
echo "File <b>$filename</b> uploaded successfully in ASCII format.<br>";
echo "<font color="#D20000">ERROR:</font> File <b>$filename</b> was not uploaded.<br>";

$server_OS = ftp_systype($ftp_connection_handle);

echo "<br><br><u>File info</u><br>File: $filename<br>Size: $filesize";
echo "<br><br><u>Server info</u><br>Server OS: $server_OS";


View 1 Replies

Allows Up To 10 Uploads

I basically want to make an upload site, that: only allows specified extensions

allows up to 10 uploads and once uploaded, tells them the url of their file(s).

View 2 Replies


im having trouble with upload. i think its timing out i change the 60 to 600 still no help 2.53mb work but 2.93mb+ will not go

register_globals = off
allow_url_fopen = off

memory_limit = 50M
post_max_size = 8M
file_uploads = On
upload_max_filesize = 8M

expose_php = Off
max_input_time = 600
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12

View 1 Replies

Max Uploads

I know this question has probably been asked before but i cant find any definitive answers anywhere.. Performance wise what is the maximum file size that can be uploaded by php? I know that you set it in php.ini file and i have full control of the server so i can change these settings when needed.

The program i am going to make is like a drop box for files between 50mb and 200mb, would this be a problem doing it with PHP upload? would any other applications be put at risk of shutting down if the user is uploading files? are there any modules / applets that would help the running of the upload system (animation to show how much has been uploaded?). Plus any other problems that i may come accross.

View 1 Replies

File Uploads With PHP

I'm writing an uploading page for a website I'm working on. This
website will hopefully allow users to upload files of up to 100MB in
size. The web administrator has increased all the limiting variablies
in php.ini such as:

post_max_size = 150M
upload_max_filesize = 150M
max_execution_time = 600

MAX_FILE_SIZE within the uploading form is also set to 150MB.

However if I try to upload a file greater then 20MB from a PC within
my companys office i get an error message saying that the request is
too large for our web cache. I'm also told that if other users have a
web cache between them and their internet connection they could
experience the same problem.

Does anyone know a way round this problem? Is it possible to bypass
the web cache somehow so that this dosent happen?

View 7 Replies

Can PHP Do Multiple Uploads?

I would like to be able to browse to a directory, highlight several files and upload them. Is this possible or can PHP only do one at a time?

View 1 Replies

Multiple Uploads

I have been trying to figure out how to make thumbnails with GD2. However, I just can't seem to get it. Can anyone tell me how to modify this code to create a thumbnail (and keep the picture intact)? I have found some references, but most are either for imagemagic, or running a sepperate script on to "batch" create thumb nails.

If not.. then how about making it allow more than one picture upload... can I just add another form field and add another variable... PHP Code:

View 3 Replies

Images And Uploads

I'm making a uploader for a form. I have a form that is sending variables to the following upload phpscript which also updates the name of the file into a database. The problem is that the file is being uploaded and updated into the database but the file is empty. It is just the name that is being uploaded into the directory and not the actual file. If anyone has any advice I would greatly appreciate it. Here is the code:

View 2 Replies

PHP 4.2.0 And File Uploads??

When using the new $_FILES var how do you use it for multiple uploads. Does it become a 3 dimensional array or not?? Say if I were to find the name of file number 3 in my upload would I do it like this? PHP Code:

View 1 Replies

File Uploads In PHP

I'm creating a photo contest script where people can submit entries through a form. The PHP script works on my server.

I want to be able to test it locally on my computer. I have Apache HTTP Server 2.0.48, PHP 4.3.4 and MySql installed and they work fine with all other PHP scripts I have. But I'm unable to "upload" locally in my computer. Code:

View 1 Replies

Multiple Uploads...

Im trying to upload multiple images and resize them, I can get the code to work with one upload but not 2? Code:

View 7 Replies

Picture Uploads

I have a form in which I want people to insert info and then add some pictures. All of it is to go into a mysql database so that later I can present it later in a different format. My problem is that I can't seem to merge a standard uploader in with the form I have.

View 1 Replies

Form Uploads

The thing is i want to stay on the same page and have it outputted there, for the rest of the image manipulation i have used javascript to simply change the src of the image i want to manipulate but ive made the src=anotherscript.php?parameters

But on the upload form if i use the post action to send it to the javascript function that changes the image src and then in anotherscript.php i get the upload info and display the image and it doesnt work. Do i hv to go straight to another page to process the script or is there a way to send the data but stay on the same page?

View 3 Replies

Image Uploads

I am building a community website. It will have a Content Management System that I am building myself. I will be building an Admin Control Panel dat will allow admin to "approve" members so that certain ones can become authors and submit articles through the CMS. Now here is my dilema. Once they are approved, I want a directory to be created (which will reflect the users screenname) so that all the images that they load related to their articles can be loaded there.

1. What is the best way to create these directories? (FTP or MKDIR)
2. What is the best way to upload the files? (securely)
3. Any suggestions or pointers on how to allow users to include these images in their articles?

View 1 Replies

PHP And File Uploads

Here's one thing that I don't know much about - file uploading. As part of my project, I will have to build a file manager of sorts - perhaps a document manager. Anyhow, this involves allowing my user to upload files to a location. I know PHP can do it - I know this because it sure does everything else. but I don't know this from any authoritative source. can you tell me if PHP can handle files uploads, and if so, what are the drawbacks that you might have learned of in your experience? For instance, in the ASP world, using a COM object for the upload works, but apparently has significant impact on performance.

View 7 Replies

Partial Uploads

I wrote a quick admin for a site, with basic image uploads.

It was working for around 2 weeks, now suddenly it started getting buggy, then it just stopped working.

now when i upload i am getting error 3, UPLOAD_ERR_PARTIAL , the uploads are definetaly not being cancelled by the browser.

I havent come across this before so dont really know the first step to fixing it, and there seems to be no documentation into what causes this.

View 5 Replies

NON-image Uploads

I know that you can get the actual mime type of a valid image file in the getImageSize() array's 3rd element since the mime type header in the $_FILES array can be spoofed, but what if I want to handle uploading of mp3 files (or anything else, for that matter)? Is there a way to arbitrarily get the mime type of an uploaded file? I know that I could probably find documentation for the structure of each file type that I want to handle and then parse the binary data to grab the file type, but I'm not experienced in that type of programming, and I'd like to find a more elegant solution.

View 3 Replies

Form Uploads Url

im trying to make a very very simple news blog where via one form/textarea i can enter both a couple of comment-lines and enter a URL/textlink (in the same textarea). the result being a link inside a text block. i know how to do it with separate inputs but cant figure out how to do it in one go.

View 6 Replies

Splitting Uploads Up

I am currently trying to write a simple PHP script that will split an uploading file up into 500kb "chunks", then read and concatenate them back together when accessed for download. I can't seem to be able to find a way to split the file purely in PHP while it is in the middle of uploading using the move_uploaded_file function. I am trying to get it to store the file like so:

MySong.mp3 3mb
gets uploaded to my server in this format:

/uploads/MySong/1 500kb
/uploads/MySong/2 500kb
/uploads/MySong/3 500kb
/uploads/MySong/4 500kb
/uploads/MySong/5 500kb
/uploads/MySong/6 500kb.

View 6 Replies

[RESOLVED] Php.ini For Uploads

I have these settings in my php.ini file

memory_limit = 32M ;
set_time_limit = 3600;
max_input_time = 3600;
upload_max_filesize = 10M ;
post_max_size = 12M ;
max_execution_time = 500 ;

I can easily upload a file of 500k but it fails on a file of 2.7Mb with "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 13056 bytes)" I'm confused as I've looked all around the web for solutions and it seems I've covered all bases with my ini settings?

View 1 Replies

Concurrent Uploads

I am using the following code to upload files (3 files at one go in a single page!)

move_uploaded_file($_FILES["file".$i]["tmp_name"],"../../Photos/" .$_FILES["file".$i]["name"]);

["file".$i] indicates file "upload slots" on the page. I am concerned with ["tmp_name"], is this a string or an indicator to PHP file upload handler, I am worried what will happen if two concurrent user uploads files will the file get mixed up? If so I can try to device a way by replacing ["tmp_name"].

View 14 Replies

Progress Bar During FTP Uploads

I have written a code which successfully uploads files using FTP in PHP however, i want to show users a progress bar about the upload. Please tell me how do it do it.

View 5 Replies

Copyrights 2005-15, All rights reserved