FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » different servers, different results with a file upload
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: different servers, different results with a file upload [message #175195 is a reply to message #175190] Sun, 21 August 2011 19:52 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 8/21/2011 12:11 PM, bill wrote:
> I have a small script that works fine on the development server, but
> when I try to run it for real on the production server it does not work.
>
> here is the html:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
> <html>
> <head>
> <title>CaseNoteCheck</title>
> </head>
> <body>
>
> <h2>Case Note Edit Checker</h2>
> <form action="caseNoteChecker.php" method="POST"
> enctype="multipart/form-data" >
> <input type="hidden" name="MAX_FILE_SIZE" value="40000" />
> <input type="file" name="caseNote"/>
> <input type="submit"/>
> </form>
>
> </body>
> </html>
>
> here is the top of the php script:
> <?php
> //caseNoteChecker.php receives file from CaseNoteChecker.html
>
> session_start ();
> error_reporting(E_ALL);
>
> $_SESSION ['current_user'] = "WPD";
>
>
> echo "<pre>";
> print_r($_POST);
> print_r($_FILES);
> echo "</pre>";
>
> On the development server the file uploads correctly and all is well. On
> the production server the $_FILE array is empty.
>
> Array
> (
> [caseNote] => WPD-CaseNotes.txt
> )
> Array
> (
> )
>
> and naturally it fails.
>
> I searched with google and found a terrific article by jkorpela, but
> afak I am doing it right.
>
> Suggestions to debug this please. It must be a server configuration
> issue but I don't know where to look.
>
> bill

The fact the $_POST array is empty means PHP isn't getting the
information from the web server.

First thing to check on things like this is your HTML - is it valid?

Next would be differences between the two web servers.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Roll SQL name value query into two-dimensional array
Next Topic: strtotime
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 14:24:24 GMT 2024

Total time taken to generate the page: 0.04252 seconds