I am trying to upload a file to an Apache2 server on Windows 2000 Pro.
The temp file name is being added to the database.
Everything seems to work except the file is not actually transferred to the
directory. I have searched the entire hard drive for the temp file name but
it is not saved.
I have tried both defining and not defining upload_tmp_dir in PHP.ini
Both directories have had share activated.
Any suggestions on what I am doing wrong?
Thanks.
Ken
-----------
Part of HTML table, input of file:
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_start() ;
<form enctype="multip art/form-data" name="picture" method="post"
action="ty.php" >
<input type="hidden" name="MAX_FILE_ SIZE" value="2000000" >
<input type="file" size="68" name="pictures" ></td></tr>
------------------------
Part of ty.php
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_start() ;
include('./store_data.php' );
print("Name = ".$_FILES['pictures']['tmp_name']."<br><br>") ;
echo "Did file upload = ".is_uploaded_f ile
($_FILES['pictures']['tmp_name']);
---------------------------
store_data.php
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_name('w iclassifiedads' );
session_start() ;
--------------------------
Results:
Name = C:\PHP\uploadte mp\phpD5.tmp
Did file upload = 1
--------------------------------------
Insert into mysql database
mysql_query("IN SERT INTO data (published, picture1, picture2) Values('not
published','not listed', '{$_FILES['pictures']['name']}')");
Do I need to actually write script to copy the file into the directory, or
does the mysql_query perform the task?
Ken
The temp file name is being added to the database.
Everything seems to work except the file is not actually transferred to the
directory. I have searched the entire hard drive for the temp file name but
it is not saved.
I have tried both defining and not defining upload_tmp_dir in PHP.ini
Both directories have had share activated.
Any suggestions on what I am doing wrong?
Thanks.
Ken
-----------
Part of HTML table, input of file:
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_start() ;
<form enctype="multip art/form-data" name="picture" method="post"
action="ty.php" >
<input type="hidden" name="MAX_FILE_ SIZE" value="2000000" >
<input type="file" size="68" name="pictures" ></td></tr>
------------------------
Part of ty.php
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_start() ;
include('./store_data.php' );
print("Name = ".$_FILES['pictures']['tmp_name']."<br><br>") ;
echo "Did file upload = ".is_uploaded_f ile
($_FILES['pictures']['tmp_name']);
---------------------------
store_data.php
<?php
error_reporting (E_ALL);
// error_reporting (0);
session_name('w iclassifiedads' );
session_start() ;
--------------------------
Results:
Name = C:\PHP\uploadte mp\phpD5.tmp
Did file upload = 1
--------------------------------------
Insert into mysql database
mysql_query("IN SERT INTO data (published, picture1, picture2) Values('not
published','not listed', '{$_FILES['pictures']['name']}')");
Do I need to actually write script to copy the file into the directory, or
does the mysql_query perform the task?
Ken
Comment