Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 898417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:02:18+00:00 2026-05-15T15:02:18+00:00

I run this script: define(‘SECRET’, vJs;ly-W\XDkD_2′-M7S2/ZRRBobxt5); echo sha1(SECRET . ‘zcbkeyky’ . ‘aaa@bbb.com’) . \n;

  • 0

I run this script:

define('SECRET', "vJs;ly-W\XDkD_2'-M7S2/ZRRBobxt5");
echo sha1(SECRET . 'zcbkeyky' . 'aaa@bbb.com') . "\n";

Locally with PHP 5.3.2 (cli) it gives me: 3baa47e50394cd2dce236dcbf2f409fdb9010f2a
On a remote machine with PHP 5.1.6 (cli) it gives: d1bcf4ea83e50593d3df19a8455a5f5cd32d63ef

Why does the same calculation differ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:02:19+00:00Added an answer on May 15, 2026 at 3:02 pm

    I’d say the problem is here:

    define('SECRET', "vJs;ly-W\XDkD_2'-M7S2/ZRRBobxt5");
    //                        ^^-- escape character
    

    PHP manual says:

    \x[0-9A-Fa-f]{1,2} the sequence of characters matching the regular expression is a character in hexadecimal notation

    Between PHP 5.2 and 5.3, apparently this was modified to also match \X[0-9A-Fa-f]{1,2} (note the capital X at the beginning). When running in PHP 5.3, you have (unknowingly?) a Carriage Return in your string.

    Either a) replace the backslash with another character, or b) use single quotes when defining SECRET, and both versions will return the same hash (tried on 5.2.1 and 5.3.2).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to run this script (embed drive list in a site) that
I'm trying to run this script that basically reads/interprets text in from a textfile
I'm trying to run this script: import re, os def build_pool(cwd): global xtn_pool, file_pool
well i run this script , which is written to do some screenshots of
well i run this script , which is written to do some screenshots of
I'm trying to run this script on Mac OS 10.7 (Lion) and I'm getting
Currently I'm trying to run this powershell script: Param ( $websiteName, $physicalPath ) import-module
Can anyone please tell me how do I make this script run in IE
I have this script that run to fix my menu bar to the browser
I have this script and when i try to run it, it just says

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.