Hey guys,
I have searched on the forum for similar problems with uploading files via PHP, and have made the changes suggested in those topics. However, I am still experiencing issues. My setup has two parts: an HTML form and PHP script.
HTML Form
<form method="post" action="session_uploader.php" id="submit_session_scores">
<table>
<tr><td align="right">Session Stats File:</td><td><font color="#4096EE"><input type="file" name="filename" id="filename" size="35" /></font></td></tr>
<tr><td align="right">1 + 1 =</td><td><font color="#4096EE"><input type="text" name="test" id="test" class="contactform" size="10" /></font></td></tr>
<tr><td align="right"><input type="submit" value="Submit" id="submitok" name="submitok" /></td><td><input type="reset" value="Clear Form" id="clear_form" /></td></tr>
</table>
</form>
Session_Uploader.php Script
[php]
[/php]
No matter what file the user attempts to upload, they receive the error: “Sorry, there was a problem uploading your file…” Therefore, I can see that the move_uploaded_file() test is failing.
What have I tried to rectify this issue?
[ul][li]I have set the CHMOD settings on the “statfeeds” directory to 777 (full read, write, and execute permissions). No success.[/li]
[li]I have set the CHMOD settings on the main directory containing both the HTML form and the PHP script to 777 (full read, write, and execute permissions). This results in an Internal 500 error from the servor, probably due to the HTML file attempting to load with incorrect directory permissions.[/li]
[li]I have tried setting $target to a static value, such as “statfeeds/session_stats.csv”. I then uploaded a file with the exact same name. No success.[/li]
[li]I have tried putting a value other than 2 in the test input box in the form. This results in the error: “Numerical test failed.” as expected. This shows that the numerical test is successful.[/li]
[li]I have contacted my hosting provider (Globat) who is looking into my server’s setup for any errors there. I haven’t heard back from the support team yet.[/li]
[li]I have tried banging my head into the keyboard a ridiculous number of times. This had little positive effect on the success of the script, but I did accidentally delete a song by the Jonas Brothers. Therefore, I conclude that this adjustment was marginally successful ;D .[/li][/ul]
I have seen this script used successfully on a countless number of other sites, so I may be missing something trivial here…any help or added insight you could provide would be greatly appreciated!
THANK YOU SO MUCH!!!
-Tom Winchester-