佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1008|回复: 4

how to install PEAR? [issue resolved, thanks]

[复制链接]
发表于 14-1-2007 01:21 PM | 显示全部楼层 |阅读模式
Hi All Cari Programmer Forum User;


anyone knows how to install PEAR on PHP using WAMP package?

I tried to use all te default directory when opening cmd and type : go_pear.bat on php directory after WAMP is installed.

Then it's asking me everything which i inserted:

installation base [default]
Binary directory  [default]
Documentatioin dir[default]
etc               [default]

But then when i run a test code on it, it's saying:
require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\testpear.php on line 3

And my test code sample [below]:
<?php
require_once 'DB.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
$db_name = 'news';
$dsn = "mysql://$db_userdb_pass@unix+$db_host/$db_name";
$db = DB::connect($dsn);
$db->setFetchMode(DB_FETCHMODE_OBJECT);
?>

Anyone experienced that could helped me?  I am stuck?

Because I am a new PHP user.  Urgently need some help.

Thanks
Calverstine.

[ 本帖最后由 Kal1983 于 14-1-2007 04:22 PM 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 14-1-2007 01:29 PM | 显示全部楼层
include_path=".;C:\PHP\pear;c:\php\includes"
回复

使用道具 举报

 楼主| 发表于 14-1-2007 02:43 PM | 显示全部楼层
It's still the same.  

I heard that WAMP 5 is auto installed with PEAR,
but how do we ensure PEAR is installed? I have already uncomment the include_path in php.ini.  

Also add up here, anybody knows how to install PEAR package at Windows Environment??

Thanks for the reply.
回复

使用道具 举报

发表于 14-1-2007 03:10 PM | 显示全部楼层
只需要执行go-pear.bat,然后php.ini里面的include_path在弄一弄就可以了。
pear的cmd 则是在c:\PHP\PEAR\pearcmd.php
用 c:php\pear\> ..\php.exe pearcmd.php来执行就可以了。
回复

使用道具 举报

 楼主| 发表于 14-1-2007 04:21 PM | 显示全部楼层
Hi all,

Thanks alot for thelp of Ku Gua Tang {苦瓜汤} !!!! Thank you, however my go-pear.bat failed on both [system/local] instllation..so I found this way.
---------------------------------------------------------------------------------------------

Ok, after minutes of struggle I found a way and would like to share with cari forum user.

MY OS ENVIRONMENT general info
Windows XP SP2
installed PHP package: wamp 5
running PHP 5.2.0
apache 2.0.bra bra
MYSQL 5, and
SQLlite.

{Who is interested to learn PHP 5 or use PHP with mysql can stop thinking how to installed the package by visiting this site, that consists a bundled package called WAMP server/ onlinux is LAMP server, www.wampserver.com/en/download.php}

Instruction to install PEAR on my laptop:

1.Enable all permission for everyone in PHP directory {php_dir}

2.Right click properties look for everyone / add type everyone press apply + ok. grant full control to the{php_dir}

3. PHP version 5 or up wards is using php.exe as cli which is a front end includes for PEAR.

4.So open up your command prompt, and type php -r readfile("http://pear.php.net/go-pear" > go-pear.  [ask php-cli to write all content in the appointed address to go-pear file.

5.Wait for a moment, with cup of coffee, then after you see c:\php> or bra, type a new command called php go-pear

6. Then...follow the instruction / use the default installation folder.

7.  In the middle way, if you skipped step 1 and 2, you will receive permission denied for removing directory command in PHP since the go-pear is platform independent and runs upon php command.

8. a screen..ok ..ok ...ok will load up telling user the package it installed. Now, it will ask you to alter php.ini since the ini file is commented..well Press Y to continue and the whole process is completed.

Aligato, 苦瓜汤!!!

*Oya, if you dunno whether PEAR installing on Windows success or not, type PEAR n enter on command prompt, you will see a list of pear enabled parameter indicating u're success in installing.

hope it's useful to new PEAR user.

screen shot:

Cheers,
Calverstine.
[Kal1983]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 22-9-2025 05:34 AM , Processed in 0.112420 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表