• Resolved petersandeen

    (@petersandeen)


    I’ve had various problems with my site affectselling.com recently. I’ve managed to solve (with the help of forum members here) most of them. But one remains.

    I can’t upload images. More specifically the upload works, but there’s no image. Instead of showing a preview of the image, only a question mark appears. And the size of the image is 0x0.

    I can work around the problem by uploading an image via FTP, but this doesn’t work with featured images. Or is there a way to set the featured image from a web address?

    I’ve tried different browsers and “multi-file” and browser uploaders. I’ve changed the “uploads” folder’s (and the “wp-content” folder’s) permissions to 777 and back to 755.

    I haven’t made any changes to the theme since the upload last worked. Nor is there any new plugins. The only thing that changed was the host (I changed from a shared host to dedicated server). And I updated WordPress.

    What can I do?

    I appreciate your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Review your php.ini file for image support and for max file upload size.

    Thread Starter petersandeen

    (@petersandeen)

    Thanks for helping.

    I can’t find a php.ini file. Do I need to create one? If I do, how can I do that?

    I tried finding (simple) explanations for creating the php.ini file, but they didn’t mention image support…

    Review with your host…they may have examples or maybe they force you using their (usually hidden) php.ini file – usually for a dedicated server, you do need to add a php.ini file but their may be contraints on what can be set in this file…discuss with host and search Google for this with your hosting providers name and php.ini dedicated server and then only take advise from well respected sources.

    Thread Starter petersandeen

    (@petersandeen)

    My host is GoDaddy so their reply was the usual “We couldn’t care less of your satisfaction. Nor did we even bother to read your email to the end.”

    They basically said, I should ask for help elsewhere. And their response indicated that they obviously didn’t even read through my email.

    They claimed there is a php.ini file on my server, but I can’t find one in the file they specified, nor anywhere else. Maybe it disappeared when I upgraded the PHP version… Anyhow, I need to create one by myself now. (Or is it possible that it would be completely hidden from FTP access???)

    I searched for instructions on how to create a php.ini file, but couldn’t find an example/explanation I’d understand. If I understood correctly, the file should be “php5.ini”. Could someone please help?

    Thank you so much for your help.

    Thread Starter petersandeen

    (@petersandeen)

    I just found a php.ini file on the server. It was in the “real” root folder’s “etc” folder. I previously only checked for the “root” (httpdocs) folder where wordpress and all other files for my domain are stored.

    But could someone explain what am I looking for here. I read through the file and didn’t understand what I should check for.

    Is this part of the code important?

    max_execution_time = 60
    max_input_time = 60	; Maximum amount of time each script may spend parsing request data
    memory_limit = 128M      ; Maximum amount of memory a script may consume

    My pictures are only about 50kB…

    Do I need the php5.ini file? Or can I modify the existing php.ini file in some way?

    Thanks for helping 🙂

    Yes, GoDaddy has two solutions for you…use our setup or create you own (dedicated server)..once you do the later your on your own…there are many examples of good php.ini files to use, and which form or format also, based on if you are running php 4 or 5, I assume 5 as all latter versions of WP require 5…

    Do this…create a phpinfo.php5 file and upload to root:

    It would include only this:

    <? phpinfo(); ?>

    Then open the file in your browser and you will then have all then details of your php environement.

    The only thing that changed was the host (I changed from a shared host to dedicated server).

    Could be an ownership problem on the new server.

    Thread Starter petersandeen

    (@petersandeen)

    Thanks again for helping.

    I created the file (and made sure there’s no additional hidden extensions in its name).

    I copy pasted the code into it. (I later also tried adding “php” after the first “<?” with no effect.)

    I uploaded it to the folder where the site is (httpdocs). I tried opening it by navigating to http://affectselling.com/phpinfo.php5 and through the control panel. The result was the same in both cases, the browser downloads the file (and only the original code is in it). Did I even attempt to open it the right way?

    I don’t know how to upload the file to the root of the server itself (or even the root folder of the site). Is that what I should’ve done? At least my FTP manager (FileZilla) refuses to upload anything there and I can’t even find a way to see the (server root) files through Plesk control panel.

    kmessinger, what do you mean with an ownership problem? If that’s the case, what can I do?

    I’m sorry I need to ask for more help. I really appreciate it.

    Ps. I’ve searched for an example of a php.ini file, but haven’t found one. I’ve only found endless talk about the functions (that I don’t understand) of the file. Could someone point me to the right direction? And should it be “php5.ini” since the server has PHP version 5?

    The owner of a file or folder is the user who has complete and full control over that file or folder in terms of being able to grant access to the resource, and also allow other users to take over the ownership of a file or folder. This is often, but not always, the creator of the file or folder and is governed by the location of where the file or folder is first created. Typically, the creator of the file or folder is, by default, initially designated as the owner.

    I am not a server guy so this is just my understanding. The directories initially are owned by the server. There is a setting that can be used on the server to correct the issue because some programs want the user to be the owner. Your host should be able to fix this easily. Go Daddy usually has good support especially for a customer with a dedicated server.

    Thread Starter petersandeen

    (@petersandeen)

    Thank you both for your help.

    It turned out to be a permissions problem. The upload started to work when I changed the permissions of the January’s uploads folder to 777…

    Thank you again 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can't upload images’ is closed to new replies.