upload.php on line 54

See all posts Reply

upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
I am using the index.html test form which does include the form field "my_field" and yet i'm getting the line 54 error. I made available the gd2 dll in the php.ini file which was the first problem. You see i'm a new user that would love to implement this functionality in my application. Thanks in advance.Reply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
What is the error that you get?Reply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
class.upload.php test forms

Notice: Undefined index: my_field in C:\...\upload.php on line 54
file not uploaded on the server
Error: File error. Please try again.
Reply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
I see what happens. You can't call upload.php like that. You have to call index.html, which is the test form.

In your browser, replace upload.php with index.html and you should be fine.Reply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
"In your browser, replace upload.php with index.html and you should be fine."

Colin (Thanks for your interest) I already am using the Index.html. I put in a file and press the upload button. I end up on "upload.php" because of the form action="upload.php" on the index.html pageReply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
For some reason, the data of your form is not transmitted to upload.php.

Try to add the following at the start of upload.php
die(print_r($_POST, 1) .print_r($_FILES, 1))

Check if your browser is properly set, and if your server is OK. It seems to be a local problem.Reply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
Colin

I get this below the header of class.upload.php test forms

Array ( ) Array ( ) 

Sorry only written about a dozen php but these are in production. However I'm weak at it so thanks for your help.

What does this mean?Reply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
(Sorry for double post refreshed my Browser) Does this mean that the form parameters are not getting to upload.php ?Reply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
Yes, it means that for some reason, the form data is not getting to upload.php.

What is your server? Are you running Apache under Windows? Do you have other problems with other scripts?Reply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
Colin,

I'm working on my server at home now and i'm still getting negative results. I don't want to confuse the issue and i'm going to work on the home issue and attempt to solve.

I am a java guy who has configured 3 seperate servers on different machines (PC's) and I push the results to the main site on the web when i'm done. I have written about a dozen php scripts which includes a lot of file manipulation. These worked fine on Apache tomcat and they worked identically on the apache server I use on the web.

I'm probably doing something basically wrong.

I'm unpacking the zip into a single folder on the doc root so I have an application called "class.upload_0.25" with the "lang" folder just below that.

I also configured php.ini with the GD dll extension.

As a novice i'm asking you what am I obviously doing wrong?

Im running php 5.02Reply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
I don't see any wrongdoing from what you describe. It looks to me like there is a problem of setup of Apache, but I can't be categoric.

Of course, you only need Apache to run PHP, not Tomcat. Are you running PHP alongside Tomcat? Using mod_jk?

I would also recommend to upgrade to PHP 5.2.xReply
Re: upload.php on line 54 new!
by Charles Canada, 16 years, 10 months ago
Good News:-I put the configuration on Apache on my web environment and Whamo! It worked straight away.
I had configured Tomcat about 6 months ago to run PHP alongside Java (Don't ask) and all previous PHP scripts had worked fine.

Tomcat on PHP looses ALL parameters on a POST from a FORM.

This was within a windows environment (That it was failing)

Well done on your brilliant utility. I might contact you again in the not so distant future..Reply
Re: upload.php on line 54 new!
by colin, 16 years, 10 months ago
Glad you got it working :)

Feel free to contact me any time.Reply