Skip to main content

PHP downloading instead of executing only when in cgi-bin

Comments

4 comments

  • Marius
    I had this error few days ago. The problem is about incompatibility. Try install packages via WHM->Easyapache 4 -> I recommend you choose default cPanel(prefork+php-fpm) and do not install other packages because you'll risk a lot of incompatibility between modules(Ex: suphp+mod_ruid2, etc). Do you have PHP-FPM installed? If yes: Go to WHM-> MultiPHP Manager and for desired domain select(check) -> activate PHP-FPM. By default PHP-FPM is Off if a PHP version is set to inherit, so must be activated by domain! Handlers does not apply to PHP-FPM!
    0
  • PMD
    Thank you so much. That did it. I'm so grateful!
    0
  • Marius
    I'm glad I could help you :)
    0
  • cPanelMichael
    Essentially, PHP will execute absolutely fine anywhere but the cgi-bin directory. Annoyingly, because the site is somewhat legacy and I took weird choices 10 years ago, there are a lot of PHP files in the cgi-bin folder.

    Hello, I'm happy to see you were able to find a suitable workaround. You may also want to consider making changes in the future to ensure the PHP scripts work outside of the cgi-bin, as the cgi-bin isn't intended for PHP scripts. Thank you.
    0

Please sign in to leave a comment.