Results 1 to 5 of 5

Thread: Probably a silly question about the different PHP handlers, but wanting to make sure.

  1. #1
    Join Date
    Jul 2015
    Posts
    13

    Question Probably a silly question about the different PHP handlers, but wanting to make sure.

    I have (silly) question. For some time it has been possible to select different PHP handlers with DirectAdmin, which is really great.

    You have the choice of the following PHP handlers;

    - mod_php
    - suPHP
    - lsphp
    - php-fastcgi
    - php-fpm

    Normally we used mod_php + suPHP (with PHP 5.6 and 7.x). However this is not the best performance.
    We tried php-fastcgi in the past and we had some mixed results; like some websites simply didn't work anymore and others indeed loaded faster.

    Now recently we tried php-fpm and we are very happy with it so far, but is it 100% compatible with for example: mod_php & suPHP?
    Because, as mentioned above, php-fastcgi, wasn't for example...

    I prefer to use php-fpm, because it's really fast(er) than mod_php & suPHP in my personal opinion.
    I understand that with php-fpm, php is being run as a stand-alone PHP server.

    Can someone, when they are willing to, provide some insight in this. I can find information on all PHP handlers, but never a direct comparism of all handlers and if they are compatible with each other.

    Thank you in advance for your time.

    Regards

  2. #2
    Join Date
    May 2008
    Posts
    534
    If you enable htscanner module, it will work compatible with the setup you are mentioning but much more secure than mod_php and with better performace than suphp. Php-fpm is the best option at the moment - highly recommended!

    Without the htscanner module, you won't be able to set php flags from .htaccess file as you were able with mod_php.

  3. #3
    Join Date
    Jul 2015
    Posts
    13
    Thank you for your reply. Highly appreciated and learning new things every day!

    So, correct me if I am wrong, if I use php-fpm and I have .htaccess files (for eg. with Wordpress) it will not work without?

    Example code for a Wordpress .htaccess file:

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    In other words, mod_rewrites and such won't work without htscanner in combination with php-fpm?

    Thanks.

  4. #4
    Join Date
    May 2008
    Posts
    534
    No, it will work!

    The htscanner module will allow you to use the php_flag options in htaccess file. Without it, htaccess still works (mod_rewrite will be ok!), but it cannot modify PHP flags like mod_php can.

    For example:

    Code:
    php_flag display_errors off
    in .htaccess will require htscanner module.
    Last edited by wattie; 11-08-2017 at 12:17 PM.

  5. #5
    Join Date
    Jul 2015
    Posts
    13
    Sorry for the late reply, was sick.
    Thank you for your replies! Highly appreciated.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •