phppickem
phppickem copied to clipboard
php 7 blank index page
Anyone have this working with php 7? Works fine with php 5.6 but when we switch over to php 7 we get blank index page. Since php 5.6 is end of life it would be nice to get it running with php 7.
Works fine with PHP7. You have something else going on. Go through basic PHP troubleshooting to find it.
It doesn't work in PHP 7.2+ because mcrypt was removed and is used for login. I got around this by changing a whole bunch of files to convert it back to plain old md5 since security isn't a big concern on my site.
Do you mind posting your login/crypto class with updates made?
I'm still using php5 for this, but I was going to move servers in the next few weeks and was planning to move the php7 in the process.
Do you mind posting your login/crypto class with updates made?
I'm still using php5 for this, but I was going to move servers in the next few weeks and was planning to move the php7 in the process.
We figured out scores, but haven’t got to mcrypt yet. Check your email.
Do you mind posting your login/crypto class with updates made?
I'm still using php5 for this, but I was going to move servers in the next few weeks and was planning to move the php7 in the process.
I just basically commented out everything in that file. My solution is not safe or proper; it was just a quick rush job. To properly implement, the login system should be changed over to password_hash.
I ended up fixing via an mcrypt compatibility class from phpseclib. It's workign for me (udpates in my fork), but I've heard some users with 7.2 may be having issues with the hashes updating, so there are likely bugs being hunted soon.
removed the mcrypt entirely and went with the password_hash() password_verify() methods. https://www.php.net/manual/en/function.password-hash.php
`
* crypto.php -> phpFreaksCrypto Class (PHP4) * http://www.phpfreaks.com/tutorials/128/1.php */ /** * @author Dustin Whittle * @version 0.01 */ if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) { // tell people trying to access this file directly goodbye... exit('This file can not be accessed directly...'); } class phpFreaksCrypto { var $td; // changed from mcrypt to use the builtin password_hash and password verify functions function __construct() { // nothing needed here } function encrypt($plain_string) { /* encrypt string using password_hash() */ return password_hash($plain_string, PASSWORD_DEFAULT); } function decrypt($plain_string, $encrypted_string) { /* remove any special characters then decrypt string using mcrypt and then trim null padding and then finally return the encrypted string */ //echo "\r\n"; if (password_verify($plain_string, $encrypted_string)) { return 'VALID'; } else { return 'INVALID'; } } // since php 4 does not have deconstructors, we will need to manually call this function function __destruct() { } } ?>`