Loading ...
Sorry, an error occurred while loading the content.

Upload images in more than one server

Expand Messages
  • Murali
    HI all I have write the PHP file to upload images from user. It uploads successfully to my server. But we have more than one servers in production. what
    Message 1 of 5 , Jun 26, 2008
    • 0 Attachment
      HI all

      I have write the PHP file to upload images from user. It uploads successfully to my server. But we have more than one servers in production. what happens means the uploaded image in oner server will not be available in another server. I want to upload the images in all the server. How can I able to this. Help me to solve this issue.

      Thanks in Advance.

      Regards
      Murali








      [Non-text portions of this message have been removed]
    • Kathir
      Hi Murali, I hope this may help you to solve you issue, if your server are Lynx or MAC you can create a common folder / server and create virtual link to this
      Message 2 of 5 , Jun 26, 2008
      • 0 Attachment
        Hi Murali,



        I hope this may help you to solve you issue, if your server are
        Lynx or MAC you can create a common folder / server and create virtual link
        to this common folder / server from your production servers. Then upload the
        images to this common folder / server, it'll be accessible by the entire
        server connected through virtual link.



        Thanks

        - Kathir



        _____

        From: in-phpug@yahoogroups.com [mailto:in-phpug@yahoogroups.com] On Behalf
        Of Murali
        Sent: Thursday, June 26, 2008 3:30 PM
        To: in-phpug@yahoogroups.com
        Subject: [in-phpug] Upload images in more than one server



        HI all

        I have write the PHP file to upload images from user. It uploads
        successfully to my server. But we have more than one servers in production.
        what happens means the uploaded image in oner server will not be available
        in another server. I want to upload the images in all the server. How can I
        able to this. Help me to solve this issue.

        Thanks in Advance.

        Regards
        Murali

        [Non-text portions of this message have been removed]





        [Non-text portions of this message have been removed]
      • Dr. Tarique Sani
        ... If you want a *PHP only* solution then after upload to one server use the PHP ftp functions to copy files to all other servers. Alternatively you can use
        Message 3 of 5 , Jun 26, 2008
        • 0 Attachment
          Murali wrote:
          > I have write the PHP file to upload images from user. It uploads successfully to my server. But we have more than one servers in production. what happens means the uploaded image in oner server will not be available in another server. I want to upload the images in all the server. How can I able to this. Help me to solve this issue.
          >

          If you want a *PHP only* solution then after upload to one server use
          the PHP ftp functions to copy files to all other servers.

          Alternatively you can use rsync between servers - most clusters have
          some sort of sync util built in...

          HTH

          Tarique

          --
          =============================================================
          PHP Applications for E-Biz: http://www.sanisoft.com
          Coppermine Picture Gallery: http://coppermine.sf.net
          =============================================================
        • Rohan Prabhu
          You have quite a few options: i] Use a php powered HTML form on each server and then use CURL functions to use this form to upload the files. This might not be
          Message 4 of 5 , Jun 26, 2008
          • 0 Attachment
            You have quite a few options:

            i] Use a php powered HTML form on each server and then use CURL
            functions to use this form to upload the files. This might not be all
            that reliable, but it is the most portable option you have.

            ii] Write a binary using python/perl/C++ to sync files. You can use
            socket functions to do this. A client program on each server will
            listen on a port for incoming files and a broadcasting program on each
            server will notify other servers of any changes. This might be
            difficult to implement, but this is the best option as the programs
            can be running constantly, unlike php pages, which are run only once
            per request. This will allow the programs to manage the syncing
            options better.

            iii] You can use inbuilt FTP functions of php. Like the first case,
            this also is not all that reliable.

            What i mean by 'not reliable', is if a file transfer fails for the
            first time due to some network issue, you cannot be certain when the
            php script will be re-run so as to recheck the queue. As with Case II,
            the programs can continuously monitor changes and sync effectively.

            regards,
            rohan

            On Thu, Jun 26, 2008 at 3:29 PM, Murali <bmk_srgm@...> wrote:
            > HI all
            >
            > I have write the PHP file to upload images from user. It uploads
            > successfully to my server. But we have more than one servers in production.
            > what happens means the uploaded image in oner server will not be available
            > in another server. I want to upload the images in all the server. How can I
            > able to this. Help me to solve this issue.
            >
            > Thanks in Advance.
            >
            > Regards
            > Murali
            >
            > [Non-text portions of this message have been removed]
            >
            >
          • karni karan
            1. You can save the image in database, and read from there.. So irrespective of which server it is calling.. the image would come from database. So when you
            Message 5 of 5 , Jun 26, 2008
            • 0 Attachment
              1. You can save the image in database, and read from there.. So irrespective of which server it is calling.. the image would come from database. So when you need to change servers too.. everything would be in DB.

              2nd option : use Amazon S3 service or similar services available to host your images instead of using your own server. This will also help on reducing load on your server.

              Karunakar Gowni


              --- On Thu, 6/26/08, Rohan Prabhu <rohan@...> wrote:
              From: Rohan Prabhu <rohan@...>
              Subject: Re: [in-phpug] Upload images in more than one server
              To: in-phpug@yahoogroups.com
              Date: Thursday, June 26, 2008, 5:52 PM











              You have quite a few options:



              i] Use a php powered HTML form on each server and then use CURL

              functions to use this form to upload the files. This might not be all

              that reliable, but it is the most portable option you have.



              ii] Write a binary using python/perl/ C++ to sync files. You can use

              socket functions to do this. A client program on each server will

              listen on a port for incoming files and a broadcasting program on each

              server will notify other servers of any changes. This might be

              difficult to implement, but this is the best option as the programs

              can be running constantly, unlike php pages, which are run only once

              per request. This will allow the programs to manage the syncing

              options better.



              iii] You can use inbuilt FTP functions of php. Like the first case,

              this also is not all that reliable.



              What i mean by 'not reliable', is if a file transfer fails for the

              first time due to some network issue, you cannot be certain when the

              php script will be re-run so as to recheck the queue. As with Case II,

              the programs can continuously monitor changes and sync effectively.



              regards,

              rohan



              On Thu, Jun 26, 2008 at 3:29 PM, Murali <bmk_srgm@yahoo. com> wrote:

              > HI all

              >

              > I have write the PHP file to upload images from user. It uploads

              > successfully to my server. But we have more than one servers in production.

              > what happens means the uploaded image in oner server will not be available

              > in another server. I want to upload the images in all the server. How can I

              > able to this. Help me to solve this issue.

              >

              > Thanks in Advance.

              >

              > Regards

              > Murali

              >

              > [Non-text portions of this message have been removed]

              >

              >



























              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.