Forums

Error uploading images to new post (15 posts)

  1. slenton
    Member
    Posted 4 months ago #

    When trying to upload a new image to a post, I get this error message:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/tmp/phpxLwELu) is not within the allowed path(s): (/home/slenton:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/slenton/public_html/blog/wp-includes/functions.php on line 2425
    544

    However, if I go to the media library, the image I tried to upload got there successfully, and if I click show, I can then add the caption, alternate text, choose the position in the post, etc. and then "insert into post." This successfully puts it into the post. But why am I getting this error message?

  2. jonradio
    Member
    Posted 4 months ago #

    Can't guarantee that this is your problem, but I have seen this error or one that was similar when the field "Store uploads in this folder" (Admin-Settings-Media-Uploading Files) was not blank.

  3. slenton
    Member
    Posted 4 months ago #

    Thanks Adiant, but I checked and that field is blank. Any other ideas for me?

  4. jonradio
    Member
    Posted 4 months ago #

    I just looked at "functions.php on line 2425" as your message indicates, and that line is a Comment in Version 3.3 of WordPress. What version are you running?

  5. slenton
    Member
    Posted 4 months ago #

    I'm running 3.1.2

  6. jonradio
    Member
    Posted 4 months ago #

    In that version, line 2425 is in the WordPress function wp_check_filetype_and_ext, and is checking an image file to be sure it exists with the php function file_exists. The image file apparently has a full path of /var/tmp/phpxLwELu

    First, I would check that /home/slenton/public_html/blog/wp-content/uploads exists and has permissions of 755

    Assuming that Version 3.1.2 has the same Settings-Media panel layout as 3.3.1, I would also check field "Full URL path to files" to be sure it is blank, too.

    If that isn't your problem, I would then go back to the "Store uploads in this folder" field and enter "wp-content/uploads" (without the quotes).

    At this point, I have run out of ideas, other than to comment that what I've read indicates it may be a problem with your web host, as this "open_basedir restriction" is a php.ini setting. It is probably worth your while to do the following Google search and read anything that seems relevant on the problem, as it is not uncommon:
    "open_basedir restriction" wordpress
    Be sure to include the double quotes as shown.

  7. slenton
    Member
    Posted 4 months ago #

    Thanks for all of your help. I checked everything you mentioned and made sure it was correct, but it's still not working. Perhaps it is a problem with my host. :-/

  8. jonradio
    Member
    Posted 4 months ago #

    Other than upgrading to WordPress 3.3.1 on the off chance that that problem will be addressed, I have no other ideas beyond Googling some more. Quite frankly, talking to your web host is your most likely path to success at this point.

  9. slenton
    Member
    Posted 4 months ago #

    I just looked into finally biting the bullet and doing a manual upgrade to the new version of WordPress, but it seems like my web host's PHP version is not up to date enough to upgrade my WordPress. Is it possible that my version of wordpress is no longer stable and my host can't really support it because of its version of PHP? WP says the newest version requires PHP 5.2.4 or greater but my host has PHP 5.2.14.

  10. jonradio
    Member
    Posted 4 months ago #

    Running an older version of WordPress is never a good idea, mainly because of the fact that security holes have been published for hackers to read and develop attacks for. As for fixing your problem, it is anyone's guess.

    I have PHP 5.2.17 and WordPress 3.3.1 works perfectly. You say your host has PHP 5.2.14. That is newer than the 5.2.4 that WordPress requires. So, I don't see why you can't upgrade. MySQL 5.0 is the other minimum requirement.

  11. kmessinger
    Member
    Posted 4 months ago #

    Try the normal debug.
    - deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). If you can't get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder if you have one. The easiest way is to rename that folder to mu-plugins-old.

    - switching to the Twenty Eleven theme to rule out any theme-specific problems. If you can't log in to change themes, you can remove the theme folders via FTP so the only one is twentyeleven. That will force your site to use it.

  12. slenton
    Member
    Posted 4 months ago #

    Hmm okay. I thought that because of the sequence of numbers that 5.2.14 would be older than 5.2.4. I'll try the upgrade then.

  13. jonradio
    Member
    Posted 4 months ago #

    I can refer you to the Wikipedia article on the subject, but I've been around software version numbers since I started programming in 1971. .14 is definitely newer than .4

  14. kmessinger
    Member
    Posted 4 months ago #

    Just a comment on versions.

    It is dotted integers x.x.x versus decimal integers x.xx

    And of course, not everyone uses the same system.

  15. jonradio
    Member
    Posted 4 months ago #

    http://en.wikipedia.org/wiki/Software_versions describes the commonly used scheme that php, WordPress and most other software uses: Version.Release.Modification-Level

    When the Modification Level is zero, it is often omitted. Version 3.4.0 is often just 3.4

    At one time, IBM version numbering was a bit different. Version 3 was actually 3.1, and the next release was 3.2, as they did not use a Zero for a Release number.

    The numbers involved are decimal integers that can exceed 9. Before there was php 5.2.14 was 5.2.13, and immediately before 5.2.10 was 5.2.9

Reply

You must log in to post.

About this Topic