new to PHP -- basic questions...

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

    new to PHP -- basic questions...

    I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for
    2 years now, and even though I know there are ways you can use PHP in
    conjunction with Tomcat, I'd rather not tinker with Tomcat..

    I think I'd rather try to do it straight 'from scratch'... following
    instructions here, http://us2.php.net/tut.php.. so you need both Apache
    **AND** PHP server? not sure what to dl when get to
    http://www.apache.org/ (HTTP Server? top link on the left..) I suppose
    for PHP I need to dl what's here, http://us2.php.net/downloads.php.. am
    on W2k, would like a binary, I assume top one under "Windows Binaries"?

    Does PHP server come with adequate instructions (I mean how to
    install/run together w/the Apache server..)

    would very much appreciate info/guidelines.. thank you..

    Frances
  • Frances

    #2
    Re: new to PHP -- basic questions...

    found out can use w/IIS, which I already have installed... just dl'd
    PHP.. it says here,


    to install open "executable installer".. which one is that? php.exe?
    php-win.exe? I unzipped downloaded zip, did this install server or just
    unzip installer and other files? don't know if php.exe is actual
    server-app or installer.. (not very useful installation instructions in
    install.txt..) my IIS is at c:\Inetpub (and it works fine, have tested
    already..) where do I install PHP server to make it run with IIS..
    (downloaded to c:\ all files are now in c:\php..) I assume go-pear.bat
    is to turn server on? (Tomcat server I also turn on w/a batch file..)
    thank you..



    Frances wrote:[color=blue]
    > I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for
    > 2 years now, and even though I know there are ways you can use PHP in
    > conjunction with Tomcat, I'd rather not tinker with Tomcat..
    >
    > I think I'd rather try to do it straight 'from scratch'... following
    > instructions here, http://us2.php.net/tut.php.. so you need both Apache
    > **AND** PHP server? not sure what to dl when get to
    > http://www.apache.org/ (HTTP Server? top link on the left..) I suppose
    > for PHP I need to dl what's here, http://us2.php.net/downloads.php.. am
    > on W2k, would like a binary, I assume top one under "Windows Binaries"?
    >
    > Does PHP server come with adequate instructions (I mean how to
    > install/run together w/the Apache server..)
    >
    > would very much appreciate info/guidelines.. thank you..
    >
    > Frances[/color]

    Comment

    • Erwin Moller

      #3
      Re: new to PHP -- basic questions...

      Frances wrote:
      [color=blue]
      > I want to learn PHP.. I know JSP, Servlets, have been using Tomcat for
      > 2 years now, and even though I know there are ways you can use PHP in
      > conjunction with Tomcat, I'd rather not tinker with Tomcat..[/color]

      Hi Frances,

      I come from the same place.
      PHP will is a lot easier to master than J2EE (servlets/taghandlers/etc).
      :-)
      [color=blue]
      >
      > I think I'd rather try to do it straight 'from scratch'... following
      > instructions here, http://us2.php.net/tut.php.. so you need both Apache
      > **AND** PHP server?[/color]

      Yes, you need a webserver.
      This can be Apache (good choice).

      PHP itself is not called a server.
      You can install it cooperating with an existing webserver, so that webserver
      can do PHP.


      not sure what to dl when get to[color=blue]
      > http://www.apache.org/ (HTTP Server? top link on the left..) I suppose
      > for PHP I need to dl what's here, http://us2.php.net/downloads.php.. am
      > on W2k, would like a binary, I assume top one under "Windows Binaries"?[/color]

      Confusing? So is Tomcat for starters. ;-)
      IMHO: By far the best way to install your PHP-stuff is AFTER reading through


      Do not use a ready-to-go installer unless you know what it is doing.

      [color=blue]
      >
      > Does PHP server come with adequate instructions (I mean how to
      > install/run together w/the Apache server..)[/color]

      That is described in detail in: II. Installation and Configuration
      [color=blue]
      >
      > would very much appreciate info/guidelines.. thank you..
      >
      > Frances[/color]

      My advise is to first get apache up and running, and when you feel
      confortable, start with PHP.
      It sounds like you must learn both apache and PHP, so don't rush yourself.
      Apache is huge with many configurationop tions, so it is impossible for
      starters to read and understand it all right away.

      The installinstruct ions for PHP from the above link are sometimes a bit
      cryptic, but they are good and cover a lot of important stuff.

      WAMP:
      If you also plan on using mySQL as a database, then your setup is often
      refered to on the net as WAMP (Windows/Apache/MySQL/PHP).

      A few ready-to-go installers can be found to install the whole shebang right
      away for you, but I don't know if they are good/reliable.
      (I rather do stuff by hand myself untill I think I understand what is going
      on.)

      If you feel lost, always start at www.php.net and read the usercontributed
      notes. In 90% of the cases you'll see others had your questions/problems
      before.

      Good luck!

      Regards,
      Erwin Moller

      Comment

      • Erwin Moller

        #4
        Re: new to PHP -- basic questions...

        Frances wrote:
        [color=blue]
        > found out can use w/IIS, which I already have installed... just dl'd
        > PHP.. it says here,
        > http://us2.php.net/manual/en/install...dows.installer
        >
        > to install open "executable installer".. which one is that? php.exe?
        > php-win.exe? I unzipped downloaded zip, did this install server or just
        > unzip installer and other files? don't know if php.exe is actual
        > server-app or installer.. (not very useful installation instructions in
        > install.txt..) my IIS is at c:\Inetpub (and it works fine, have tested
        > already..) where do I install PHP server to make it run with IIS..
        > (downloaded to c:\ all files are now in c:\php..) I assume go-pear.bat
        > is to turn server on? (Tomcat server I also turn on w/a batch file..)
        > thank you..
        >
        >[/color]

        Do not use that installer, unless you are not planning on using ANY
        extension (eg: a database).
        Install it by hand.
        ISAPI is now working good under IIS.
        The instalationstep s are easy.

        go-pear has nothing to do with installing PHP, but with extra packages/libs.

        Please take your time before you rush into things, and read first through
        the whole installationsec tion before proceeding, believe me: it will safe
        you a headache later.

        If you don't, you'll probably end up with 4 php.ini's, ISAPI and CGI both
        installed, some apache you are not sure of if it is running (or was it
        IIS?), what did you change where in IIS, etc etc.

        go read the installinstruct ions.

        Good luck.

        Regards,
        Erwin Moller

        Comment

        • Erwin Moller

          #5
          Re: new to PHP -- basic questions...

          Erwin Moller wrote:

          <snip>
          [color=blue]
          > WAMP:
          > If you also plan on using mySQL as a database, then your setup is often
          > refered to on the net as WAMP (Windows/Apache/MySQL/PHP).
          >
          > A few ready-to-go installers can be found to install the whole shebang
          > right away for you, but I don't know if they are good/reliable.
          > (I rather do stuff by hand myself untill I think I understand what is
          > going on.)[/color]

          By the way: if you want to go with a all-in-one installer (and not do it by
          hand), I heard this one is good:


          Regards,
          Erwin Moller

          Comment

          • Frances

            #6
            Re: new to PHP -- basic questions...

            Erwin Moller wrote:[color=blue]
            > Erwin Moller wrote:
            >
            > <snip>
            >[color=green]
            >>WAMP:
            >>If you also plan on using mySQL as a database, then your setup is often
            >>refered to on the net as WAMP (Windows/Apache/MySQL/PHP).
            >>
            >>A few ready-to-go installers can be found to install the whole shebang
            >>right away for you, but I don't know if they are good/reliable.
            >>(I rather do stuff by hand myself untill I think I understand what is
            >>going on.)[/color]
            >
            >
            > By the way: if you want to go with a all-in-one installer (and not do it by
            > hand), I heard this one is good:
            > http://www.wampserver.com/en/index.php
            >
            > Regards,
            > Erwin Moller[/color]

            thank you very much Erwin.. don't even know what you mean by install
            "by hand" (or by "ready-to-go installer"..) don't know which ones are
            which among files I downloaded.. I downloaded PHP 5.1.4 zip package
            (first link under "Windows Binaries")

            I'm not rushing into things.. I did read this pg
            http://us2.php.net/manual/en/install...dows.installer..
            again, it says to open "executable installer".. I don't know which one
            that is.. (yes, instructions ARE "a bit cryptic".. this is the problem
            for newcomers...:)

            (yes, I do want to make db-connections (already have MySQL installed and
            make connections to it from both Tomcat and stand-alone java classes..
            yes, btw, Tomcat, is also confusing at the beginning, took me a long
            time to figure out how to set it up first time I installed it.. now I
            can install and set up Tomcat in no time...:)

            so does it make sense for me to run PHP with IIS? (what is ISAPI?) or
            should I download Apache Server anyway and run it with that instead?
            Apache the way you describe sounds complicated, mabye IIS is a better
            option for me? I already have MySQL installed, so WAMP doesn't make
            much sense for me does it?

            don't mean to sound ungrateful, but am afraid yr responses confused me
            even more....:) still, thank you for your help, I do appreciate it...





            Comment

            • Virginner

              #7
              Re: new to PHP -- basic questions...

              Hi Frances

              One EASY solution



              Single program that will install EVERYTHING you need to get going

              Apache 2.2.2
              MySQL 5.0.21
              PHP 5.1.4
              phpMyAdmin 2.8.1
              XAMPP Control Panel Version 2.3
              FileZilla FTP Server 0.9.16c

              Download the XAMPP "Installer" version, and it'll install and configure the
              Web Server (Apache - 2000% better than IIS), PHP, MySQL etc.

              Unbeatable!

              D.


              Comment

              • Frances

                #8
                Re: new to PHP -- basic questions...

                thank you.. I appreciate your help.. I already have MySQL installed,
                however... so can I 'bypass' installation of MySQL? (I have read
                install.txt (that comes w/download) more thoroughly since I last
                posted.. still find instructions to install manually quite confusing
                (also it doesn't help that this file contains instructions for both PHP4
                and PHP5..) also I tried opening php-win.exe but it won't open..)

                thanks again..
                Frances


                Virginner wrote:[color=blue]
                > Hi Frances
                >
                > One EASY solution
                >
                > http://www.apachefriends.org/en/xampp-windows.html
                >
                > Single program that will install EVERYTHING you need to get going
                >
                > Apache 2.2.2
                > MySQL 5.0.21
                > PHP 5.1.4
                > phpMyAdmin 2.8.1
                > XAMPP Control Panel Version 2.3
                > FileZilla FTP Server 0.9.16c
                >
                > Download the XAMPP "Installer" version, and it'll install and configure the
                > Web Server (Apache - 2000% better than IIS), PHP, MySQL etc.
                >
                > Unbeatable!
                >
                > D.
                >
                >[/color]

                Comment

                • Frances

                  #9
                  Re: new to PHP -- basic questions...

                  disregard.. I have MySQL 4.1.. might as well install 5.0.. will
                  certainly try what you suggest.. again many thanks..


                  Frances wrote:[color=blue]
                  > thank you.. I appreciate your help.. I already have MySQL installed,
                  > however... so can I 'bypass' installation of MySQL? (I have read
                  > install.txt (that comes w/download) more thoroughly since I last
                  > posted.. still find instructions to install manually quite confusing
                  > (also it doesn't help that this file contains instructions for both PHP4
                  > and PHP5..) also I tried opening php-win.exe but it won't open..)
                  >
                  > thanks again..
                  > Frances
                  >
                  >
                  > Virginner wrote:
                  >[color=green]
                  >> Hi Frances
                  >>
                  >> One EASY solution
                  >>
                  >> http://www.apachefriends.org/en/xampp-windows.html
                  >>
                  >> Single program that will install EVERYTHING you need to get going
                  >>
                  >> Apache 2.2.2
                  >> MySQL 5.0.21
                  >> PHP 5.1.4
                  >> phpMyAdmin 2.8.1
                  >> XAMPP Control Panel Version 2.3
                  >> FileZilla FTP Server 0.9.16c
                  >>
                  >> Download the XAMPP "Installer" version, and it'll install and
                  >> configure the
                  >> Web Server (Apache - 2000% better than IIS), PHP, MySQL etc.
                  >>
                  >> Unbeatable!
                  >>
                  >> D.
                  >>
                  >>[/color][/color]

                  Comment

                  • Frances

                    #10
                    just installed XAMPP -- have one question...

                    Virginner, I just installed XAMPP.. after installation was complete got
                    prompte whether I wanted to install Apache "as a service" -- wasn't sure
                    what to do, said yes, but got error: "Apache SSL Port 443 is blcoked --
                    install of Apache Service failed" what does it mean exactly to install
                    something "as a service" don't remember being asked that w/Tomcat.. I
                    said "no" on FTP service, b/c already have an FTP client, then realized
                    it wanted to install FTP **server** as a service, so can I do this after
                    everything is installed.. again, need to know exactly what it means to
                    install "as a service" is this normal installation, if so why do you get
                    asked... thanks again..

                    Frances


                    Virginner wrote:[color=blue]
                    > Hi Frances
                    >
                    > One EASY solution
                    >
                    > http://www.apachefriends.org/en/xampp-windows.html
                    >
                    > Single program that will install EVERYTHING you need to get going
                    >
                    > Apache 2.2.2
                    > MySQL 5.0.21
                    > PHP 5.1.4
                    > phpMyAdmin 2.8.1
                    > XAMPP Control Panel Version 2.3
                    > FileZilla FTP Server 0.9.16c
                    >
                    > Download the XAMPP "Installer" version, and it'll install and configure the
                    > Web Server (Apache - 2000% better than IIS), PHP, MySQL etc.
                    >
                    > Unbeatable!
                    >
                    > D.
                    >
                    >[/color]

                    Comment

                    • R. Rajesh Jeba Anbiah

                      #11
                      Re: just installed XAMPP -- have one question...

                      Frances wrote:[color=blue]
                      > Virginner, I just installed XAMPP.. after installation was complete got
                      > prompte whether I wanted to install Apache "as a service" -- wasn't sure
                      > what to do, said yes, but got error: "Apache SSL Port 443 is blcoked --
                      > install of Apache Service failed" what does it mean exactly to install
                      > something "as a service" don't remember being asked that w/Tomcat.. I
                      > said "no" on FTP service, b/c already have an FTP client, then realized
                      > it wanted to install FTP **server** as a service, so can I do this after
                      > everything is installed.. again, need to know exactly what it means to
                      > install "as a service" is this normal installation, if so why do you get
                      > asked... thanks again..[/color]

                      Services are demons <http://www.answers.com/demon> so that you
                      don't have to run the program manually; they will start running once
                      you boot your system. Can be controlled with services control panel.
                      Services are available only in NT machines and hence XP.

                      You cannot run two servers in the same port (443) unless you
                      explicitely change the port in configuration.

                      FWIW, <news:111099444 1.546648.198450 @l41g2000cwc.go oglegroups.com>
                      (http://groups.google.com/group/comp....77ae082bba11b3 )

                      --
                      <?php echo 'Just another PHP saint'; ?>
                      Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                      Comment

                      • Frances

                        #12
                        Re: just installed XAMPP -- have one question...

                        R. Rajesh Jeba Anbiah wrote:[color=blue]
                        > Frances wrote:
                        >[color=green]
                        >>Virginner, I just installed XAMPP.. after installation was complete got
                        >>prompte whether I wanted to install Apache "as a service" -- wasn't sure
                        >>what to do, said yes, but got error: "Apache SSL Port 443 is blcoked --
                        >>install of Apache Service failed" what does it mean exactly to install
                        >>something "as a service" don't remember being asked that w/Tomcat.. I
                        >>said "no" on FTP service, b/c already have an FTP client, then realized
                        >>it wanted to install FTP **server** as a service, so can I do this after
                        >>everything is installed.. again, need to know exactly what it means to
                        >>install "as a service" is this normal installation, if so why do you get
                        >>asked... thanks again..[/color]
                        >
                        >
                        > Services are demons <http://www.answers.com/demon> so that you
                        > don't have to run the program manually; they will start running once
                        > you boot your system. Can be controlled with services control panel.
                        > Services are available only in NT machines and hence XP.
                        >
                        > You cannot run two servers in the same port (443) unless you
                        > explicitely change the port in configuration.
                        >
                        > FWIW, <news:111099444 1.546648.198450 @l41g2000cwc.go oglegroups.com>
                        > (http://groups.google.com/group/comp....77ae082bba11b3 )
                        >[/color]

                        thank you for your response, Rajesh.. I turned off IIS and now Apache
                        runs fine.. however, am having problems with MySQL.. when am here,
                        http://localhost/xampp/index.php, and click on CD collection demo get
                        this error:

                        Warning: mysql_connect() [function.mysql-connect]:
                        Access denied for user 'root'@'localho st' (using password: NO) in
                        C:\xampp\xampp\ htdocs\xampp\cd s.php on line 64

                        Could not connect to database!
                        Is MySQL running or did you change the password?

                        I have not changed any passwords or any settings for anything, just
                        intalled, did nothing else..

                        now only thing I can think of is when was intalling got alert that said
                        something like "MySQL seems to be installed [or maybe it said 'running']
                        already -- Aborted.." now I have MySQL intalled already at C:\Program
                        Files\MySQL\MyS QL Server 4.1, and I use it with Tomcat (and also connect
                        from stand-alone Java classes); so: can you not have two diff. intances
                        of MySQL servers intalled? is this the problem.. xampp is at
                        c:\xampp.. thank you very much..

                        Frances

                        Comment

                        • Frances

                          #13
                          Re: just installed XAMPP -- have one question...

                          Frances wrote:[color=blue]
                          > R. Rajesh Jeba Anbiah wrote:
                          >[color=green]
                          >> Frances wrote:
                          >>[color=darkred]
                          >>> Virginner, I just installed XAMPP.. after installation was complete got
                          >>> prompte whether I wanted to install Apache "as a service" -- wasn't sure
                          >>> what to do, said yes, but got error: "Apache SSL Port 443 is blcoked --
                          >>> install of Apache Service failed" what does it mean exactly to install
                          >>> something "as a service" don't remember being asked that w/Tomcat.. I
                          >>> said "no" on FTP service, b/c already have an FTP client, then realized
                          >>> it wanted to install FTP **server** as a service, so can I do this after
                          >>> everything is installed.. again, need to know exactly what it means to
                          >>> install "as a service" is this normal installation, if so why do you get
                          >>> asked... thanks again..[/color]
                          >>
                          >>
                          >>
                          >> Services are demons <http://www.answers.com/demon> so that you
                          >> don't have to run the program manually; they will start running once
                          >> you boot your system. Can be controlled with services control panel.
                          >> Services are available only in NT machines and hence XP.
                          >>
                          >> You cannot run two servers in the same port (443) unless you
                          >> explicitely change the port in configuration.
                          >>
                          >> FWIW, <news:111099444 1.546648.198450 @l41g2000cwc.go oglegroups.com>
                          >> (http://groups.google.com/group/comp....77ae082bba11b3 )
                          >>[/color]
                          >
                          > thank you for your response, Rajesh.. I turned off IIS and now Apache
                          > runs fine.. however, am having problems with MySQL.. when am here,
                          > http://localhost/xampp/index.php, and click on CD collection demo get
                          > this error:
                          >
                          > Warning: mysql_connect() [function.mysql-connect]:
                          > Access denied for user 'root'@'localho st' (using password: NO) in
                          > C:\xampp\xampp\ htdocs\xampp\cd s.php on line 64
                          >
                          > Could not connect to database!
                          > Is MySQL running or did you change the password?
                          >
                          > I have not changed any passwords or any settings for anything, just
                          > intalled, did nothing else..
                          >
                          > now only thing I can think of is when was intalling got alert that said
                          > something like "MySQL seems to be installed [or maybe it said 'running']
                          > already -- Aborted.." now I have MySQL intalled already at C:\Program
                          > Files\MySQL\MyS QL Server 4.1, and I use it with Tomcat (and also connect
                          > from stand-alone Java classes); so: can you not have two diff. intances
                          > of MySQL servers intalled? is this the problem.. xampp is at
                          > c:\xampp.. thank you very much..
                          >
                          > Frances[/color]

                          sorry, one more note: when I go to 'status' everything's running ok
                          except MySQL and SMTP service (and indeed I tried sending an e-mail from
                          e-mail form at 'Mercury Mail' and sending of e-mail failed..) this is a
                          bit frustrating.. I really want to get this going.. thanks again..
                          Frances


                          Comment

                          • R. Rajesh Jeba Anbiah

                            #14
                            Re: just installed XAMPP -- have one question...

                            Frances wrote:
                            <snip>[color=blue]
                            > now only thing I can think of is when was intalling got alert that said
                            > something like "MySQL seems to be installed [or maybe it said 'running']
                            > already -- Aborted.." now I have MySQL intalled already at C:\Program
                            > Files\MySQL\MyS QL Server 4.1, and I use it with Tomcat (and also connect
                            > from stand-alone Java classes); so: can you not have two diff. intances
                            > of MySQL servers intalled? is this the problem.. xampp is at
                            > c:\xampp.. thank you very much..[/color]

                            Yes, if the port is already in use, it cannot be get installed.

                            --
                            <?php echo 'Just another PHP saint'; ?>
                            Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                            Comment

                            • R. Rajesh Jeba Anbiah

                              #15
                              Re: just installed XAMPP -- have one question...

                              Frances wrote:
                              <snip>[color=blue]
                              > sorry, one more note: when I go to 'status' everything's running ok
                              > except MySQL and SMTP service (and indeed I tried sending an e-mail from
                              > e-mail form at 'Mercury Mail' and sending of e-mail failed..) this is a
                              > bit frustrating.. I really want to get this going.. thanks again..[/color]

                              You may not need FTP service. You need to start MercuryMail to test
                              the mail; you can do that by starting XAMPP control panel (shortcut is
                              available on the desktop)

                              --
                              <?php echo 'Just another PHP saint'; ?>
                              Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                              Comment

                              Working...