mhopkins321
mhopkins321

Reputation: 3083

Error 500 on uploading pdf

My site throws an Error 500 when uploading a pdf.

I have gone into the php.ini page and changed

file_uploads = On
upload_max_filesize = 2m

to

file_uploads = On
upload_max_filesize = 100m

Yet it still throws the 500 error. I'm at a loss as to why my server won't allow this.

I should also state the file I'm testing this with is only 50kb.

EDIT:


The source of this error has lead to another question I had but wasn't quite ready to figure it out. Anyways, here it goes.

I am having the user verify the contents of the pdf they uploaded, and then I want to pass it to another page to save the file to a local drive.

The error the log is throwing is

PHP Parse error:  syntax error, unexpected ';' in updatePDF-check.php on line 36

Line 36 is as follows

echo "<input type = 'hidden' name = 'uploadedFile' value = '".$_FILES['file']."'">;

Which leads to the question. How should I have this page display the file, and then pass it on to the next page so that it can be saved?

double edit, fixed the typo in the above line, but my question still stands I believe

echo "<input type = 'hidden' name = 'uploadedFile' value = '".$_FILES['file']."'>";

It should be worth stating that display_errors was also turned off in the php.ini file. So I have turned that on as well

Upvotes: 0

Views: 1049

Answers (1)

user1832464
user1832464

Reputation:

Your parse error will be fixed with this:

echo "<input type = 'hidden' name = 'uploadedFile' value = '".$_FILES['file']."'>";

Your > was one char too far to the right :)

Upvotes: 1

Related Questions