Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks again for your assistance.

    I found what was causing problems on these sites. Just as you said, these sites were migrated and there was an old setting that was wrong.

    Here’s where I fixed it:

    In wp admin area

    Settings–>Media—->Store uploads in this folder:

    The cpanel dir was still pointing to the old one instead of the new one.

    Thanks for pointing me in the right direction!

    It looks like for some reason the wp_upload_dir(); is not returning basedir or anything else.

    Notice: Undefined index: basedir. I get the same thing with url, subdir,baseurl etc….

    Here’s what I had to do to get the plugin working:

    A) manually create the WPFMP_DATA folder under /uploads
    B) Add/change the following code in wordpress-file-monitor-plus.php:
    1.find:
    // Set data directory

    2.then comment out:
    #$uploads = wp_upload_dir();
    #$uploads[‘basedir’] = str_replace( array(‘\\’, ‘/’), DIRECTORY_SEPARATOR, $uploads[‘basedir’] );

    3. Add this line:

    $Up = $_SERVER[‘DOCUMENT_ROOT’] . “/wp-content/uploads/”;

    4. Change this:
    define( ‘SC_WPFMP_DATA_FOLDER’, $uploads[‘basedir’] . DIRECTORY_SEPARATOR . ‘WPFMP_DATA’ . DIRECTORY_SEPARATOR );

    To This:

    define( ‘SC_WPFMP_DATA_FOLDER’, $Up . DIRECTORY_SEPARATOR . ‘WPFMP_DATA’ . DIRECTORY_SEPARATOR );

    Basically swapped $uploads[‘basedir’] for $Up

    I have no idea why it’s not finding the basedir but I’m happy that I can at least make it work on my other sites from here on out.

    It’s very strange that I didn’t have this issue with the first 4-5 sites I installed this on. I even checked the WP/includes/functions.php to make sure it was correct and it all looked fine. There’s no reason I can see why wp_upload_dir() is not working.

    I’m running WP 3.4.1 and PHP Version 5.3.10

    It’s a great plugin. Nice clean code and great commenting. Thanks for all your time and effort in putting it together.

    I cannot get the plugin to work now.

    I have installed it on a half dozen sites and it was great, but now when I try to install on other sites it is impossible.

    I have tried everything, I’ve changed permissions on the uploads folder to 777, I’ve even created the WPFMP_DATA folder and files manually, and I’ve tried copying them from other working sites. Nothing works.

    I’ve tried removing all other plugins, renaming the htaccess, going back to the default theme etc… nothing works.

    The plugin will not create the folders/files in the uploads folder when it is installed/activated, regardless of permissions placed on the uploads folder.

    Warning: mkdir() [function.mkdir]: Permission denied in /home/Cpanel_Account/public_html/site.com/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php on line 106

    Warning: copy(/WPFMP_DATA//.htaccess) [function.copy]: failed to open stream: No such file or directory in /home/Cpanel_Account/public_html/site.com/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php on line 641

    Warning: copy(/WPFMP_DATA//.sc_wpfmp_admin_alert_content) [function.copy]: failed to open stream: No such file or directory in /home/Cpanel_Account/public_html/site.com/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php on line 641

    Warning: copy(/WPFMP_DATA//.sc_wpfmp_scan_data) [function.copy]: failed to open stream: No such file or directory in /home/Cpanel_Account/public_html/site.com/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php on line 641

    Warning: Cannot modify header information – headers already sent by (output started at /home/Cpanel_Account/public_html/site.com/wp-content/plugins/wordpress-file-monitor-plus/classes/wpfmp.settings.class.php:106) in /home/Cpanel_Account/public_html/site.com/wp-includes/pluggable.php on line 881

Viewing 3 replies - 1 through 3 (of 3 total)