14

$md5 = md5_file($file_uri);
=> Returns false

Mmh...

die(is_readable($file_uri));
=> Returns false

[Mmh intensifies]

if(!is_readable($file_uri)) {
chmod($file_uri, 0777);
}

=> Chmod() returns false

GAAAAH FUCK THIS I CALL IT A DAY

Comments
  • 1
    And this is why PHP gets a bad rep
  • 0
    file_uri not set ☚ī¸

    Wait people use die();?
    when all die() does is calls exit().
    I can only hope you don’t make use of other redundant code 🤭
  • 2
    @C0D4 die is just 3 letters... efficiency!
    Also it's much more dramatic 😃
  • 0
    @C0D4 $file_uri is set, Apache doesn't have any write right in the folder targeted, for no fucking reason
  • 0
    false vs EPERM 🤔
  • 0
    @Root it's a CentOS environment, not a Windows one (thanks the gods for that)
Add Comment