Doc #68487 [NEW]: blenc_encrypt() expects php source code to not contain any php tags

From: Date: Mon, 24 Nov 2014 07:04:10 +0000
Subject: Doc #68487 [NEW]: blenc_encrypt() expects php source code to not contain any php tags
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11698@lists.php.net to get a copy of this message
From: czarek dot tomczak at gmail dot com Operating system: Windows 7 64bit PHP version: 5.4.35 Package: BLENC Bug Type: Documentation Problem Bug description:blenc_encrypt() expects php source code to not contain any php tags Description: ------------ --- From manual page: http://www.php.net/function.blenc-encrypt --- Example #1 from manpage encrypts script fine, but when you run the encrypted php script then you get an error: Parse error: syntax error, unexpected '<' in C:\phpdesktop\phpdesktop-chrome\www\my_source_encoded.php on line 1 It seems that blenc_encrypt() expects source code to not contain any php tags. After removing php opening and closing tags in "my_source_to_protect.php" the encrypted script will run fine. Tested with BLENC 1.1.4b. Using Mongoose 3.9 webserver and PHP CGI. Test script: --------------- <?php // This is Example #1 from blenc_encrypt manual page. $source_code = file_get_contents("my_source_to_protect.php"); $redistributable_key = blenc_encrypt($source_code, "my_source_encoded.php"); $key_file = ini_get('blenc.key_file'); file_put_contents($key_file, $redistributable_key, FILE_APPEND); ?> Expected result: ---------------- Printing a secret string: XuXuXaaa Actual result: -------------- Parse error: syntax error, unexpected '<' in C:\phpdesktop\phpdesktop-chrome\www\my_source_encoded.php on line 1 -- Edit bug report at https://bugs.php.net/bug.php?id=68487&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68487&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68487&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68487&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68487&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68487&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68487&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68487&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68487&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68487&r=support Expected behavior: https://bugs.php.net/fix.php?id=68487&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68487&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68487&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68487&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68487&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68487&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68487&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68487&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68487&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68487&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68487&r=mysqlcfg

« previous php.doc.bugs (#11698) next »