PHP 5 and PEAR

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

    #1

    PHP 5 and PEAR

    I've been using PHP for a while now - and have recently been trying
    to set up PHP, MySQL and Apache on Windows (for a client).

    It seems like all the PEAR stuff under PHP 5 doesn't work out of the box.

    It took me a while to track down the go-pear.bat file in the root -
    what with all the other garbage in there.

    Shouldn't this file get at least a mention in:

    install.txt and /PEAR/go-pear.php

    ....?

    The installation instructions in /PEAR/go-pear.php for Windows
    seem rather out of date - and sent me off in totally the wrong
    direction :-(
    --
    __________
    |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
  • Tim Tyler

    #2
    Re: PHP 5 and PEAR

    I, Tim Tyler <tim@tt1lock.or g> wrote or quoted:
    [color=blue]
    > I've been using PHP for a while now - and have recently been trying
    > to set up PHP, MySQL and Apache on Windows (for a client).
    >
    > It seems like all the PEAR stuff under PHP 5 doesn't work out of the box.
    >
    > It took me a while to track down the go-pear.bat file in the root -
    > what with all the other garbage in there.
    >
    > Shouldn't this file get at least a mention in:
    >
    > install.txt and /PEAR/go-pear.php
    >
    > ...?
    >
    > The installation instructions in /PEAR/go-pear.php for Windows
    > seem rather out of date - and sent me off in totally the wrong
    > direction :-([/color]

    After:

    * Installing PHP 5.0.0 and...
    * Running the "go-pear.bat" file;

    php_ini(); now gives:

    include_path .;C:\php5\pear .;C:\php5\pear

    I /swear/ I have never mentioned C:\php5.

    My PHP installation is at the "classical" location: C:\php.

    C:\php5 isn't mentioned in my php.ini file.

    It isn't mentioned in my environmental variables.

    It looks like it /might/ be a hangover from the development days -
    when the programmers probably had multiple versions of PHP installed.

    I can hack around this problem - but would quite like to track down
    the cause - if only to find out who is to blame ;-)

    Does anyone have any idea where this incorrect path might be coming from?
    --
    __________
    |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

    Comment

    • Tim Tyler

      #3
      Re: PHP 5 and PEAR

      Tim Tyler <tim@tt1lock.or g> wrote or quoted:
      [color=blue]
      > After:
      >
      > * Installing PHP 5.0.0 and...
      > * Running the "go-pear.bat" file;
      >
      > php_ini(); now gives:
      >
      > include_path .;C:\php5\pear .;C:\php5\pear
      >
      > I /swear/ I have never mentioned C:\php5.
      >
      > My PHP installation is at the "classical" location: C:\php.
      >
      > C:\php5 isn't mentioned in my php.ini file.
      >
      > It isn't mentioned in my environmental variables.
      >
      > It looks like it /might/ be a hangover from the development days -
      > when the programmers probably had multiple versions of PHP installed.
      >
      > I can hack around this problem - but would quite like to track down
      > the cause - if only to find out who is to blame ;-)
      >
      > Does anyone have any idea where this incorrect path might be coming from?[/color]

      *Probably* from the registry - since executing the:

      PEAR_ENV.reg file and rebooting Apache seems to have rectified the
      situation.

      I thought unix programmers gave the registry a wide berth ;-)

      My next problem is that communication with MySQL (latest version)
      doesn't work.

      PHPMyAdmin comes up with:

      ``Cannot load MySQL extension, please check PHP Configuration'' .

      This happens on PHP 5.0.0 - where the MySQL integration is
      *supposed* to be built in. It happens on the very latest
      version of PHPMyAdmin - as well as with earlier versions.

      Other attemps to access database using other programs also
      produce similar errors - for instance the PEAR that comes
      with PHP 5.0.0 says:

      ``Error during database connection:DB Error: extension not found''

      Does anyone else have PHP 5.0.0 and MySQL talking to each
      other under Windows? - and if so, what's the mystical
      incantation you used to set things up? ;-)
      --
      __________
      |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

      Comment

      • Ian.H

        #4
        Re: PHP 5 and PEAR

        On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:


        [ snip ]

        [color=blue]
        > ``Cannot load MySQL extension, please check PHP Configuration'' .
        >
        > This happens on PHP 5.0.0 - where the MySQL integration is
        > *supposed* to be built in. It happens on the very latest
        > version of PHPMyAdmin - as well as with earlier versions.[/color]


        [ snip ]


        I haven't tried PHP5 yet, but from the ChangeLog:


        Version 5.0.0 Beta 1
        29-Jun-2003

        * Removed the bundled MySQL client library. (Sterling)


        PHP5 seems now to be bundled with SQLite and enabled by default.

        How to get them successfully talking, that I have no idea.. my servers run
        on a competent OS =P



        Regards,

        Ian

        --
        Ian.H
        digiServ Network
        London, UK


        Comment

        • Tim Tyler

          #5
          Re: PHP 5 and PEAR

          Ian.H <ian@windozedig iserv.net> wrote or quoted:[color=blue]
          > On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:[/color]
          [color=blue][color=green]
          > > ``Cannot load MySQL extension, please check PHP Configuration'' .
          > >
          > > This happens on PHP 5.0.0 - where the MySQL integration is
          > > *supposed* to be built in. It happens on the very latest
          > > version of PHPMyAdmin - as well as with earlier versions.[/color]
          >
          > [ snip ]
          >
          > I haven't tried PHP5 yet, but from the ChangeLog:
          >
          > Version 5.0.0 Beta 1
          > 29-Jun-2003
          >
          > * Removed the bundled MySQL client library. (Sterling)
          >
          > PHP5 seems now to be bundled with SQLite and enabled by default.
          >
          > How to get them successfully talking, that I have no idea.. my servers run
          > on a competent OS =P[/color]



          ....seems to have the answers I seek. I'll see if it works.

          Assuming SQLite is not GPL'd then I'll probably ditch MySQL completely -
          and switch to using SQLite.

          I /usually/ run PHP under Linux - but unfortunately, some of my clients
          are now likely to be wanting to run it under Windows :-|
          --
          __________
          |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

          Comment

          • Tim Tyler

            #6
            Re: PHP 5 and PEAR

            Tim Tyler <tim@tt1lock.or g> wrote or quoted:[color=blue]
            > Ian.H <ian@windozedig iserv.net> wrote or quoted:[color=green]
            > > On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:[/color]
            >[color=green][color=darkred]
            > > > ``Cannot load MySQL extension, please check PHP Configuration'' .
            > > >
            > > > This happens on PHP 5.0.0 - where the MySQL integration is
            > > > *supposed* to be built in. It happens on the very latest
            > > > version of PHPMyAdmin - as well as with earlier versions.[/color]
            > >
            > > [ snip ]
            > >
            > > I haven't tried PHP5 yet, but from the ChangeLog:
            > >
            > > Version 5.0.0 Beta 1
            > > 29-Jun-2003
            > >
            > > * Removed the bundled MySQL client library. (Sterling)
            > >
            > > PHP5 seems now to be bundled with SQLite and enabled by default. [...][/color]
            >
            > http://www.php.net/manual/en/faq.dat...ses.mysql.php5
            >
            > ...seems to have the answers I seek. I'll see if it works.[/color]

            I changed php.ini as follows:

            extension_dir = "./"

            ....to...

            extension_dir = "C:/php/ext/"

            ....and...

            ;extension=php_ mysql.dll

            ....to...

            extension=php_m ysql.dll

            ....and I copied every single DLL file from C:\php to C:\WINNT.

            ....and it now /seems/ to be working OK ;-)
            --
            __________
            |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

            Comment

            • Gary L. Burnore

              #7
              Re: PHP 5 and PEAR

              On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <tim@tt1lock.or g> wrote:
              [color=blue]
              >Does anyone else have PHP 5.0.0 and MySQL talking to each
              >other under Windows?[/color]

              There are so many more logical ways to run Apache/PHP/Mysql. Why on
              earth stick something as insecure as Windows in the mix?

              Seriously, check out Solaris for Intel if you need a big company
              behind you (aka no linux).



              --
              gburnore@databa six dot com
              ---------------------------------------------------------------------------
              How you look depends on where you go.
              ---------------------------------------------------------------------------
              Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              | ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
              Black Helicopter Repair Svcs Division | Official Proof of Purchase
              =============== =============== =============== =============== ===============
              Want one? GET one! http://signup.databasix.com
              =============== =============== =============== =============== ===============

              Comment

              • Andy Hassall

                #8
                Re: PHP 5 and PEAR

                On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <tim@tt1lock.or g> wrote:
                [color=blue]
                >...and I copied every single DLL file from C:\php to C:\WINNT.[/color]

                You were doing good up to this point - if you can find what you copied, get
                rid of them.

                The right way to get a set of DLLs to be loadable by a process is to add the
                directory to the PATH environment variable. If you start copying stuff into the
                Windows system directories you end up in DLL Hell pretty easily.

                --
                Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
                http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

                Comment

                • Berislav Lopac

                  #9
                  PHP 5 extensions (URGENT)

                  Andy Hassall wrote:[color=blue]
                  >
                  > The right way to get a set of DLLs to be loadable by a process is to
                  > add the directory to the PATH environment variable. If you start
                  > copying stuff into the Windows system directories you end up in DLL
                  > Hell pretty easily.[/color]

                  I have a somewhat different problem: after setting everything right (the
                  DLLs are in the right location, the PATH variable is set correctly etc) I
                  have managed to change the "The specified module could
                  not be found" error into "The operating system cannot run %1". The issue
                  appears when I try to load the php_ldap.dll extension, and depends whether
                  the ssleay32.dll is present in the PATH ('cannot run' error) or not ('could
                  not be found' error, which makes sense).

                  Can that be fixed somehow, or is it a PHP5 bug? I beg for answers, since
                  this is a rather rgent matter for me.

                  Thanks,

                  Berislav


                  Comment

                  • Tim Tyler

                    #10
                    Re: PHP 5 and PEAR

                    Gary L. Burnore <gburnore@datab asix.com> wrote or quoted:[color=blue]
                    > On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <tim@tt1lock.or g> wrote:[/color]
                    [color=blue][color=green]
                    > >Does anyone else have PHP 5.0.0 and MySQL talking to each
                    > >other under Windows?[/color]
                    >
                    > There are so many more logical ways to run Apache/PHP/Mysql. Why on
                    > earth stick something as insecure as Windows in the mix?[/color]

                    Because that's what one of my clients wants to use.

                    Basically they are a Windoze shop, already have a windows box - and don't
                    think they'll be able to swing putting anything else on the box with the
                    rest of the IT department.

                    Getting them to use PHP in the first place is quite good enough for me.

                    Much of their existing server-side material and experience is with ASP -
                    and I don't want to make the decision to use PHP any harder for them by
                    telling them they need to install an OS they have little experience of.

                    Security isn't much of an issue. Their system is facing an existing
                    intranet, and it isn't ever likely to be made publicly accessible.

                    What it seems they mostly want is not security and stability -
                    but the ability to put together something that works rapidly.

                    They can always upgrade their server to a proper piece of equipment
                    at a later date - if they decide they need to do so.
                    --
                    __________
                    |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                    Comment

                    • Tim Tyler

                      #11
                      Re: PHP 5 and PEAR

                      Andy Hassall <andy@andyh.co. uk> wrote or quoted:[color=blue]
                      > On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <tim@tt1lock.or g> wrote:[/color]
                      [color=blue][color=green]
                      > >...and I copied every single DLL file from C:\php to C:\WINNT.[/color]
                      >
                      > You were doing good up to this point - if you can find what you copied, get
                      > rid of them.[/color]

                      At this stage, that sounds like a pointless, risky exercise to me ;-)
                      [color=blue]
                      > The right way to get a set of DLLs to be loadable by a process is to
                      > add the directory to the PATH environment variable. If you start
                      > copying stuff into the Windows system directories you end up in DLL
                      > Hell pretty easily.[/color]

                      I don't terribly much care whether my path variable or my Windows system
                      directory is what gets more clogged up - but I *would* prefer it if the
                      program worked *without* forcing me to clog up one or another part of my
                      system.
                      --
                      __________
                      |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                      Comment

                      • Chung Leong

                        #12
                        Re: PHP 5 and PEAR


                        "Tim Tyler" <tim@tt1lock.or g> wrote in message news:I1Iy7w.JuG @bath.ac.uk...[color=blue]
                        > I've been using PHP for a while now - and have recently been trying
                        > to set up PHP, MySQL and Apache on Windows (for a client).
                        >
                        > It seems like all the PEAR stuff under PHP 5 doesn't work out of the box.[/color]

                        PHP5 doesn't work out of the box...duh!

                        I will wait for PHP 5.2 :-)


                        --
                        Obey the Clown - http://www.conradish.net/bobo/


                        Comment

                        • Michael Fudge

                          #13
                          Re: PHP 5 and PEAR

                          Tim Tyler wrote:
                          [color=blue]
                          > Security isn't much of an issue. Their system is facing an existing
                          > intranet, and it isn't ever likely to be made publicly accessible.
                          >
                          > What it seems they mostly want is not security and stability -
                          > but the ability to put together something that works rapidly.
                          >
                          > They can always upgrade their server to a proper piece of equipment
                          > at a later date - if they decide they need to do so.
                          >[/color]

                          Try persuading them to network another Windows Box with BigApache which
                          has all you'll need in one installable package.

                          TTFN

                          Michael

                          --
                          ..\.\-i-k-e... (remove thebacon to reply)
                          feoh: by? frofur, fira gehwylcum, sceal ?eah manna gehwylc,
                          miclun hyt dalan, gif he wile, for drihtne domes hleotan.
                          wic: farmstead

                          Comment

                          • Tim Tyler

                            #14
                            Re: PHP 5 and PEAR

                            Michael Fudge <mikef@wintheba conrem.demon.co .uk> wrote or quoted:
                            [color=blue]
                            > Try persuading them to network another Windows Box with BigApache which
                            > has all you'll need in one installable package.[/color]

                            After reading your post, I looked briefly at BigApache.

                            My experience with installing Apache/PHP/MySQL *did* powerfully
                            suggest the need for a "proper" install bundle - rather than
                            the chaotic mess of manually editing obscure corners of ".ini"
                            files and manually copying DLLs into the Windows system folder
                            that I went through with the standard installation instructions.
                            --
                            __________
                            |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

                            Comment

                            Working...