Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Problems with 2.9 uploading images

  1. #1
    Thread Starter
    sergiv's Avatar
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problems with 2.9 uploading images

    Hi all,

    When I try to post a new add with images I get an error, it worked right with my old ClassiPress 2.8 version. All with the same Wordpress install.
    I CHMOD ..uploads/classipess and the theme too (it was made before anyway) Seems that the path it's not right, but what?

    The error is the following:

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/classipress) is not within the allowed path(s): (/var/www/vhosts/afilados.com/httpdocs:/tmp) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 206

    Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/classipress) is not within the allowed path(s): (/var/www/vhosts/afilados.com/httpdocs:/tmp) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 206

    Warning: copy() [function.copy]: open_basedir restriction in effect. File(/classipress/1243427414-1.jpg) is not within the allowed path(s): (/var/www/vhosts/afilados.com/httpdocs:/tmp) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 207

    Warning: copy(/classipress/1243427414-1.jpg) [function.copy]: failed to open stream: Operation not permitted in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 207

    Warning: chmod() [function.chmod]: open_basedir restriction in effect. File(/classipress/1243427414-1.jpg) is not within the allowed path(s): (/var/www/vhosts/afilados.com/httpdocs:/tmp) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 208

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php:206) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-includes/pluggable.php on line 850

  2. #2
    Veteran pointandstare's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    311
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Problems with 2.9 uploading images

    Have you installed the 2.9.1 update?

  3. #3
    Thread Starter
    sergiv's Avatar
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with 2.9 uploading images

    Hi,

    Yes, I tested it with 2.9 and 2.9.1 as well. I uploaded the old 2.8.2 without touching the plugins (the plugins I have installed are the new ones of 2.9.1) and now it works everything.

    Seems that something is falling when the program tries to upload the image, but I don't know if it's because it can't find the right path, or it's something related to the classifiedform.php file.

    Also when I get this error, I can go to Wordpress->Edit and post the message created, but the image uploaded doesn't appear. When I check the menu of Classipress in the Wordpress admin, Classipress->Images The submited image it's not there.

    I get's me really astonished...

  4. #4
    Veteran pointandstare's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    311
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Problems with 2.9 uploading images

    Are the images in the right place on the server?

    No consolation but I'm also having problems with images showing within the ad itself.
    I've managed to get thumbnails to show on the ad listing page but not on the page itself.
    Clicking where the image is supposed to be loads the image correctly in the fancybox ... bit not as a thumbnail.

  5. #5
    Thread Starter
    sergiv's Avatar
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with 2.9 uploading images

    The problem it's that v. 2.9.X can not upload the image to the server, seems that it's not able to find the path.
    Version 2.8.x with the same Wordpress installation has no problem to upload the image and show it correct, that's because the .php function used to upload the image on v.2.9.x it's not present on v.2.8.x.

  6. #6
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: Problems with 2.9 uploading images

    Try commenting out the following code in /classifiedform/classifiedform.class.php line 176-177:

    Code:
    $dir_to_make = $upload_arr['basedir'] . "/classipress";
    $image_baseurl = $upload_arr['baseurl'] . "/classipress";
    and use this code instead:

    Code:
    $dir_to_make = "wp-content/uploads/classipress";
    $image_baseurl = "wp-content/uploads/classipress";
    That might fix it since it's using the code in 2.8 instead of the new dynamic path.

  7. #7
    Veteran pointandstare's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    311
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Problems with 2.9 uploading images

    One thing I would advise against, if possible, is using the wp-content path - "wp-content/uploads/classipress".
    Why?
    Well, some people, myself included, always rename the wp-content folder for security purposes.

  8. #8
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: Problems with 2.9 uploading images

    Agreed. That's why we moved away from it in the 2.9 release.

  9. #9
    Thread Starter
    sergiv's Avatar
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with 2.9 uploading images

    Going to the right way, but still not there.

    A few notes:
    I have Wordpress installed in a sub-directory of the domain, called: "compraventa". The path to the uploads it's the recommended one: "compraventa/wp-content/uploads/classipress" the directory "uploads" and "classipress" are CHMOD'ed to "777".

    Now, with the modification that Mr. dcowgill suggested I get the following errors:

    Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 206

    Warning: copy(compraventa/wp-content/uploads/classipress/1243496026-1.jpg) [function.copy]: failed to open stream: No such file or directory in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 207

    Warning: chmod() [function.chmod]: No such file or directory in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php on line 208

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-content/themes/classipress/classifiedform/classifiedform.class.php:206) in /var/www/vhosts/afilados.com/httpdocs/compraventa/wp-includes/pluggable.php on line 850


    But I think this are now only two errors, one it's that it tries to modify the file but it can't do it, because t was not uploaded ergo not posible to do.
    The second one it's the last paragraph, but I still don't know what it means.

    Any idea?
    THANKS!

  10. #10
    Thread Starter
    sergiv's Avatar
    Join Date
    May 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problems with 2.9 uploading images

    Well, I have the problem solved now.

    I got me crazy. I was modifiying the "functions.php" and "classifiedform.class.php" files. So I was suposing we got a path problem. But afeter some modifications, I put there the original 2.9.1 files, and it works now!

    So, the problem was really on "functions.php" that was not uploaded correctly on the server. The strange thing it's that I did it two times, ones for 2.9 and the other for 2.9.1 and I got the same problem with the both.

    Crazy? Maybe, but I will still be checking it. If I found anything I will post it here.

    Thanks again for your time!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)