How to create custom php.ini

Home Forums BulletProof Security Pro How to create custom php.ini

This topic contains 70 replies, has 4 voices, and was last updated by  john 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 71 total)
  • Author
    Posts
  • #3090

    Young Master
    Participant

    Hello. Am new to BPS Pro. I would like to know how to create custom php.ini. I have tried to follow your tutorial on how to create custom php.ini but unfortunately I couldnt accomplish this task. My website is hosted in not of the hosted in the web host you mentioned in your tutorial. If tried to find the php.ini in BPS Pro plugin but I couldnt find it. Will you please help me with this?

    In BPS Pro features u mentioned that BPS Pro uses php.ini to improve your site performance. Will u please show me how to improve my site performance using php.ini

    #3091

    AITpro Admin
    Keymaster

    If your website/Server has PHP5.3.x or above installed then click the link below for custom php.ini setup steps. You will find which version of PHP your website/Server is using on the B-Core System Info page.
    http://forum.ait-pro.com/forums/topic/custom-php-ini-file-setup-php5-3-x/

    If your website/Server has PHP5.2.x installed and your Web Host is not listed in this Web Host List link:  http://www.ait-pro.com/aitpro-blog/3576/bulletproof-security-pro/custom-php-ini-faq/#web-hosts-list then click the link below.

    Copy and paste the custom php.ini email questions in this post below and send them to your web host support.
    http://forum.ait-pro.com/forums/topic/request-to-have-host-added-to-the-custom-php-ini-web-host-list/

    #3099

    Young Master
    Participant

    After creating custom php.ini. I have seen this file session_mm_cgi-fcgi620.sem trying to create itself in the root directory of my website my it has been quarantined. Is this file safe. Should I restore it?

    #3100

    AITpro Admin
    Keymaster

    I did a Google search on this file and it appears to be a session file of some kind that is created by your Host.

    Use the Quarantine View File Option to view this file and post the contents of the file here so I can tell you if it is safe or legit or not.  If it is safe then you can create an exclude rule in AutoRestore to ignore this file.

    #3101

    AITpro Admin
    Keymaster

    This is the problem.  You need to edit your custom php.ini file and add /tmp to the session.save_path directive in your custom php.ini file.  If the session.save_path directive is commented out in your php.ini file with a semi-colon ; then you need to uncomment it by removing the semi-colon in front of this directive.  For anyone else who sees this post:  If you do not have a custom php.ini file then you can create one for your website if your Host allows that.  Custom php.ini files are unique/specific to the 1,000’s of different web hosts around the world – This is not a one-size-fits-all thing.  You need to contact your Host to get all of the specific/unique information from your web host about adding a custom php.ini file for your specific Host.

    Example:

    session.save_path = "/tmp"
    
    or 
    
    session.save_path = /tmp

    After setting this path your session_mm file should be saved to the /tmp dir instead of your website root folder.

    #3103

    Young Master
    Participant

    Thank you a lot. Is there any file permision you would like to recommend for this php.ini?

    #3104

    AITpro Admin
    Keymaster

    You should not change the permissions of your php.ini file it needs to be 644 file permissions.  The php.ini file is protected with both .htaccess security protection and also AutoRestore/Quarantine protection.

    #3106

    Young Master
    Participant

    I have searched for session.save_path in Custom php.ini file but I couldnt find it. What should I do?

    #3107

    AITpro Admin
    Keymaster

    You can add this directive yourself.

    Just copy and paste this:  session.save_path = “/tmp” into your custom php.ini file.  Delete and retype the double quote characters ” and ” after pasting this into your custom php.ini file to ensure that formatting is correct.

    #3108

    Young Master
    Participant

    Where should I paste it at the end or? Below is how my custom php.ini file looks like after creating it

     

    #3110

    AITpro Admin
    Keymaster

    Please do not post the entire contents of files in the Forum.  Thanks.

    Actually after more Google searches I think this file is some kind of File Manager file. Use your Browser and open this file in your Browser window.  Do you see a list of files? If so, then this file is completely safe and you just need to add an exclude rule in AutoRestore.

    #3111

    Young Master
    Participant

    Thanks. I opened this file but there is nothing in it.

    #3112

    AITpro Admin
    Keymaster

    To exclude this single file.
    1.  Go to AutoRestore and click on the Add/Exclude Static Files tab page.
    2.  Choose exclude an Individual file and enter the entire path to this file in the text box and click the Exclude button.

    #3113

    AITpro Admin
    Keymaster

    You need to open the file in your Browser NOT the file itself.
    Example:  yourWebsiteURL.com/session_mm_cgi-fcgi620.sem

    #3115

    Young Master
    Participant

    I have opened it in my browser and its giving me 404 error

Viewing 15 posts - 1 through 15 (of 71 total)

You must be logged in to reply to this topic.