473,382 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #1
13 3000
I, Tim Tyler <ti*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #2
Tim Tyler <ti*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #3
On Tue, 27 Jul 2004 19:37:55 +0000, Tim Tyler wrote:
[ snip ]

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

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #4
Ian.H <ia*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #5
Tim Tyler <ti*@tt1lock.org> wrote or quoted:
Ian.H <ia*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #6
On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <ti*@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
================================================== =========================
Jul 17 '05 #7
On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <ti*@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 <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #8
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
Jul 17 '05 #9
Gary L. Burnore <gb******@databasix.com> wrote or quoted:
On Tue, 27 Jul 2004 19:37:55 GMT, Tim Tyler <ti*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #10
Andy Hassall <an**@andyh.co.uk> wrote or quoted:
On Tue, 27 Jul 2004 20:36:42 GMT, Tim Tyler <ti*@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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #11

"Tim Tyler" <ti*@tt1lock.org> wrote in message news:I1********@bath.ac.uk...
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.


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

I will wait for PHP 5.2 :-)
--
Obey the Clown - http://www.conradish.net/bobo/
Jul 17 '05 #12
Tim Tyler wrote:
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.


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
Jul 17 '05 #13
Michael Fudge <mi***@winthebaconrem.demon.co.uk> wrote or quoted:
Try persuading them to network another Windows Box with BigApache which
has all you'll need in one installable package.


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/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sandro Dentella | last post by:
I need to use a class to handle mbox files that uses PEAR. Since I'm using Debian (both woody and, I simply apt-get(ed) php4-pear but I can't use it becouse I get the error: Warning: dl():...
3
by: junkmail | last post by:
on a win 2k server apparantly it is saying i dont have it. or it cant find it. im using mySQL 4.1 php 4.3.x apache 3.0.53 im new to php and am doing some tutorials, but when i run the sripts...
1
by: DJ Majestik | last post by:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to setup my directory structure correctly. If someone could weigh in and see if I have this setup "right", I would appreciate it....
3
by: David | last post by:
I installed the Pear program and set the include path in php.ini to point to the pear dir. I have a program which <? require_once("DB.php"); ?> This produces the error "Class 'PEAR_Error'...
2
by: Alan Prescott | last post by:
I'm running SuSE Linux 9.3, fully up to date running # pear install db responds with ... downloading DB-1.7.6.tgz ... Starting to download DB-1.7.6.tgz (124,807 bytes)...
5
by: Jim Michaels | last post by:
I downloaded a PEAR module, but it came with this XML file and a PHP file. I figure I just include the PHP file somehow, but what do I do with the XML file?
0
by: bwhitehd | last post by:
I'm having a problem installing php. The compile seems to go fine, but when it gets to the install step I get the following errors. Does anyone have an idea of what might be the problem? We...
1
by: IchBin | last post by:
I am new to PHP and I am running on Windoze XP SP 2. Just noticed that the PEAR installed dir structure I have (to DB subdir) is : C:\php5.2\PEAR\pear\DB My registry vars are:...
1
by: CSTechie | last post by:
I've been battling to install PEAR on Windows XP now for too long. I am not sure what I need to do. When I run go-pear.php from the command line, I get the error message as shown at the end. I...
1
by: IchBin | last post by:
I remember having problems with pear when I first installed it but got it running some time ago. This is on a windoze XP SP OS. I did not think it was correct because it pointed to...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.