You are here: T_STRING error with pack function « PHP Programming Language « IT news, forums, messages
T_STRING error with pack function

Posted by mb2812 on 04/13/06 17:49

I'm getting the T_STRING error ("Parse error: syntax error, unexpected
T_STRING in alexa5.php on line 26") when using the pack function:

function calculate_RFC2104HMAC ($data, $key) {
return base64_encode (
pack ( "H*" , sha1((str_pad($key, 64 , chr ( 0 x00))
( str_repeat ( chr ( 0 x5c), 64 ))) .
pack ( "H*" , sha1((str_pad($key, 64 , chr ( 0 x00))
( str_repeat ( chr ( 0 x36), 64 ))) . $data))))

);

}

"Line 26" refers to line 3 above: "pack ("H....."

I have no experience with pack, but the pack manual doesn't give me any
clues as to the problem. I've commented out the pack stuff and replaced
it with a print command to ensure it was this and not the previous line
that is causing the problem.

I've been working on this for several hours and have asked the best PHP
friends I have, and have gotten no leads. Any hints from you guys would
do wonders for my morale.

You can see the full code here
http://developer.amazonwebservices.com/connect/thread.jspa?threadID=6825&start=13

thank you, thank you, thank you

matt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация