close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Buttons not displayed on Confirm page

Thread began 6/19/2011 9:30 am by James L | Last modified 6/24/2011 6:50 am by Jason Byrnes | 3530 views | 11 replies |

James L

Buttons not displayed on Confirm page

When I upload the site to my remote host the confirm page works fine, with the "modify information" and "submit order" buttons showing and working.

However when I upload the site to my client's hosting service, The buttons don't show and the customer is stuck, not being able to proceed.

I had this same issue when viewing the site on my local host. Ray Borduin told me that I needed to turn on something in my local server's PHP for this to work. We were talking on the phone and I've lost where I wrote the answer...

I assume I'll have to get tech support at my client's hosting service to make the change, so I need to have the correct terminology to explain it to them..

Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, add the following code at line 1 to turn on error reporting:

php:
<?php

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



and post a link to your confirm page so I can see what the issue may be.

Sign in to reply to this post

James L

Confirm page issues

Jason,
You've trained me to add the error code to the beginning of every php page, so it's already there (but no error messages display).

I'll send you two links: the first is to my host (where I put the site as a demo for the client), where the confirm.php page works fine:
jimrstudios.com/pr/store.php
(I added the store page because you have to have something in the cart and put in an address to see the effect on the confirm page).

Next are the exact same files uploaded to the client's host server, where the buttons DO NOT show up on the confirm page:
myhairrelaxer.com/store.php

Sign in to reply to this post

Jason ByrnesWebAssist

you have to view the page source to see the error:


<b>Fatal error</b>: Call to undefined function mhash() in <b>/home2/charles4/public_html/WA_eCart/checkoutScripts/WA_simlib.php</b> on line <b>30</b><br />


sounds like your php server does not have the mhash library enabled.

try changing the WA_eCart/checkoutScripts/WA_simlib.php file to use the hash function instead.

change:
return (bin2hex (mhash(MHASH_MD5, $data, $key)));


to:
return (bin2hex (hash(MHASH_MD5, $data, $key)));

Sign in to reply to this post

James L

mhash is the answer

Jason-
no wonder I couldn't remember the fix: "mhash" such a strange word. Computer code is so picky! Just remove a single "m" and everything's fine...
Thanks again.
-Jim

Sign in to reply to this post

Jason ByrnesWebAssist

glad to here it is working.

Sign in to reply to this post

James L

Working but NOT really working

Jason,
While that change in code allows the submit button to show, BUT while it connects to Authorize.net, I get an error message from them. After spending several hours on the phone with Authorize.net tech support they narrowed the error to the change in the M5HASH setting having to do with "x_fp_timestamp." They have an tool called "paradump" which displayed this "explanation":

<br /> <b>Notice</b>: Use of undefined constant MHASH_MD5 - assumed 'MHASH_MD5' in <b>/home2/charles4/public_html/WA_eCart/checkoutScripts/WA_simlib.php</b> on line <b>30</b><br /> <br /> <b>Warning</b>: hash() [<a href='plugins/function.hash'>function.hash</a>]: Unknown hashing algorithm: MHASH_MD5 in <b>/home2/charles4/public_html/WA_eCart/checkoutScripts/WA_simlib.php</b> on line <b>30</b><br /> 1308681959

So it appears we need a different fix for getting the buttons to display, or perhaps a different way to send the timestamp info. But whatever, I need to get this resolved immediately. Please, please help me =(

Sign in to reply to this post

Jason ByrnesWebAssist

you should contact the host and have them enable the mhash() library on the server. that library defines the mhash function and the MHASH_MD5 constant that are being used by this code.

Sign in to reply to this post

James L

Now What??? I'm in a panic...

From: support-level1@contact4.westhost.com
Date: Tue, Jun 21, 2011 8:07 pm
Subject: [#266370] Requesting mhash library

Jim,

Thank you for contacting WestHost Technical Support. Unfortunately it looks like the admins would be unable to install this for your account without changing other accounts on this same server. In order for this to happen you may need to purchase a cloud server, or find an alternative to the mhash library. If you want to describe the issue I can try to give you an alternative or maybe a couple of ideas to help guide you in the right direction. I apologize we weren't able to install this for you, but with the shared servers there isn't much inside of the system that we can change without possibly breaking something.

--
Best regards,

Neal Hansen
Technical Support Representative
WestHost.com

Sign in to reply to this post

Jason ByrnesWebAssist

you can try changing the following code in the WA_eCart/checkoutScripts/WA_simlib.php fille:

php:
function hmac ($key, $data)

{
return (bin2hex (mhash(MHASH_MD5, $data, $key)));
}



to:

php:
function hmac ($key, $data) 


   // RFC 2104 HMAC implementation for php. 
   // Creates an md5 HMAC. 
   // Eliminates the need to install mash to compute a HMAC 
   // Hacked by Lance Rushing 

   $b = 64; // byte length for md5 
   if (strlen($key) > $b) { 
       $key = pack("H*",md5($key)); 
   } 
   $key  = str_pad($key, $b, chr(0x00)); 
   $ipad = str_pad('', $b, chr(0x36)); 
   $opad = str_pad('', $b, chr(0x5c)); 
   $k_ipad = $key ^ $ipad ; 
   $k_opad = $key ^ $opad; 

   return md5($k_opad  . pack("H*",md5($k_ipad . $data))); 
}




if that does not work, you will need to find a host willing to install the mhash library for you.

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