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

Broken PHP in WA_CalculatedHash

Thread began 6/02/2009 1:32 pm by mike264653 | Last modified 8/25/2009 8:46 pm by tom92909 | 2560 views | 8 replies |

mike264653

Broken PHP in WA_CalculatedHash

I used the eCart 4.5 wizard to create a cart connecting to Authorize.net. When I went to view my pages to see the info pass my confirm.php displayed up until the hidden fields and then nothing. After commenting out different codes I found this line generated by the wizard that was breaking the page. I don't know what needs to be edited to make it work.

<?php $WACalculatedHash = WA_CalculateHash("MYIDNUMBER", "MYKEYNUMBER", "".$Frubob_eCart->GrandTotal() ."", "".AuthNet_RandomID() ."", "USD")?>

I am running this on a MAMP apache server with PHP 5.2.6 with HASH enabled and the MB5 engine.

Sign in to reply to this post

Ray BorduinWebAssist

Maybe the include file is missing so that function isn't properly defined? Do you get a specific error? When you view the source can you maybe see an error in one of the last lines of the html before it stops displaying?

Sign in to reply to this post

mike264653

Error from source

<b>Fatal error</b>: Call to undefined function mhash() in <b>/Users/HD_Purple/Sites/frubob/WA_eCart/checkoutScripts/WA_simlib.php</b> on line <b>30</b><br />


Line 30 from WA_simlib.php
return (bin2hex (mhash(MHASH_MD5, $data, $key)));

Sign in to reply to this post

Ray BorduinWebAssist

Sounds like your version of php doesn't have mhash installed:

mhash

Sign in to reply to this post

mike264653

MHASH vs HASH

php.net says that the mhash extension is obsolete and replaced by hash. Is there a way to run the eCart to Authorize.net using hash, which is enabled on my server?
Authorize.net suggests using hmac for php versions later than 5.1.2. How can I get the eCart you use this?

Sign in to reply to this post

Ray BorduinWebAssist

You can update that one line of code. Currently it uses mhash, but it is only used in that one place, so you can try updating it to hash or hmac.

Sign in to reply to this post

tom92909Beta Tester

I'm getting a similar error message...

I'm using PHP & MySQL. eCart v4.5 with Authorize.net and my confirm.php to my checkout_success.php page transition is giving me the following...

php:
Warning: require_once(WA_eCart/checkoutScripts/WA_simlib.php) [function.require-once]: failed to open stream: No such file or directory in /public_html/checkout_success.php on line 10


Fatal error: require_once() [function.require]: Failed opening required 'WA_eCart/checkoutScripts/WA_simlib.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /public_html/checkout_success.php on line 10



I have no /checkoutScripts/WA_simlib.php directory below WA_eCart.

Standard installation of the extension and a clean new cart creation from scratch...?

Sign in to reply to this post

Ray BorduinWebAssist

Search your user configuration for that file "WA_simlib.php" and move it to the appropriate location. It should be created automatically, but something must have prevented that.

Sign in to reply to this post

tom92909Beta Tester

Thanks. That was a little strange, but I was able to manually create the directory and add the required file.

Sign in to reply to this post

lilryansd360589

same problem

This post has been deleted.

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