close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

errors on send

Thread began 8/04/2010 10:14 am by randyw2394710 | Last modified 4/03/2012 7:55 pm by Jason Byrnes | 1510 views | 9 replies |

randyw2394710

errors on send

I have a simple for got password form. The email sends the information, but it has these errors at top of the page.


Warning: array_search() [function.array-search]: Wrong datatype for second argument in /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php on line 356

Warning: array_search() [function.array-search]: Wrong datatype for second argument in /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php on line 356

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php:356) in /home/va010021/public_html/daveLimo/webassist/email/mail_php.php on line 285

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php:356) in /home/va010021/public_html/daveLimo/webassist/email/mail_php.php on line 285

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php:356) in /home/va010021/public_html/daveLimo/admin/forgot_password.php on line 124

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php:356) in /home/va010021/public_html/daveLimo/admin/forgot_password.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php:356) in /home/va010021/public_html/daveLimo/admin/forgot_password.php on line 126

Sign in to reply to this post

Eric Mittman

I'm not sure why you are getting the first error about the array. When I check the mailformating file that I have it only has 205 lines in it, so the error being reported on line 356 seems out of place. The other errors referencing the headers are just letting you know that output has already occurred on the page so these header calls are being ignored. These messages are only there because of the first error you are getting. Once you get past that these other errors should go away.

You should try deleting your webassist > email folder from your site root and applying UE to another page then test out that page. If you get the same error post back with a copy of the webassist folder and the page with UE applied to it in a zip archive so I can take a look.

Sign in to reply to this post

fms77717Beta Tester

array_search

Originally Said By: Eric Mittman
  I'm not sure why you are getting the first error about the array. When I check the mailformating file that I have it only has 205 lines in it, so the error being reported on line 356 seems out of place. The other errors referencing the headers are just letting you know that output has already occurred on the page so these header calls are being ignored. These messages are only there because of the first error you are getting. Once you get past that these other errors should go away.

You should try deleting your webassist > email folder from your site root and applying UE to another page then test out that page. If you get the same error post back with a copy of the webassist folder and the page with UE applied to it in a zip archive so I can take a look.  



I am getting the same error on line 356 and my mailformatting_php.php file has 375 lines.
Here is the function that is causing the error:
The second line (the if (array_search...) is the problem area.
I would very much appreciate your help on this asap.
Thanks.

function RemoveValue($theValue, $theExact, $theStart, $theEnd, $theInclude) {
if (array_search($theValue,$theExact) !== false) {
return true;
}
for ($x=0; $x<sizeof($theStart); $x++) {
if (strpos($theValue,$theStart[$x]) === 0) {
return true;
}
}
for ($x=0; $x<sizeof($theEnd); $x++) {
if (strrpos($theValue,$theEnd[$x]) === strlen($theValue)-strlen($theEnd[$x])) {
return true;
}
}
for ($x=0; $x<sizeof($theInclude); $x++) {
if (strrpos($theValue,$theInclude[$x]) !== false) {
return true;
}
}
return false;
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

please post back with a copy of the webassist folder and the page with UE applied to it in a zip archive so I can take a look at the code.

Sign in to reply to this post

fms77717Beta Tester

Still getting error on line 356

Jason,

Are there any resolutions to the problem of getting the following error message from Unversal Email when used in conjunction with eCart5?

"Warning: array_search() [function.array-search]: Wrong datatype for second argument in /home/va010021/public_html/daveLimo/webassist/email/mailformatting_php.php on line 356"

The shopping cart works just fine and the emails are being sent just fine, but I have an admin checkout which bypasses the payment process and simply posts the transaction to the database. All I want is for Universal Email to send a confirmation email to the client and to admin. It does that well, but I still get the line 356 error message.

Thanks for any light you can shed on this problem.

Sign in to reply to this post

Jason ByrnesWebAssist

i'll need to look at the code in your pages to troubleshoot the problem.

please post back with a copy of the webassist folder and the page with UE applied to it in a zip archive so I can take a look at the code.

Sign in to reply to this post

fms77717Beta Tester

Attached files for Error on Send - Line 356

Joshua,

I have attached a zip file for our Shopping Cart, which was created with eCart 5 and utilizes Universal Email 4. We have the latest packs and everything works perfectly for our clients. We are very impressed with your products and have acquired several of your extensions.

The only problem we have is when we have an admin checkout. We get the Line 356 error, which I started this Thread with. The emails still get sent it is just the error message that is annoying for our Front Desk.

I have attached four zip files.

Thanks for your help.

Attached Files
WA_eCart.zip
email.zip
error on send - Line 356.zip
paypal.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/email/waue_checkout_success_admin_8.php, you have added code from the email templates to loop through the form contents:

php:
foreach( $_POST as $pkey => $pval ){

  if (!RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {



that code from the templates, relies on other variables that are set at the top of the template file that you have not copied over.


change this code:

php:
//Start Mail Body

$MailBody = $MailBody . "<html><head></head><body>\r\n";




to:

php:
//Start Mail Body

$remove = array();
$remove[]  = "";
$remove[]  = "x";
$remove[]  = "y";

$removeBegins = array();
$removeBegins[] = "Security";

$removeEnds = array();
$removeEnds[] = "_x";
$removeEnds[] = "_y";

$removeIncludes = array();
$removeIncludes[] = "Security";
$MailBody = $MailBody . "<html><head></head><body>\r\n";
Sign in to reply to this post

fms77717Beta Tester

Works like a charm

Jason,

I needed to add the code to capture the post back from the checkout form.

I implemented your changes and it works like a charm.

Thank you very much.

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working, i understand why you copied the code, I was only trying to explain that it is only half of the code you needed to copy.

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