close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Moved website now gets error sending files

Thread began 12/04/2012 6:30 pm by chris373619 | Last modified 12/05/2012 1:06 pm by chris373619 | 876 views | 6 replies |

chris373619

Moved website now gets error sending files

I just moved my ISP and now I get two errors on the upload page.

Page: send_file.php
Messages:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/69/10142169/html/send_file.php:37) in /home/content/69/10142169/html/WA_DigitalFilePro/HelperPHP.php on line 70

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/69/10142169/html/send_file.php:37) in /home/content/69/10142169/html/WA_DigitalFilePro/HelperPHP.php on line 70

Any idea what this is from?

Sign in to reply to this post

Jason ByrnesWebAssist

The headers already sent error is caused by output between PHP tags. it could be a blank space, a blank line or HTML code.

this section of the error:
headers already sent by (output started at /home/content/69/10142169/html/send_file.php:37)

is telling you that the problem is caused around line 37 of the send_file.php file. look for a closing php tag at line 36 and any out put after it.

see this thread for more details on the cause of the headers already sent error and how to troubleshoot:
showthread.php?t=19285

Sign in to reply to this post

chris373619

I looked at the link but couldn't find anything I could use to help.

I looked at the code on my "send_file.php" document. Below is the php code from line 37 to 71.

Line 37 has memory_limit code. Could that have changed due to the new server?
I'm wondering what version of php the new server has also. Should I have a specific
version of php installed?


Code:
<?php ini_set("memory_limit","250M"); ?>
<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "upload/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Submit"])){
WA_DFP_UploadFiles("WA_UploadResult1", "upload", "0", "", "false", $WA_UploadResult1_Params);
}
?>
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST")) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry

//Send Mail All Entries
$RecipientEmail = false;include("WA_Universal_Email/WAUE_index_1.php");
if (""!="") {
header("Location: ");
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

if you examine the link a little more carefully, one trick is to enable hidden elements which will show spaces.

the most likely culprit is a blank space after a closing php tag:
"?> "

or a blank line between a closing php tag and the next opening tag:
...?>

<?php...

Sign in to reply to this post

chris373619

I looked back at your link and read through the possible problems. I didn't see those issues in the code. Can you see if you see them?

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

Jason ByrnesWebAssist

wellllll, the php code that is at lines 37 - 73:

php:
<?php ini_set("memory_limit","250M"); ?>

<?php 
require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    
'UploadFolder' => "upload/",
    
'FileName' => "[FileName]",
    
'DefaultFileName' => "",
    
'ResizeType' => "0",
    
'ResizeWidth' => "0",
    
'ResizeHeight' => "0",
    
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End 
?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(isset(
$_POST["Submit"])){
    
WA_DFP_UploadFiles("WA_UploadResult1""upload""0""""false",
$WA_UploadResult1_Params);
}
?>
<?php 
require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php 
require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST"))     {
  
//WA Universal Email object="mail"
  //Send Loop Once Per Entry

  //Send Mail All Entries
  
$RecipientEmail false;include("WA_Universal_Email/WAUE_index_1.php");
  if (
""!="")     {
    
header("Location:");
  }
}
?>




should be above the doctype tag at line 1.

by having that code inside the HTML, it is causing the headers already sent error

Sign in to reply to this post

chris373619

That was it. I would have never figured that one out.
Thanks for your help!

Sign in to reply to this post

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...