Results 1 to 9 of 9

Thread: Image upload suddenly stopped working

  1. #1
    Thread Starter
    Amateur
    Not a Verified Customer
    noelmd's Avatar
    Join Date
    Apr 2009
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image upload suddenly stopped working

    my classifieds site was ok until 2 days ago when i got reports that people could not post images.

    nothing changed in the server, i checked the permissions in the /uploads/classipress folder and everything checked out right.

    but somehow, errors appear when people submit an ad and upload images.

    i tried troubleshooting by submitting an ad myself and uploading images (all less than 100 KB). this was the error i was getting with this url (http://www.tsikot.biz/dashboard/" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false:

    Warning: mkdir() [function.mkdir]: Permission denied in /home/xxxxxx/public_html/wp-content/themes/classipress/form_process.php on line 119

    Warning: copy(/classipress/toyota-vios-test-ad-565250776.jpg) [function.copy]: failed to open stream: No such file or directory in /home/xxxxxx/public_html/wp-content/themes/classipress/form_process.php on line 120

    Warning: chmod() [function.chmod]: No such file or directory in /home/xxxxxx/public_html/wp-content/themes/classipress/form_process.php on line 121

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/wp-content/themes/classipress/form_process.php:119) in /home/xxxxxx/public_html/wp-includes/pluggable.php on line 865
    my site is this: http://www.tsikot.biz" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

    can anyone offer an explanation and a fix for this? posters can post ads but ads have no images, just placeholders. i checked thru ftp and the permissions are correct but no files are being uploaded to the directory.

    i am wondering why this happened to a working site so suddenly with no apparent reason.

    thanks in advance.

    noel

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

    Re: Image upload suddenly stopped working

    Well, something must have changed if it all of a sudden just started happening. Did you upgrade WP or CP around that time? Rename directories on the server?

    Sometimes your host provider makes server changes without telling you (or sends out an email) but it looks like a folder permission problem. Did you chmod the correct /images/classipress folder to 755?

    What are your current WP and CP versions?

  3. #3
    Amateur
    Not a Verified Customer
    alex74's Avatar
    Join Date
    Mar 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    Hi All,
    I have installed 3 times the latest versions of classipress and I saw exactly the same error commented above by the person who opened this thread.
    In order to test the theme, I created several ads.
    I fill all the formīs fields. I am able to browse my folders and choose the picture I want to upload.
    The error message shown in the first post of this thread appears right after I press the "Submit Ad" button.
    The post is created... but I can't see the images, I just see the placeholders.

    I have tried the following steps without any success.
    1) reuploaded the function.php file
    2) created the /images folder with chmod 775 (where exactly, in what path I should create this folder?)
    3) I gave more permissions to the themeīs folders/files
    4) etc.

    I havenīt had any issues in the past with the previous versions of CP, as I was able to see the pics normally.
    I am able to play with great application this just for a few hours per week, so I would prefer to find a workaround to this issue instead of re-installing the theme again.

    Please advice!

    Thanks

    Best
    Alex

  4. #4
    Amateur
    Not a Verified Customer
    alex74's Avatar
    Join Date
    Mar 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    Hi,
    just to add more details...
    I tried what is suggested in other forums and websites to resolve the issues explained in the 1st post, but they didnīt work.
    (for example: I removed the spaces before <?php and after ?> in the function.php, wp-config.php files, etc., I also gave 777 permissions to all the files involved in the error message).

    I have a new suspect....... I just noticed that the theme created an "http:" folder in the root (/mydomain.com/http:/mydomain.com/wp-content/uploads/2009).

    In what file you specify the root for the files that are uploaded? (I would like to remove the "http:").

    Thanks


    Best
    Alex

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

    Re: Image upload suddenly stopped working

    Hi Alex-

    I'm not sure why the http: was created there. My guess is someone accidentally created that folder. I would take it out and try again. I'm guessing that will fix it.

    Another option if that doesn't work would be to read this post as to how someone else fixed the same issue. The file you edit and lines might be different since it's an older version.

  6. #6
    Amateur
    Not a Verified Customer
    alex74's Avatar
    Join Date
    Mar 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    Hi David,
    thank you for replying.

    I deleted the "http:" folder. Then I created a new ad, I selected a picture to upload, then I press Submit and the same error message. And the http: folder was created again in the root.

    Ok, I tried the steps you just told me...

    In the form_process.php file, I have done these changes:
    I commented this line...
    $dir_to_make = trailingsla****($upload_arr['basedir']) . $image_folder_name;
    and added this one...
    $dir_to_make = "wp-content/uploads/classipress"


    This repaired the issue in part. The error message dissapeared, and I can see the thumbnails into the home. But I am not able to see the images when I open the ad.

    So I commented this line...
    (the one that you mentioned in that other post is not the same in 2.9.2 $image_baseurl = $upload_arr['baseurl'] . "/classipress"
    $image_baseurl = trailingsla****($upload_arr['baseurl']) . $image_folder_name;
    And added this one....
    $image_baseurl = get_option('home')."/";

    But making this change takes me a step back, as in this way I am not able to see the thumbnails in the home nor the images into the ad.

    Please advice.


    Thanks!!

    Best regards
    Alex

  7. #7
    Thread Starter
    Amateur
    Not a Verified Customer
    noelmd's Avatar
    Join Date
    Apr 2009
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    Quote Originally Posted by dcowgill
    Well, something must have changed if it all of a sudden just started happening. Did you upgrade WP or CP around that time? Rename directories on the server?

    Sometimes your host provider makes server changes without telling you (or sends out an email) but it looks like a folder permission problem. Did you chmod the correct /images/classipress folder to 755?

    What are your current WP and CP versions?
    sorry for getting back only now. i don't know what really caused this problem in the first place since i did not do whatever is mentioned above.

    but what fixed this is that i renamed the old folder (/classipress_old) and created a new folder (/classipress) and chmodded it with the proper permissions. for whatever it's worth, it worked. so i just transferred all the previous images from the old renamed folder to the new /classipress folder.

    now my site (http://www.tsikot.biz) is working perfectly again. i hope this helps.


  8. #8
    Amateur
    Not a Verified Customer
    alex74's Avatar
    Join Date
    Mar 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    well, I see there are dozens of ways in which this type of issues can be resolved.
    The only one that worked for me was to hardcode the paths...
    I have the latest version of WP (2.8.1) and CP 2.9.2

    I modified the form-process.php file and it looks like this now:
    // http://codex.wordpress.org/Function_Ref ... upload_dir
    $upload_arr = wp_upload_dir();
    // $dir_to_make = trailingsla****($upload_arr['basedir']) . $image_folder_name;
    $dir_to_make = "wp-content/uploads/classipress";
    // $image_baseurl = trailingsla****($upload_arr['baseurl']).$image_folder_name;
    $image_baseurl = get_option('home')."/wp-content/uploads/classipress";

    I hope this helps!

    Regards
    Alex

  9. #9
    padiwak's Avatar
    Join Date
    Jul 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Image upload suddenly stopped working

    Quote Originally Posted by noelmd
    Quote Originally Posted by dcowgill
    Well, something must have changed if it all of a sudden just started happening. Did you upgrade WP or CP around that time? Rename directories on the server?

    Sometimes your host provider makes server changes without telling you (or sends out an email) but it looks like a folder permission problem. Did you chmod the correct /images/classipress folder to 755?

    What are your current WP and CP versions?
    sorry for getting back only now. i don't know what really caused this problem in the first place since i did not do whatever is mentioned above.

    but what fixed this is that i renamed the old folder (/classipress_old) and created a new folder (/classipress) and chmodded it with the proper permissions. for whatever it's worth, it worked. so i just transferred all the previous images from the old renamed folder to the new /classipress folder.

    now my site (http://www.tsikot.biz" onclick="window.open(this.href);return false is working perfectly again. i hope this helps.


    For what it is worth I had the same problem and repeated the steps above and problem solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Displaying a Main Image or Large Image for listings
    By kwave12 in forum ClassiPress General Discussion
    Replies: 20
    Last Post: December 10th, 2010, 04:47 PM
  2. Search Engine Not working/Images not showing
    By tiffany in forum ClassiPress General Discussion
    Replies: 11
    Last Post: April 29th, 2009, 04:57 PM