WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddToAny
[resolved] [Plugin: AddToAny: Share/Bookmark/Email Button] Plug in trips open_basedir warnings (11 posts)

  1. cadfile
    Member
    Posted 3 years ago #

    After installing update started to get following warning messages at the top of my post content:

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c03/h01/mnt/50940/domains/dougberger.net/html/wp-includes/functions.php on line 2037

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c03/h01/mnt/50940/domains/dougberger.net/html/wp-includes/functions.php on line 2028

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c03/h01/mnt/50940/domains/dougberger.net/html/wp-includes/functions.php on line 2037

    I talked to my host and inserted a line of code in my htaccess but warning still shows up. Deactived plugin and warnings went away

  2. webjunk
    Member
    Posted 3 years ago #

    What did they have you change? Maybe:
    RewriteBase /

    Looks like its trying to use "/" as the target.

  3. cadfile
    Member
    Posted 3 years ago #

    They had me add

    Options +FollowSymLinks

    php_value open_basedir /home/00000/domains/mydomain.com:/home/00000/data/tmp:/var/tmp:/tmp

    to my htaccess file but the warnings still showed up

  4. webjunk
    Member
    Posted 3 years ago #

    First what version of PHP is used? If you are running 4 ask if you can run PHP 5.

    Also make sure that you put on a single line what they gave for:
    php_value open_basedir /home/00000/domai.........

    If its broken as I view it above, it won't work.

  5. cadfile
    Member
    Posted 3 years ago #

    I know what I wrote above won't work here. In my htaccess file it was correct and it worked - that is no syntax errors. It just didn't turn off the warnings because the function didn't call a valid file name just '/' and it should have had more there.

    My server runs php5

    My host has a page on the issue of open_basedir

    http://wiki.mediatemple.net/w/Securing_PHP_on_the_(gs)_Grid-Service

  6. micropat
    Member
    Plugin Author

    Posted 3 years ago #

    Do you recall what version of the plugin you upgraded from? The changes within the last few versions or so didn't pertain to those functions you're getting errors on, so it's unlikely that this has to do with the AddToAny plugin specifically. You'll probably get the same warnings with other plugins that use those common functions.

  7. cadfile
    Member
    Posted 3 years ago #

    I have 4 different blogs with the same plugins and they all get the warnings. All are using version .9.9.6.7 On one install I manually installed .9.9.6 and the warnings still came in.

    I can make the warnings go away by unchecking the display options from the settings page. Of course it is the same as deactiving it. So I added the '<?php if( function_exists('ADDTOANY_SHARE_SAVE_KIT') ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>' to my single page and the warnings came back.

    I didn't notice it until recently because I have the button show on the posts themselves and not the main page

  8. micropat
    Member
    Plugin Author

    Posted 3 years ago #

    All blogs are on Media Temple?

  9. cadfile
    Member
    Posted 3 years ago #

    Yes they are all on Media Temple.

    Here is the warnings I get after adding the php_value open_basedir line to the htaccess file of one of the blogs

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/50940/domains/ihumanism.org:/home/50940/data/tmp:/var/tmp:/tmp) in /nfs/c03/h01/mnt/50940/domains/ihumanism.org/html/wp-includes/functions.php on line 2037

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/50940/domains/ihumanism.org:/home/50940/data/tmp:/var/tmp:/tmp) in /nfs/c03/h01/mnt/50940/domains/ihumanism.org/html/wp-includes/functions.php on line 2028

    Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/50940/domains/ihumanism.org:/home/50940/data/tmp:/var/tmp:/tmp) in /nfs/c03/h01/mnt/50940/domains/ihumanism.org/html/wp-includes/functions.php on line 2037

    The difference is in the path

    In the original warning it had (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin)

    Now is shows (/home/50940/domains/ihumanism.org:/home/50940/data/tmp:/var/tmp:/tmp)

    Which is the contents of the php_value open_basedir

    It is still trying to resolve File (/)

  10. burtonposey
    Member
    Posted 3 years ago #

    Hey cadfile, I'm on mediatemple too. Check your Media settings and get rid of all of the weird stuff you see before the "wp-content/uploads". I had the exact same issues as you and this fixed it.

    Take care.

  11. cadfile
    Member
    Posted 3 years ago #

    YES! That fixed it. It had an old absolute url in that box. It must have caused trouble when 3.0 came out and they changed how the Media part was treated because I have not used the Media part of WP - I usually upload stuff off site to save on bandwidth.

    Thanks for the help

    Go to Settings-Media then under "Uploading Files" the first box says "Store uploads in this folder" make sure it says the default wp-content/uploads

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags