How To Troubleshoot PHP Errors, php errors in your php error log

Home Forums BulletProof Security Pro How To Troubleshoot PHP Errors, php errors in your php error log

Viewing 15 posts - 91 through 105 (of 259 total)
  • Author
    Posts
  • #19491
    JB
    Participant

    Hi Admin,

    a few days ago – when i updated my WP from 4.0 to 4.0.1 i get these errors:
    Do you know something about it?

    [25-Nov-2014 10:17:12] PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'SplFileInfo::isFile(): open_basedir restriction in effect. File(/var/www/vhosts/blog-xxxxx.de/httpdocs/..) is not within the allowed path(s): (/var/www/vhosts/blog-xxxxx.de/httpdocs/:/tmp/)' in /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php:2089
    Stack trace:
    #0 /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php(2089): SplFileInfo->isFile()
    #1 /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-content/plugins/bulletproof-security/includes/functions.php(3737): bpsSetupWizardFileCounterRoot(NULL, NULL)
    #2 [internal function]: bpsPro_wordpress_update_core_manual_about('')
    #3 /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-includes/plugin.php(505): call_user_func_array('bpsPro_wordpres...', Array)
    #4 /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-admin/admin-header.php(232): do_action('admin_notices')
    #5 /var/www/v in /var/www/vhosts/blog-xxxxx.de/httpdocs/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 2089

    nukleuz

    #19493
    AITpro Admin
    Keymaster

    That php error does not have to do with your WordPress version and is an open_basedir configuration problem.  The php error message is very clear:  “open_basedir restriction in effect. File X is not within the allowed path(s).”   You would need to add the correct path to the open_basedir directive paths.  Personally I find open_basedir a nuisance and waste of time.  It breaks more things than it helps and it is useless against real hackers.  open_basedir is useful for compartmentilizing user accounts, but like I said in my experience with open_basedir it is junk.  Recommendation:  comment it out in your php.ini file/do not use that junk.

    #19502
    JB
    Participant

    Thanks for your report about open_basedir – i will comment it out and check it again.

    #20218
    Anonymous
    Inactive

    [Topic has been merged into this relevant Topic]

    In addition to what I said before… what’s the meaning of this error in the PHP Error Log?
    I checked the file index.php and it is the standard wordpress file, not an hacked one or similar.

    [24-Dec-2014 15:57:43] PHP Warning:  file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/fotolitographicolor.it/index.php) is not within the allowed path(s): (/var/www/vhosts/fotolitographicolor.it/httpdocs/:/tmp/) in /var/www/vhosts/fotolitographicolor.it/httpdocs/wp-content/plugins/bulletproof-security/admin/lock/flock.php on line 808
    
    #20223
    AITpro Admin
    Keymaster

    @ Riccardo – I will answer your other Security Log question after answering this question.  Personally I recommend that you do not use / turn off open_basedir.  open_basedir has 1 good usage and that is to compartmentalize user accounts in a Shared or semi-Shared VPS environment.  open_basedir is sometimes referred to as a security measure, but it is not.

    If you want to continue to use open_basedir then the php error message is telling you exactly what the problem is.  You need to modify the open_basedir directive settings and include the additional path for this file.  This is something your host can do for you fairly quickly and easily so contact them to change this setting.

    #20325
    Paul
    Participant

    Happy New Year

    PHP Version: 5.3.23
    PHP Memory Usage: 60.15 MB
    WordPress Admin Memory Limit: 128M
    WordPress Base Memory Limit: 40M
    PHP Actual Configuration Memory Limit: 128M

    So is this a plugin issue or my memory allocation?

    [01-Jan-2015 02:03:02 UTC] PHP Fatal error: Out of memory (allocated 32505856) (tried to allocate 122880 bytes) in /home/xxxxxx/public_html/wp-content/plugins/events-manager/classes/em-categories.php on line 191
    [01-Jan-2015 09:59:57 UTC] PHP Fatal error: Out of memory (allocated 36962304) (tried to allocate 491520 bytes) in /home/xxxxxx/public_html/wp-content/plugins/restrict-widgets/restrict-widgets.php on line 1197
    
    #20327
    AITpro Admin
    Keymaster

    Since the out of memory errors are occurring in 2 different plugins at different times then it is not likely that the root cause of the error is being caused by code in each of these plugins.  In general, php errors that occur randomly are considered “normal”.  Php errors that are occurring repetitively/repeatedly/continuously are not normal and you would need to isolate the root cause of the problem by doing standard WordPress troubleshooting steps like deactivating plugins one by one.  If you have the Wordfence plugin installed then it has known problems with using up all of the server/website memory either randomly, regularly or constantly.

    #20338
    Paul
    Participant

    Ok.
    Noticed i have active Stop Spammer Registrations Plugin.
    So as my site does not allow registration i have deactivated this ( forgot that was still active)
    Will see if that helps.
    Thank you

    #20616
    Tin Hoang
    Participant

    [Topic has been merged into this relevant Topic]

    Hi,

    my MySQL database went down today and I got the WordPress database error: Error Establishing Database Connection. When I logged into my server my MySQL database needed to be restarted. I have BFS Pro 9.9.1 and when looked in the PHP Error Log it shows. Any idea what happened? Looks like someone went in and tried to do some hardcore SQL injection?

    [23-Jan-2015 00:05:05 UTC] WordPress database error Lost connection to MySQL server during query for query
    SELECT ID, post_name, post_parent, post_type
    FROM wp_30_posts
    WHERE post_name IN ('wp-content','plugins','lb-gallery','libraries','uploadify','uploadify-swf')
    AND post_type IN ('page','attachment')
    made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, WP_Query->parse_query, get_page_by_path
    [23-Jan-2015 00:05:05 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT option_value FROM wp_30_options WHERE option_name = 'arve_options' LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('plugins_loaded'), call_user_func_array, Advanced_Responsive_Video_Embedder::get_instance, Advanced_Responsive_Video_Embedder->__construct, Advanced_Responsive_Video_Embedder->init_options, get_option

    thanks,
    Tin

    #20620
    AITpro Admin
    Keymaster

    The php error probably occurred at the time your MySQL server went down/crashed and was probably the last error logged before the site lost connection.  I do not see anything malicious in the php error.  It is possible something like this happened:  An extremely large file upload was occurring with Advanced_Responsive_Video_Embedder / uploadify and it crashed your server – I am taking a logical guess here, but most likely the DB crashed for some other reason.  Read the first post at the beginning of this forum topic to get a general understanding of what matters and what does not matter regarding php errors. In a nut shell, if a php error only occurs once or once in a while it is not important. If a php error is repeatedly occurring then you need to fix whatever problem is causing the php errors.

    #20772
    BeGee
    Participant

    Hello,

    i am using “content protector” plugin and i have these errors in log file:
    between is listed content that i am protecting. And then repeating this lines over time. There is no real error code other then this.
    Plugin is using ajax to load protected content after entering captcha code. First time i installed bps pro on setup i think cURL Scan did whitelisted this plugin (there was one row in Plugins Script/File Whitelist Text Area) but when i reinstalled server there is nothing on cURL Scan and i get this php errors.

    [01-Feb-2015 21:17:03 UTC] \[(\[?)(content_protector)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)
    
    and then following
    
    [01-Feb-2015 21:17:03 UTC] Array
    (
    [0] => Array
    (
    [0] => [content_protector password="CAPTCHA" cookie_expires="0" identifier="1" ajax="true"]
    #20781
    AITpro Admin
    Keymaster

    The BPS php error log just logs php errors that are occurring in other plugins and themes or with WordPress itself.  The php errors are not related to BPS in any way.  I assume the problem is being caused by misuse/invalid use of one of the php error handling functions in the content protector plugin. For example I have seen the php error_reporting(); function misused in a way that someone entered text like this: error_reporting(some random text in here instead of valid stuff in here); Check with the content protector plugin author and ask why you are seeing that text/code in php errors/your php error log. It is obviously some kind of coding mistake in the content protector plugin.

    http://php.net/manual/en/function.error-reporting.php

    #20783
    BeGee
    Participant

    Thank you very much for your responce, as it turns out author has replied to my question and its debugging logs he forgot to turn off and it will be fixed in next version.
    Thank you again!

    #21630
    Sweetspot
    Participant

    [Reply has been merged into this relevant Topic]

    Good to hear about that. All creds to you for pointing it out. I still have a php error

    24-Mar-2015 12:58:31 UTC] PHP Parse error:  syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) in /storage/content/20/123120/sweetspotevents.se/public_html/wp-content/plugins/bloom/bloom.php on line 654

    I don´t know if it causes serious problems?
    Best regards / C

    #21636
    AITpro Admin
    Keymaster

    Contact the Bloom plugin author and send the PHP error to them so they can fix the coding mistake in the Bloom plugin that is generating this PHP error.  The BPS Pro PHP Error Log logs all php errors that are occurring in other plugins and themes.

Viewing 15 posts - 91 through 105 (of 259 total)
  • You must be logged in to reply to this topic.