I am trying to create a md5 hash for a string but the problem is that whenever I use md5 function and run the file, it returns a 500 internal error.
the code i am using is
$php_hash_string = md5("test_hash");
When I comment out the file the error is not produced and the rest of the output is printed out but when i use the md5 function it generates 500 internal server error.
Can anyone please help me solve this problem?
Server info: LAMP on CentOS 5.6
I don't know if you want to use this way, but at least try it.
$md5 = md5("test_hash");
$php_hash_string = $md5;
It's probably just stupid try, but mostly only stupid things make problems.
And put in top of the file this:
error_reporting (E_ALL ^ E_NOTICE);
the code i am using is $php_hash_string = md5("test_hash"); When I comment out the file the error is not produced and the rest of the output is printed
So that's not the code you are using, only a part of it.
The first step is to confirm that it really is the md5() call which is causing the problem. Do you still get problems with a script containing only that one statement?
it returns a 500 internal error.
Have you verified that your installation is correctly configured to report/log PHP errors? And that it is not logging errors when executing the md5 function? And there is nothing related to this logged by the webserver? eg try:
<?php
for (
?>
(this should produce a fatal parsing error)
确保您执行yum install php-mcrypt,看看是否有区别
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.