Apache,MySql,PHP on Windows vs. Linux

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

    Apache,MySql,PHP on Windows vs. Linux

    OK...
    Crazy (possibly dumb) question here...
    I have a site running apache, mysql, php in a Win2K environment.
    Primary development is that env also. I also am setting up a linux box
    (old laptop), to begin playing with Linux. I'd like to set it up
    similiary with apache,mysql, php.
    If I do that, and start doing some development there (Linux box) - can
    I expect that when I move the php code to the windows box that it will
    behave similarly as it did on Linux?
    Anything to watch out for? I'm completely new to Linux...

    thanks for your help...

  • pjSoni

    #2
    Re: Apache,MySql,PH P on Windows vs. Linux

    Hi,

    For that you have to install php,mysql,apach e in linux and if u r using
    php.ini with linux than u need to change error_repoting optiong 2 more
    strict and try 2 user every where $_POST and $_GET and $_SERVER and
    keep practice to assign each variable like $a = '' than over write
    where you want and also use to check is_set to check post or get vars
    after submitting page.

    Regards,
    Jatin

    Comment

    • Sean Barton

      #3
      Re: Apache,MySql,PH P on Windows vs. Linux

      Hi...

      the linux version is much nicer to play with although i suggest you use
      xwindows to do the development, if you like the command line stuff i
      recommend you install vim or emacs as vi is spawn of the devil.

      make sure that if you open any files in your scripts that the paths
      have been changed to match their linux location unless your smart
      enough to code with ../../../ etc... much easier. some php functions
      behave differently with windows and linux but not mostly.

      finally browsers are slightly different. if you are unfortunate enough
      to use internet explorer then your pages especially the tables may draw
      differently in mozilla, konqueror or firefox. i suggest firefox for
      both windows and linux.

      please be aware as you are new to linux you might find it very hard to
      begin to use. stick at it as as they say 'everything else is just a
      toy' ok i nicked that from toy soldiers but its true. make sure you
      know someone with linux

      good luck with it

      Sean Barton

      Comment

      • f3l_

        #4
        Re: Apache,MySql,PH P on Windows vs. Linux

        and dont forget to replace all your \\ with / in the paths,
        just in case.

        AND the linux shell is case sensitive, so /SOMETHING/ != /something/ ,
        but it would work on windows


        just a couple of thing to look out for

        /f3l

        Comment

        • Jim Michaels

          #5
          Re: Apache,MySql,PH P on Windows vs. Linux


          "Sean Barton" <barton.sean@gm ail.com> wrote in message
          news:1139252277 .386148.150990@ g43g2000cwa.goo glegroups.com.. .[color=blue]
          > Hi...
          >
          > the linux version is much nicer to play with although i suggest you use
          > xwindows to do the development, if you like the command line stuff i
          > recommend you install vim or emacs as vi is spawn of the devil.[/color]

          vim's OK. had a few problems with vi once in a while. massive problems and
          learning curve with emacs.
          ahh - you emacs people... emacs makes my control and meta pinky hurt. :-)
          but, in emacs you can do just about anything, I'll give it that - even send
          emails & compile programs.
          to each his own I guess. I found a favorite editor on my platform that's
          neither vi nor emacs.

          One thing to keep in mind is that if you transfer files between the two
          boxes, you may want to do cr/lf conversions on the files if you are doing
          any editing.
          PHP won't care about the cr/lf difference AFAIK. but it's annoying in an
          editor.
          When you port a UNIX file to windows, because there is no cr, and you open
          the file up in notepad, (dreamweaver fixes things great), notepad will run
          all the lines together in one big mash with little lf symbols sprinkled
          throughout. That can be manually corrected.
          You can probably find a free unix2pc crlf conversion utility out there for
          Windows. or, just write a PHP script to convert the linefeeds using
          file_get_conten ts() and file_put_conten ts(), explode(), and implode(). UNIX
          already has these text tools built-in... I just forgot what they were - I
          think tr can be used, but it may be the hard way to do it. On the UNIX box,
          make sure you install man pages (probably is by default, but make sure they
          are *all* installed). then try using
          man tr
          and
          man -k pc2unix
          or
          man -k pctounix | more
          or
          man -k crlf | more
          and see if any commands pop up.
          and remember that \r is a return, \n is a linefeed for the tr command (or
          most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
          it's simply \n.
          [color=blue]
          >
          > make sure that if you open any files in your scripts that the paths
          > have been changed to match their linux location unless your smart
          > enough to code with ../../../ etc... much easier. some php functions
          > behave differently with windows and linux but not mostly.
          >
          > finally browsers are slightly different. if you are unfortunate enough
          > to use internet explorer then your pages especially the tables may draw
          > differently in mozilla, konqueror or firefox. i suggest firefox for
          > both windows and linux.
          >
          > please be aware as you are new to linux you might find it very hard to
          > begin to use. stick at it as as they say 'everything else is just a
          > toy' ok i nicked that from toy soldiers but its true. make sure you
          > know someone with linux
          >
          > good luck with it
          >
          > Sean Barton
          >[/color]


          Comment

          • Jasen Betts

            #6
            Re: Apache,MySql,PH P on Windows vs. Linux

            On 2006-02-07, Jim Michaels <jmichae3@nospa m.yahoo.com> wrote:
            [color=blue]
            > think tr can be used, but it may be the hard way to do it. On the UNIX box,
            > make sure you install man pages (probably is by default, but make sure they
            > are *all* installed). then try using
            > man tr
            > and
            > man -k pc2unix
            > or
            > man -k pctounix | more
            > or
            > man -k crlf | more
            > and see if any commands pop up.
            > and remember that \r is a return, \n is a linefeed for the tr command (or
            > most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
            > it's simply \n.[/color]

            on unix to convert from dos format

            tr -d '\r' < dosfile > unixfile

            to convert to dos format

            sed 's/$/\r/' < unixfile >dosfile

            converting unix files on dos/windows is harder, but there are a number of free tools
            on simtel.net (or you can use sed and tr if you have them installed...)

            Bye.
            Jasen

            Comment

            • Jim Michaels

              #7
              Re: Apache,MySql,PH P on Windows vs. Linux


              "Jasen Betts" <jasen@free.net .nz> wrote in message
              news:3145.43e9b 7d9.7f0@clunker .homenet...[color=blue]
              > On 2006-02-07, Jim Michaels <jmichae3@nospa m.yahoo.com> wrote:
              >[color=green]
              >> think tr can be used, but it may be the hard way to do it. On the UNIX
              >> box,
              >> make sure you install man pages (probably is by default, but make sure
              >> they
              >> are *all* installed). then try using
              >> man tr
              >> and
              >> man -k pc2unix
              >> or
              >> man -k pctounix | more
              >> or
              >> man -k crlf | more
              >> and see if any commands pop up.
              >> and remember that \r is a return, \n is a linefeed for the tr command (or
              >> most commands on UNIX). on a pc, \r\n is the sequence. on UNIX, I think
              >> it's simply \n.[/color]
              >
              > on unix to convert from dos format
              >
              > tr -d '\r' < dosfile > unixfile
              >
              > to convert to dos format
              >
              > sed 's/$/\r/' < unixfile >dosfile
              >
              > converting unix files on dos/windows is harder, but there are a number of
              > free tools
              > on simtel.net (or you can use sed and tr if you have them installed...)
              >[/color]

              there is also a project called GNUISH MSDOS. it only works with 8.3
              filenames though, so you'll probably lose your long filename.
              [color=blue]
              > Bye.
              > Jasen[/color]


              Comment

              Working...