Warning: session_start() error message with file upload form
With DFP2, I have a very simply upload form, which is intended to upload to a /Downloads/ folder that is outside the web root. When I attempt to upload a file, the following errors are shown.
Notice: Use of undefined constant on - assumed 'on' in E:\webs\lsmontgomery.com\wwwroot\uploadDownload.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at E:\webs\lsmontgomery.com\wwwroot\uploadDownload.php:3) in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 70
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at E:\webs\lsmontgomery.com\wwwroot\uploadDownload.php:3) in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 70
I included the code, <?php error_reporting(E_ALL); ini_set('display_errors',on); ?> at the top of the page and <?php echo WA_DFP_AllUploadsDebug(); ?> at the bottom of the page in an attempt to debug the page. This gave me the following listing:
Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName : images/spacer.gif
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName : images/spacer.gif
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded
WHEN I REMOVED THE DEBUGGING CODE, the following error messages appeared.
Warning: mkdir() [function.mkdir]: Permission denied in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 30
Warning: move_uploaded_file(E:\webs\lsmontgomery.com\wwwroot\..\..\downloads\454b08a5fa82b1c3595b76aee7c0f477_tmp.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 96
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\temp\PHP-uploads\php2D81.tmp' to 'E:\webs\lsmontgomery.com\wwwroot\..\..\downloads\454b08a5fa82b1c3595b76aee7c0f477_tmp.jpg' in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 96
Warning: copy(E:\webs\lsmontgomery.com\wwwroot\..\..\downloads\454b08a5fa82b1c3595b76aee7c0f477_tmp.jpg) [function.copy]: failed to open stream: No such file or directory in E:\webs\lsmontgomery.com\wwwroot\WA_DigitalFilePro\HelperPHP.php on line 98
I have contacted my web host about permissions for this folder. He tells me that the /downloads/ folder has read/write access.
Any help you can give me in debugging this problem would be very much appreciated.
Best regards,
Terry Montgomery