arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1508372843026.png (111.67 KB, 1366x768, screenshot.png)

 No.814

I figured it would be fun to try to set up an imageboard. I managed to install vichan and make a few posts, but when I tried to log into mod.php, I got the error message shown in pic attatched. I thought that I had to install that module(?), so I used apt-get install php-mcrypt. This still didn't work even after reinstalling vichan. I read on the modules webpage that it was depreciated in newer versions of php.(I'm using 7.0) Is there a way to work around this?

 No.816

diff --git a/inc/mod/auth.php b/inc/mod/auth.php
--- a/inc/mod/auth.php
+++ b/inc/mod/auth.php
@@ -70,7 +70,7 @@ function test_password($password, $salt, $test) {

 function generate_salt() {
        // 128 bits of entropy
-       return strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');
+       return strtr(base64_encode(random_bytes(16)), '+', '.');
 }


 No.817

>riced taskbar
>adnauseam
>opera
laughinggirls.jpg

 No.818

>>816
Thanks, Its seems to be working fine now. What exactly were the first four lines for? The page wouldn't load unless I left them out. Just want to make sure I didn't end leave out something important.
>>817
I'm confused, is one of them out of place, or are all three bad?

 No.819

>>818
mcrypt_create_iv was deprecated in 7.1.0

I didn't directly post code, it's my git log.
Only one line had to be changed

 No.820


 No.1674




[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]