[PHP] Uploading files

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by gerwim, May 10, 2011.

  1. gerwim

    gerwim New Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi there,

    I'd like to know if it's possible to upload images to a x10hosting package. I'm building a website for a client, which has webhosting here. I'm using the exact same script on my own server, and then the image is uploaded. phpinfo() is also blocked here so I'm not able to look for anything which may cause this.

    TL;DR: Am I able to upload files using PHP?

    Thanks in advance.
     
  2. descalzo

    descalzo Grim Squeaker Community Support

    Messages:
    9,375
    Likes Received:
    327
    Trophy Points:
    83
    Yes. But any images you upload must be part of the site. This is not imageshack or photobucket.
     
  3. gerwim

    gerwim New Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Thanks.

    Yes, it is a part of the site. But how will this be done? Do I need to contact x10hosting to enable uploading of my domain?
     
  4. descalzo

    descalzo Grim Squeaker Community Support

    Messages:
    9,375
    Likes Received:
    327
    Trophy Points:
    83
    There is nothing blocking uploads. Nothing has to be enabled.

    If your script is not working, it is because it has an error in it when run here. You didn't say if there were error messages. Many scripts turn off error messages, which makes debugging hard, if not impossible.
     
  5. gerwim

    gerwim New Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    That's correct, although I have stated that the very same script works on my own server though.

    I'm trying to upload into an SQL database.

    With
    <?php
    print_r($_FILES);
    ?>
    I'm not getting any output. According to php.net (commentary) this is because due to a blocked server configuration.
     
  6. descalzo

    descalzo Grim Squeaker Community Support

    Messages:
    9,375
    Likes Received:
    327
    Trophy Points:
    83
    I don't show a hosting account linked to your Forum username, so I don't know what server you are on.

    But I have a test account on Chopin. Running Drupal. And it uploads images fine.

    Due to the load balancing and multi-user set up here, many things that run on home computers, or even on other hosts, do not work here without adjustment to the script.
     
  7. bidzey75

    bidzey75 New Member

    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    0
    always check the error log files it will tell you what's going on. If the same script works on another server my best guess is it's a permission issue
     
    Last edited: May 10, 2011
  8. gerwim

    gerwim New Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    I'm on Starka.
     

Share This Page