• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    Go to solution
    Highlighted

    display image file

    I am developing a PHP application for members of my camera club to upload images for our monthly competition to our website.  Our competition committee then downloads the images with FTP (FileZilla) for further processing on their desktop PC.  This all works. 

     

    The club members are asking for visual confirmation that their images have been successfully uploaded to the website.  I locate their image files with:

     

    $searchPattern = getcwd() . "/" . $destDir . $salonNumber . "*";

    $files = array_map('basename',glob($searchPattern));

     

    I then loop through $files and generate:

    echo "&emsp;&emsp;&emsp;<img src='" . $src . "' alt='" . $title . "' height='100' width='100'>";

     

    where $src

    $url="http://" . $_SERVER['SERVER_NAME'] . "/mvpc/uploads/" . $_SESSION['DESTDIR'];
    $src=$url . "$f"; 

     

    This works fine when tested on my PC as localhost, but the image is not displayed when run on GoDaddy.  

     

    Have I encountered a permission problem?

     

    Any suggestions on how to go about what I am trying to do are appreciated.

     

    Am I running up 

    6 REPLIES 6
    3fk
    Former Employee

    Re: display image file

    Hello,

    I would like to ask what's the domain url, and what page or error appears when you pull it up.
    If uploading a custom php on a cPanel Can be perms, php version is wrong or Source Path.

    Warm regards,
    -Joven

    Re: display image file

    Joven,

    Thanks for the response.

     

    The website URL is MinnesotaValleyPhotoClub.org.

     

    Sorry, I know nothing about cPanel.  I install my custom PHP with FTP.  The generated HTML giving me trouble is (viewing source with browser):

     

    <img src='http://minnesotavalleyphotoclub.org/mvpc/uploads/images/Feb/160,DCO,title2.jpg' alt='title2' height='100' width='100'

     

    What gets displayed is small image icon with an X and the string specified as the “alt”.

     

    I can confirm with FileZilla that the file does exist in the lovation specified.  The file permissions are 604.  Could this be an issue?

     

    Thanks again!

    == al

    3fk
    Former Employee

    Re: display image file

    Possible file permissions from the root. try tweaking the perms, and try moving to webroot, Also try disabling control files by reanming them via FileZilla, if no go, Chat Godaddy Hosting Support to dive in your account and check further.

    To Chat:

    Go to :https://uk.godaddy.com/help

    Click on chat online on top right.

    Drop down: Wp or Hosting

    Look for me: Joven /  jrefuerzo

    Re: display image file

    Root cause of my problem was miscommunication between me and the web developers.  The file structure was not what I thought it was.  Once corrected, images are displayed on the users browser.

    Solution

    Re: display image file

    Joven ... thanks for your help!

    3fk
    Former Employee

    Re: display image file

    @akiecker Happy to help or guide. Smiley Happy

    My best wishes to your new projects!
    -joven