Skip to main content

Installing FastCGI, or working with other PHP handlers

Comments

38 comments

  • cPRex Jurassic Moderator
    Hey there! For issue 1, the most likely explanation is that there were incompatible lines in the account's .htaccess file that kept things from working properly with fcgi. You'd want to check the .htaccess file, or even just move it out of the way completely, to see if that is the issue. Handlers are really a personal preference. We still recommend suPHP for Wordpress sites or other similar CMS software since that ensures that file ownership and permissions are handled properly. Some admins do play around with the handlers a bit to find one that gives them good speed and usability.
    0
  • rivermobster
    Hey there! For issue 1, the most likely explanation is that there were incompatible lines in the account's .htaccess file that kept things from working properly with fcgi. You'd want to check the .htaccess file, or even just move it out of the way completely, to see if that is the issue. Handlers are really a personal preference. We still recommend suPHP for Wordpress sites or other similar CMS software since that ensures that file ownership and permissions are handled properly. Some admins do play around with the handlers a bit to find one that gives them good speed and usability.

    This is good to know, as ALL of my sites are WordPress sites. It appears I am using
    0
  • rivermobster
    For some reason the above got posted before I had the chance to finish my questions! So anyway... Is this something a novice like me can do myself? Or should I open a ticket for it? Right now the only handler option I appear to have is CHI, with no other options available.
    0
  • cPRex Jurassic Moderator
    You can install the handler through EasyApache. If there are conflicts, it will tell you right in the interface and it will make the adjustments for you. The only real "checks" that need to happen are that all files should be 644 and all directories should be 755. If not, you'll receive permissions errors.
    0
  • rivermobster
    You can install the handler through EasyApache. If there are conflicts, it will tell you right in the interface and it will make the adjustments for you. The only real "checks" that need to happen are that all files should be 644 and all directories should be 755. If not, you'll receive permissions errors.

    Ok so... Where is the file manager for WHM? lol Can I use the one in the cPanel account i made just for this particular domain? Signed, Learning stuff. :P
    0
  • cPRex Jurassic Moderator
    There isn't an equivalent tool in WHM. You'll just want to ensure that's the case for the individual domain content. I should be clear that the "644 and 755" permissions rule is for the content inside the user's public_html directory and not all files on the system, so sorry if that wasn't clear the first time.
    0
  • rivermobster
    There isn't an equivalent tool in WHM. You'll just want to ensure that's the case for the individual domain content. I should be clear that the "644 and 755" permissions rule is for the content inside the user's public_html directory and not all files on the system, so sorry if that wasn't clear the first time.

    Yeah, I was wondering about that! lol That's still a lot of files/folders to check with a WordPress installation. :( Which opens up a whole can of worms for future WP installs and the upcoming migration I have planned... Is there some easy way to to this? Should I not bother with this? All my clients are WP clients... Thank you for your insight on this.
    0
  • cPRex Jurassic Moderator
    Honsetly? I wouldn't worry about it. I'd make the switch, and then if you get errors they'll be logged in the Apache error log and you can sort them out. If there are TONS of errors, you can change permissions en masse with a simple command if you get to that point.
    0
  • rivermobster
    Honsetly? I wouldn't worry about it. I'd make the switch, and then if you get errors they'll be logged in the Apache error log and you can sort them out. If there are TONS of errors, you can change permissions en masse with a simple command if you get to that point.

    I was kinna hoping you would say that. :P Before I go further... How will this affect future installs or my upcoming migration?
    0
  • cPRex Jurassic Moderator
    I don't think it will affect them at all :D If anything, it will make future Wordpress installs easier as you won't run into possible permissions issues in the future, but I wouldn't even factor that in to the migration. If you migrate the EasyApache settings over from Transfer Tool either before, or at the same time you do the main data transfer, it will be setup the same as the old system.
    0
  • rivermobster
    I don't think it will affect them at all :D If anything, it will make future Wordpress installs easier as you won't run into possible permissions issues in the future, but I wouldn't even factor that in to the migration. If you migrate the EasyApache settings over from Transfer Tool either before, or at the same time you do the main data transfer, it will be setup the same as the old system.

    Good to know. I was going to have my hosting company (HostDime) to the entire migration for me so I don't have to deal with it. I'm hoping all the settings we put in place now will be better than the settings on the shared server I am currently on??
    0
  • rivermobster
    ok so... mod_suphp has been provisioned. Now I see the option in PHP Handlers. Should I just select the new option? Or check for any errors first? @cPRex
    0
  • cPRex Jurassic Moderator
    Yup - should be just as easy as choosing it. Give the system a few seconds to apply it, then check some pages on the site to see how that's working for you.
    0
  • rivermobster
    Yup - should be just as easy as choosing it. Give the system a few seconds to apply it, then check some pages on the site to see how that's working for you.

    Ok so now I have a problem in the backend of my WP test site... This same exact problem happened on my shared server. I worked with HostDime and the theme vender, and it came down to an issue in ModSecurity. This is from ol the support thread on HostDime... *edited* The problem was (and now is)... I added SIte Origin Premium to this site:
    0
  • cPRex Jurassic Moderator
    It seems like ModSecurity is just tripping on the same rule, but that wouldn't necessarily be related to suPHP. It is odd that one of the plugins is generated such a large response header, but you can workaround that by editing the /etc/apache2/conf.d/modsec/modsec2.user.conf file and bumping the limit for that variable: SecResponseBodyLimit 524288 In your case, you'd want to choose a number higher than 4048000, so I'd try 8096000 to see if that takes care of it. You could also disable the entire rule as HostDime mentioned, although I don't see the rule itself included in your output.
    0
  • rivermobster
    It seems like ModSecurity is just tripping on the same rule, but that wouldn't necessarily be related to suPHP. It is odd that one of the plugins is generated such a large response header, but you can workaround that by editing the /etc/apache2/conf.d/modsec/modsec2.user.conf file and bumping the limit for that variable: SecResponseBodyLimit 524288 In your case, you'd want to choose a number higher than 4048000, so I'd try 8096000 to see if that takes care of it. You could also disable the entire rule as HostDime mentioned, although I don't see the rule itself included in your output.

    You're gonna have to help me with this, as I'm not sure what to do here. How do I make this change? I'm a server noob, remember? :eek::-p
    0
  • rivermobster
    Should the Connections Engine ruleset be disabled?
    0
  • rivermobster
    *edited*
    0
  • rivermobster
    Now to add to the confusion even more... I put the PHP Handler back to cgi. Re-enabled all the widgets, problem came back. No more Appearance > Customize page in WP. :(
    0
  • cPRex Jurassic Moderator
    Ah - that's something you'd have to do over an SSH connection to the system. If you'd like to open a ticket with us and mention me in the subject I'll be happy to take a look for you directly.
    0
  • rivermobster
    Ah - that's something you'd have to do over an SSH connection to the system. If you'd like to open a ticket with us and mention me in the subject I'll be happy to take a look for you directly.

    Done. Thank you so much!
    0
  • rivermobster
    @cPRex Ok so now after your tweaking everything seems to work as expected. Thanks so much for the help! Although with suphp now enabled, Lighthouse dropped from 97 to 93ish. Is this to be expected? Is suphp really the best option for Wordpress? Thanks for all of your help!
    0
  • cPRex Jurassic Moderator
    The other option would be our default of CGI + ruid2. You could switch back to that option and see if the score changes in your favor again.
    0
  • rivermobster
    The other option would be our default of CGI + ruid2. You could switch back to that option and see if the score changes in your favor again.

    What IS the BEST option for WP, regardless of score? I'd rather have the more stable option. Thanks.
    0
  • cPRex Jurassic Moderator
    I'm not sure there is ever a "best" - we have all those different options for a reason, and both options will likely run properly on your server without errors. Some admins like to finesse the best possible performance out of their server and spend a lot of time getting things finely tuned. Some admins just leave the default settings and go with it. Either will get you a stable environment where things work well though.
    0
  • rivermobster
    I'm not sure there is ever a "best" - we have all those different options for a reason, and both options will likely run properly on your server without errors. Some admins like to finesse the best possible performance out of their server and spend a lot of time getting things finely tuned. Some admins just leave the default settings and go with it. Either will get you a stable environment where things work well though.

    Understood. I was under the impression suphp would be "best" as it sets the correct file permissions for WP. Am I mistaken here?
    0
  • cPRex Jurassic Moderator
    The CGI/ruid2 combo will also use the correct permissions as well. It might be worth it to switch back and forth to see if you notice a performance difference, as it's just a few clicks in either the EasyApache or MultiPHP Manager interface.
    0
  • rivermobster
    The CGI/ruid2 combo will also use the correct permissions as well. It might be worth it to switch back and forth to see if you notice a performance difference, as it's just a few clicks in either the EasyApache or MultiPHP Manager interface.

    Lemme see if i can figure that out.... Is Lighthouse a legit way to test??
    0
  • cPRex Jurassic Moderator
    I can't speak for the validity of any particular test software as that isn't something we make or test, but you were getting consistent results earlier. In the past I've also used the GTMetrix tools as well with good results.
    0
  • rivermobster
    I can't speak for the validity of any particular test software as that isn't something we make or test, but you were getting consistent results earlier. In the past I've also used the GTMetrix tools as well with good results.

    Copy that. Do I install mod_ruid2 in EasyApache?
    0

Please sign in to leave a comment.