ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339
Rep:
PHP (ick!) question.
When i do a php file upload, the file is not actually saved.
example: ,<removed link so people dont upload crap>
If i upload a file, it does not appear on my server, and yes i a serving this on 'dows and no i dont want a security lecture.
07-Apr-2010 00:14:02] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[07-Apr-2010 17:17:27] PHP Warning: Unexpected character in input: ''' (ASCII=39) state=1 in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\forum\cache\ctpl_admin_acp_main.html.php on line 257
[07-Apr-2010 17:17:27] PHP Parse error: syntax error, unexpected $end, expecting ']' in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\forum\cache\ctpl_admin_acp_main.html.php on line 257
[08-Apr-2010 04:03:18] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[08-Apr-2010 04:03:19] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[08-Apr-2010 04:03:22] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[11-Apr-2010 14:47:38] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[11-Apr-2010 17:52:49] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[11-Apr-2010 18:01:07] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[11-Apr-2010 19:45:43] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[11-Apr-2010 19:55:17] PHP Notice: Undefined index: fixed in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 49
[12-Apr-2010 18:07:32] PHP Notice: Undefined variable: id in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\comment.php on line 32
[16-Apr-2010 15:03:34] PHP Fatal error: Maximum execution time of 30 seconds exceeded in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\forum\viewtopic.php on line 1031
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: title in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 51
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: id in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 51
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: status in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 52
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: poster in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 59
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: version in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 60
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: date in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 61
[17-Apr-2010 15:32:54] PHP Notice: Undefined variable: description in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test\read_bug.php on line 62
[18-Apr-2010 15:39:23] PHP Fatal error: SQL ERROR [ mysql4 ]<br /><br />Got error 28 from storage engine [1030]<br /><br />SQL<br /><br />SHOW COLUMNS FROM phpbb_config<br /><br />BACKTRACE<br /><div style="font-family: monospace;"><br /><b>FILE:</b> includes/db/mysql.php<br /><b>LINE:</b> 174<br /><b>CALL:</b> dbal->sql_error()<br /><br /><b>FILE:</b> install.unu/database_update.php<br /><b>LINE:</b> 261<br /><b>CALL:</b> dbal_mysql->sql_query()<br /></div><br /> in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\forum\includes\db\dbal.php on line 697
[19-Apr-2010 19:42:35] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 2
[19-Apr-2010 19:42:35] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 8
[19-Apr-2010 19:42:35] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 9
[19-Apr-2010 19:42:35] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 10
[19-Apr-2010 19:42:35] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 11
[19-Apr-2010 19:43:04] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 2
[19-Apr-2010 19:43:04] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 8
[19-Apr-2010 19:43:04] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 9
[19-Apr-2010 19:43:04] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 10
[19-Apr-2010 19:43:04] PHP Notice: Undefined index: file in F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\admin.upload\upload_file.php on line 11
Last edited by smeezekitty; 04-20-2010 at 01:03 AM.
Reason: Removed link so people dont upload crap to my server
I see no real issues with the code you have presented, but I did notice that the 2 fatal and 1 parse errors are on wildly
differently numbered lines. Maybe we should be looking at that code?
That would indicate the the file has uploaded, so now you need to move it from the temp location to where it is you want to store it on the server. This is done by using the move_uploaded_file() function.
Not quite, the first argument would be the temp file name the second will be the file location, in which you would normally provide the directory and use the file name from the uploaded file.
You do of course need to be careful with that to ensure that you don't overwrite any files you wish to keep.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.