PHP portability

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nick Mudge

    PHP portability

    I have PHP 4 running as a module on windows XP, I also have MySQL and Apache
    2 running on windows XP.

    If I write a big website on my computer that has XP and I use PHP, MySQL and
    Apache 2, and HTML and Javascript to write my web site, how hard will
    it be to transfere my whole website from my home computer to a hosting
    company that I find on the web.

    Does anybody know how hard the portability issue would be? Are there a lot
    of hosting companies that I can find on the web that would be good for this?

    Thanks a million for information, I don't know what I would do without
    Usenet.


  • Andreas Paasch

    #2
    Re: PHP portability

    Attempting to reach the Kolinahr, Nick Mudge wrote:
    [color=blue]
    > I have PHP 4 running as a module on windows XP, I also have MySQL and
    > Apache 2 running on windows XP.
    >
    > If I write a big website on my computer that has XP and I use PHP, MySQL
    > and Apache 2, and HTML and Javascript to write my web site, how hard
    > will it be to transfere my whole website from my home computer to a
    > hosting company that I find on the web.
    >
    > Does anybody know how hard the portability issue would be? Are there a
    > lot of hosting companies that I can find on the web that would be good for
    > this?
    >
    > Thanks a million for information, I don't know what I would do without
    > Usenet.[/color]

    It is my firm belief, you should reverse the process to a certain degree.
    Due to some ISP sticking with some version of especially PHP and users
    trying to always run the latest, you might encounter problems when using
    newer features of PHP that the ISP can't support.
    Same goes for MySQL.
    Last, Linux, Apache, MySQL and PHP, that's the way to do things, as that
    is a native system, not on windows.

    Yes, you can do the coding, build that site entirely, but not considering
    these facts I stated when looking for a decent ISP then you are doomed for
    trouble.

    It's not crucial now, but to prevent problems you have to bear it in mind.

    HTH,

    /Andreas

    --
    #Peace and long life ...
    Registeret Linux user #292411


    Comment

    • Tony Marston

      #3
      Re: PHP portability

      I develop my PHP code using Windows XP, and the same code runs on my web
      host which uses Linux. So yes, PHP code is completely portable.

      The only problem that you might find is that while you may have the latest
      releases of PHP and MySQL on your PC, some hosting companies may be two or
      even three steps behind.

      --
      Tony Marston

      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




      "Nick Mudge" <mark1822@hotma il.com> wrote in message
      news:PHSkc.5886 $Ia6.661726@att bi_s03...[color=blue]
      > I have PHP 4 running as a module on windows XP, I also have MySQL and[/color]
      Apache[color=blue]
      > 2 running on windows XP.
      >
      > If I write a big website on my computer that has XP and I use PHP, MySQL[/color]
      and[color=blue]
      > Apache 2, and HTML and Javascript to write my web site, how hard will
      > it be to transfere my whole website from my home computer to a hosting
      > company that I find on the web.
      >
      > Does anybody know how hard the portability issue would be? Are there a[/color]
      lot[color=blue]
      > of hosting companies that I can find on the web that would be good for[/color]
      this?[color=blue]
      >
      > Thanks a million for information, I don't know what I would do without
      > Usenet.
      >
      >[/color]


      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: PHP portability

        "Nick Mudge" <mark1822@hotma il.com> wrote in message news:<PHSkc.588 6$Ia6.661726@at tbi_s03>...[color=blue]
        > I have PHP 4 running as a module on windows XP, I also have MySQL and Apache
        > 2 running on windows XP.
        >
        > If I write a big website on my computer that has XP and I use PHP, MySQL and
        > Apache 2, and HTML and Javascript to write my web site, how hard will
        > it be to transfere my whole website from my home computer to a hosting
        > company that I find on the web.[/color]

        It depends how you code.

        -If you "hard-code" the include file path, then it will result in
        problem.
        eg. include("d:\foo \foo.php");
        -Some modules are not available for Windows. So, you should find
        the "workaround " when dealing with such kind of functions.
        eg. getmxrr() <http://in.php.net/getmxxr>

        And if you consider, all these factors, then it is perfectly
        portable.

        --
        http://www.sendmetoindia.com - Send Me to India!
        Email: rrjanbiah-at-Y!com

        Comment

        • Gordon Burditt

          #5
          Re: PHP portability

          >I have PHP 4 running as a module on windows XP, I also have MySQL and Apache[color=blue]
          >2 running on windows XP.
          >
          >If I write a big website on my computer that has XP and I use PHP, MySQL and
          >Apache 2, and HTML and Javascript to write my web site, how hard will
          >it be to transfere my whole website from my home computer to a hosting
          >company that I find on the web.
          >
          >Does anybody know how hard the portability issue would be? Are there a lot
          >of hosting companies that I can find on the web that would be good for this?[/color]

          There are a number of portability problems you may encounter with PHP that
          don't depend on differences between the OS it's running on.

          - You may find it difficult or at least very awkward to write PHP that works on
          BOTH an older version that doesn't support the $_GET, etc. superglobals, AND
          one which has register_global s turned off and you are administrativel y
          prohibited from turning it on. Granted, there was a fairly long period of
          overlap when the superglobals were supported and register_global s defaulted
          to on, but some web hosts don't update their software very often.
          Check their PHP version and policies before signing up.

          - Don't use new features if you want it to run on versions of PHP before that
          feature was added.

          - PHP is built with or without a number of modules (e.g. MySQL
          client, CURL, etc.): the more of these that are necessary for your page
          to work, the more likely it is you will discover that your web host doesn't
          and won't include one or more of them.

          - Running in "safe mode" is rather different from running with "safe mode" off.
          Some web hosts require "safe mode". I don't know if there are any hosts
          out there that refuse to let you turn it *ON*.

          - Values passed from the web server may vary with the type and version of
          web server running (Apache vs. IIS, Apache 1.3 vs. Apache 2.0, Apache +
          one of various add-ons to do SSL vs. a different add-on to do SSL, etc.)

          - Things like hardcoded path names are potential trouble even with the same
          OS, PHP version, web server version, and same machine, but different virtual
          hosts.

          Gordon L. Burditt

          Comment

          • Nikolai Chuvakhin

            #6
            Re: PHP portability

            "Nick Mudge" <mark1822@hotma il.com> wrote in message
            news:<PHSkc.588 6$Ia6.661726@at tbi_s03>...[color=blue]
            >
            > I have PHP 4 running as a module on windows XP, I also have MySQL
            > and Apache 2 running on windows XP.
            >
            > If I write a big website on my computer that has XP and I use PHP,
            > MySQL and Apache 2, and HTML and Javascript to write my web site,
            > how hard will it be to transfere my whole website from my home
            > computer to a hosting company that I find on the web.[/color]

            The majority of Web hosting companies run PHP on either Linux or BSD;
            also, Apache 2 is still believed by many to be insufficiently stable
            for production environments. Consequently, major incompatibility can
            arise from using either Windows-specific extensions (such as COM or
            Printer) or relying on functionalities specific to Apache 2 and not
            supported by Apache 1.3. As long as you are doing neither, you
            should be fine.

            In addition, be sure your MySQL queries are backward compatible with
            MySQL 3.23. There were a lot of changes between MySQL 3.23 and 4.0,
            but many hosting companies out there still have 3.23.

            Also, remember that Linux and BSD require forward slashes in paths
            (in Windows, you can get by with backward slashes) and have case-
            sensitive filename system.

            Cheers,
            NC

            Comment

            Working...