PHP Error Log Path Does Not Match – ini_set Options WordPress Language Versions

Home Forums BulletProof Security Pro PHP Error Log Path Does Not Match – ini_set Options WordPress Language Versions

This topic contains 1 reply, has 1 voice, and was last updated by  AITpro Admin 6 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #164

    AITpro Admin
    Keymaster

    Email Question:

    i’ve already a problem, i follow all the steps, try rebuilt a master php.ini file and a new custom php.ini file but same error… i don’t understand this problem of path :
    what is the true path ? how find the true error log path seen by server ? i have a French Language version of WordPress installed.

    Answer:

    Regarding using ini_set Options to get your php error log file set up quickly:

    Since you have a French language version of WordPress installed then what I assume is happening is that since your wp-config.php file is in French then the BPS ini_set Options feature is not able to see the English text placeholder in your wp-config.php file where the ini_set Options coding is supposed to be added in your wp-config.php file.

    Download your wp-config.php file and add this line of English text in your wp-config.php file –  /* That’s all, stop editing! Happy blogging. */ .  You will be adding this line of English text right below this WordPress Constant Code in your wp-config.php file – define(‘WP_DEBUG’, false);.

    Upload your wp-config.php file back to your website.  If you have autorestore turned on then the file will be sent to Quarantine.  Go to Quarantine and select Restore File to restore your new edited wp-config.php file.  Now that the English text is in your wp-config.php file BPS Pro will be able to write the ini_set code to your wp-config.php file based on this placeholder text in your wp-config.php file.

    Go to ini_set Options and click the 2 ini_set Options setup buttons.  1.  Save Options and 2.  Enable Options.  You should now see that your php error log path is displayed to you on the PHP Error Log page under Error Log Path Seen by Server:  /xxxxx/public_html/forum/wp-content/bps-backup/logs/bps_php_error.log .  Copy and paste that php error log path to PHP Error Log Location Set To:  /xxxxx/public_html/forum/wp-content/bps-backup/logs/bps_php_error.log text box and then click the Set Error Log Location button.

    On some web hosts for whatever reason adding the /* That’s all, stop editing! Happy blogging. */  line to the wp-config.php file does not work and what is required instead is to copy the entire section of BPS Pro ini_set code into your wp-config.php file that you will find in this file:  /wp-content/plugins/bulletproof-security/admin/php/php-directives-code-for-wp-config.txt (the code posted below is the same code that you will find in this file).  AutoRestore should be turned Off while doing this.  Download and edit your wp-config.php file and add this code below to your wp-config.php file directly below define(‘WP_DEBUG’, false);. in your wp-config.php file. Change the error log path to your actual php error log path, which you will find displayed on the PHP Error Log page:  ini_set PHP Error Log Location (Recommended): /your/actual/path/will/be/displayed/here.  Upload the wp-config.php file back to your website, go to AutoRestore, click the Root Files Backup button and turn AutoRestore back On.

    /* That's all, stop editing! Happy blogging. */
    
    /** BEGIN BPS Pro ini_set Settings **/
    @error_reporting(E_ALL|E_STRICT);
    @ini_set('log_errors','On');
    @ini_set('error_log','/xxxxx/public_html/wp-content/bps-backup/logs/bps_php_error.log');
    @ini_set('log_errors_max_len','1024');
    @ini_set('memory_limit','256M');
    @ini_set('ignore_repeated_errors','On');
    @ini_set('ignore_repeated_source','Off');
    @ini_set('allow_url_include','Off');
    @ini_set('define_syslog_variables','Off');
    @ini_set('display_errors','Off');
    @ini_set('display_startup_errors','Off');
    @ini_set('implicit_flush','Off');
    @ini_set('magic_quotes_runtime','Off');
    @ini_set('max_execution_time','30');
    @ini_set('mysql.connect_timeout','30');
    @ini_set('mysql.trace_mode','Off');
    @ini_set('report_memleaks','On');
    /** END BPS Pro ini_set Settings **/

     

    Regarding creating a custom php.ini file for your website:

    If your PHP Server version is PHP5.2.x:

    If your Web Host is not listed here:  https://www.ait-pro.com/aitpro-blog/3576/bulletproof-security-pro/custom-php-ini-faq/#web-hosts-list then see this Forum Topic:  https://forum.ait-pro.com/forums/topic/request-to-have-host-added-to-the-custom-php-ini-web-host-list/

    If your PHP Server version is PHP5.3.x or higher:

    See this Forum Topic:  https://forum.ait-pro.com/forums/topic/custom-php-ini-file-setup-php5-3-x/

    Please see this Forum Topic post and post your Diagnostic Check Results in your Topic reply >>> https://forum.ait-pro.com/forums/topic/custom-php-ini-setup-web-host-is-not-listed-in-web-hosts-list/  Once you have posted your diagnostic check results i can tell you what options you have available to you for your particular web host based on your PHP version.

    Technical details of the Worldwide issue going on with PHP5.3.x and .user.ini files:  https://www.ait-pro.com/aitpro-blog/4349/misc-projects/wordpress-tips-tricks-fixes/php5-3-x-php5-4-x-user-ini-file-does-not-work-known-php5-3-x-user-ini-fastcgi-wordpress-zend-issue/

    Images attached to Email:

    php error log path does not match -1php error log path does not match -2php error log path does not match -3

    #175

    AITpro Admin
    Keymaster

    Email Reply:

    RE-HI,

    i’ve update wp-config with – /* That’s all, stop editing! Happy blogging. */

    take a look at this diagnostic cheks

    BPS Pro PHP/php.ini Diagnostic Check Results

    Answer:

    Ok have you gone to the ini_set Options page and clicked on the 2 ini_set Options setup buttons?

    1. Save Options
    2. Enable Options

    And I see that you are using PHP5.2.17 from your Diagnostic Checks results so you can add a custom php.ini file for your website IF your web host allows this.

    Please send this email below to your Host Support folks to get the necessary info about if your host allows custom php.ini files and some other technical details so I can tell you what you need to do next to create/setup a custom php.ini file for your website/Host.

    Hello,

    I would like to add a custom php.ini file for my website.

    1. What folder would I put my custom php.ini file in?
    2. Would I be adding a single sitewide custom php.ini file or would I need to add multiple custom php.ini files per directory / folder?
    3. Do I need to add php.ini handler code in my root .htaccess file?
    4. Will my new custom php.ini file contain ONLY the directives that I want to change the settings for or do I need to copy the entire Server Default php.ini file to the folder location that you specify above and then add my directive settings changes to that new custom php.ini file?

    Thank you

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.