close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

ERROR: headers already sent

Thread began 9/03/2009 12:05 am by peter383096 | Last modified 9/09/2009 6:21 am by peter383096 | 9055 views | 21 replies |

peter383096

ERROR: headers already sent

HI, I have been through this a couple of times now and I can't see where I am going wrong. I start with a working Data assist Insert and update page, then I follow the steps from the PDF "Adding Digital File Pro to DataAssist Insert and Update Pages" when I upload the file everything seems to work fine but the file is not uploaded, my permissions on the server are correct etc.

I have tried with the beta download also and still come upon the same issue...

when I add the below debug code I get the error placed on the page below

php:
<?php 

error_reporting
(E_ALL); 
ini_set('display_errors',on); 
?>



  Notice: Use of undefined constant on - assumed 'on' in /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php:3) in /usr/home/fuelcd/www/htdocs/fuel09-Manager/WA_DigitalFilePro/HelperPHP.php on line 70

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php:3) in /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php on line 154  



any help will be greatly appreciated.

cheers
Pete

Sign in to reply to this post

Jason ByrnesWebAssist

My guess is that when the error reporting code was added you included a trailing space on the closing php tag, for example:
"?> "

instead of "?>"


a lot of times when the image is not uploading, it is because the form tag does not have the enctype="multipart/form-data" attribute, for example:

html:
<form action="" method="post" enctype="multipart/form-data" id="form1">
Sign in to reply to this post

peter383096

no trailing space....
and enctype is and was correct - the form was generated by data assist
I have attached the code that was generated by your software. I would appreciate it if you could take a peek and see why it is breaking

Cheers
Pete

Sign in to reply to this post

peter383096

here is a link to the attachment
attachment.php?attachmentid=342&stc=1&d=1252014376

Attached Files
jobs_Insert.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

line 3:
ini_set('display_errors',on);


should be:
ini_set('display_errors','on');



Line 5 -7 dont look correct either:
<?php require_once("file:///website/fuel09-Manager/WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('file:///website/fuel09-Manager/Connections/FuelManagement.php'); ?>
<?php require_once("file:///website/fuel09-Manager/WA_DigitalFilePro/HelperPHP.php"); ?>


they should not have a file reference, it should be a relative path the included files:
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('Connections/FuelManagement.php'); ?>
<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>



The only time I have seen the require-once lines use a file reference is if you save as outside of the website and when Dreamweaver asks to update links you answer yes.

Sign in to reply to this post

peter383096

  line 3:
ini_set('display_errors',on);

should be:
ini_set('display_errors','on');  


I have made this change.

  Line 5 -7 dont look correct either:
<?php require_once("file:///website/fuel09-Manager/WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('file:///website/fuel09-Manager/Connections/FuelManagement.php'); ?>
<?php require_once("file:///website/fuel09-Manager/WA_DigitalFilePro/HelperPHP.php"); ?>


they should not have a file reference, it should be a relative path the included files:
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once('Connections/FuelManagement.php'); ?>
<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>



The only time I have seen the require-once lines use a file reference is if you save as outside of the website and when Dreamweaver asks to update links you answer yes.  


yep sorry - the links were broken when I did a save as in order to zip the file... I must have clicked yes... it is not like that on the live site, so this is not the problem.

I still get the below error code

  Notice: Use of undefined constant on - assumed 'on' in /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php:3) in /usr/home/fuelcd/www/htdocs/fuel09-Manager/WA_DigitalFilePro/HelperPHP.php on line 70

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php:3) in /usr/home/fuelcd/www/htdocs/fuel09-Manager/jobs_Insert.php on line 153  



Here is a link to the new page with the changes ou requested - attachment.php?attachmentid=343&stc=1&d=1252017607

Thanks for your time.
Pete

Attached Files
jobs_Insert-rev.php.zip
Sign in to reply to this post

peter383096

is it possible for someone to upload a working version of a Data Assist Insert page with a Digital file Pro form field in it. that way I can do some comparisons and see what is breaking. This thing is doing my head

Sign in to reply to this post

Jason ByrnesWebAssist

1) That error "Notice: Use of undefined constant on - assumed 'on' " will only occur when there is no single quote around on in the ini_set command:
ini_set('display_errors','on');

Delete the page on the server and reupload to make sure your changes are making it up to the server.

2) I still some some file referances in your file tha twill cause problems and need to be fixed:

<form action="file:///website/fuel09-Manager/jobs_Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">

<input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="file:///website/fuel09-Manager/WA_DataAssist/images/Slate/Elemental_insert.gif" />


3) For Debugging, temporarily change line 133:
$WA_redirectURL = "jobs_Detail.php";

to:
$WA_redirectURL = "";

so that no redirect will take place.


4) On the bindings panel, expand the WA Global status binding group and bind the debug info binding to the page, this will help us in finding the cause of the problem.

Sign in to reply to this post

peter383096

4) On the bindings panel, expand the WA Global status binding group and bind the debug info binding to the page, this will help us in finding the cause of the problem.


could you please expand on this step?

Attached Files
jobs_Insert.php.zip
Sign in to reply to this post

peter383096

Hi ignore my last post, here is the error generated. the permissions on "upload" is 777

the live page is here is that helps.
jobs_Insert.php

Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1
WA_UploadResult1_1:
clientFileName :
fileExtension :
serverFileName :
serverSimpleFileName :
serverDirectory :
contentType :
fileSize : -1
imageWidth : -1
imageHeight : -1
statusCode : 0
errorMessage : No file uploaded



Cheers
Pete

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...