PHP 5 and PEAR

This is a discussion on PHP 5 and PEAR within the PHP Language forums, part of the PHP Programming Forums category; I've been using PHP for a while now - and have recently been trying to set up PHP, MySQL and ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default 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.
Reply With Quote
  #2 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

I, Tim Tyler <tim@tt1lock.org> wrote or quoted:

> 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 :-(


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.
Reply With Quote
  #3 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

Tim Tyler <tim@tt1lock.org> wrote or quoted:

> 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?


*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.
Reply With Quote
  #4 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

Ian.H <ian@windozedigiserv.net> wrote or quoted:
> On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:


> > ``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.

>
> [ 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


http://www.php.net/manual/en/faq.dat...ses.mysql.php5

....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.
Reply With Quote
  #5 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

Tim Tyler <tim@tt1lock.org> wrote or quoted:
> Ian.H <ian@windozedigiserv.net> wrote or quoted:
> > On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:

>
> > > ``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.

> >
> > [ 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. [...]

>
> http://www.php.net/manual/en/faq.dat...ses.mysql.php5
>
> ...seems to have the answers I seek. I'll see if it works.


I changed php.ini as follows:

extension_dir = "./"

....to...

extension_dir = "C:/php/ext/"

....and...

;extension=php_mysql.dll

....to...

extension=php_mysql.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.
Reply With Quote
  #6 (permalink)  
Old 07-27-2004
Gary L. Burnore
 
Posts: n/a
Default Re: PHP 5 and PEAR

On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <tim@tt1lock.org> wrote:

>Does anyone else have PHP 5.0.0 and MySQL talking to each
>other under Windows?


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@databasix 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
================================================== =========================
Reply With Quote
  #7 (permalink)  
Old 07-27-2004
Andy Hassall
 
Posts: n/a
Default Re: PHP 5 and PEAR

On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <tim@tt1lock.org> wrote:

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


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
Reply With Quote
  #8 (permalink)  
Old 07-27-2004
Berislav Lopac
 
Posts: n/a
Default PHP 5 extensions (URGENT)

Andy Hassall wrote:
>
> 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.


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


Reply With Quote
  #9 (permalink)  
Old 07-27-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

Gary L. Burnore <gburnore@databasix.com> wrote or quoted:
> On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <tim@tt1lock.org> wrote:


> >Does anyone else have PHP 5.0.0 and MySQL talking to each
> >other under Windows?

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


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.
Reply With Quote
  #10 (permalink)  
Old 07-28-2004
Tim Tyler
 
Posts: n/a
Default Re: PHP 5 and PEAR

Andy Hassall <andy@andyh.co.uk> wrote or quoted:
> On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <tim@tt1lock.org> wrote:


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

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


At this stage, that sounds like a pointless, risky exercise to me ;-)

> 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.


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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0