Solved

PEAR Installation Windows Server 2003

Posted on 2006-07-17
10
906 Views
Last Modified: 2008-01-09
Hello all,

I am trying to install PEAR on my Server 2003 machine. All I am going to be using it for is the secure SMTP features in the PEAR Mail package. However I for some reason am felling really retarted about this because I can't even get to the point of installation.

I have PHP 5.1.1 installed and it is working fine. However I am noticing a couple of things not right. like I don't have a PEAR directory (is that suposed to be installed by default?), this then cause an error when I try and run go-pear.bat from the php directory.

So I guess my real problem is: "HOW DO I GET PEAR TO INSTALL????"

I am only frustrated because normally I am really good at this type of thing, but this is just boggling my mind. I have tryed to go the pear.php.net site but I can't find any installation directions that make scense.

Thank you guys, and girls!!!
0
Comment
Question by:chadreeves1
  • 5
  • 3
  • 2
10 Comments
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 17125328
What errors do you get from go-pear.bat?
0
 
LVL 1

Author Comment

by:chadreeves1
ID: 17125950
File: PEAR/go-pear.phar does not exsist (or something to that effect).

I know that when I installed php there wasn't a PEAR directory, so where would I get the files that go in there? I tried looking on the PEAR site but nothing made any scense.
0
 
LVL 9

Expert Comment

by:cristi_2112
ID: 17128732
Maybe you've downloaded the Installer version of PHP 5.1.1 for Windows. I don't think that this version comes with Pear.
Go to http://php.net and download PHP5 - zip version. You will see the go-pear.bat file in the root directory. This uses the pear/go-pear.phar to install Pear.

Good luck
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 9

Accepted Solution

by:
cristi_2112 earned 500 total points
ID: 17128740
Also, you can go to http://pear.php.net/package/PEAR and http://pear.php.net/package/PEAR/download if you want to get only the Pear packages. But I recommend getting the zipped php version.
0
 
LVL 1

Author Comment

by:chadreeves1
ID: 17130974
Thank you cristi_2112,

I think I got PEAR installed, however i'm not sure how to install the mail package... I have never used this before and the documentation on the install process is a little bit scetchy to say the least.
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 17134375
From the command line, type
pear help install
to see the options.  In general, you'll do something like
pear install --alldeps NameOfThePackage
0
 
LVL 1

Author Comment

by:chadreeves1
ID: 17139399
Ok, I got it installed but now it is giving me an error when I load up a test page "Failed to connect to 192.168.25.3:25 [SMTP: Invalid response code received from server (code: -1, response: )]"

here is the code for the test page:

<?php
require_once "Mail.php";

$from = "Chad Reeves <creeves@cappy-sac.com>";
$to = "Chad Reeves <creeves@techskills-sac.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "192.168.25.3";
$username = "administrator";
$password = "training";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
 } else {
  echo("<p>Message successfully sent!</p>");
 }
?>

I am using exchange server 2003 is there something that I need to configure to get it to work with exchange?
0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 17147327
I suspect that's an issue with Exchange Server rather than with PHP.  Post a pointer question to here in http://www.experts-exchange.com/Exchange_Server/ and we'll see if some Exchange experts can help out.
0
 
LVL 1

Author Comment

by:chadreeves1
ID: 17156048
Ok,

I did some debuging in Zend (trial) and I am getting an error that says:

"Failed opening 'Net/SMTP.php' for inclusion (include_path='.;c:\php5\pear') in mail\smtp.php on line 206.

I looked at the smtp.php and it does call the 'Net/smtp.php' on line 206 but the pear files are in 'C:\php\pear' not 'C:\php5\pear'. I have checked all of the php.ini files (in c:\php and c:\windows) and both say include c:\php\pear but I can't figure out where it is getting the c:\php5\pear referance from.

Does anyone know where it may be calling 'c:\php5\pear' from... is there another place that sets the include path?

thank you,
chadreeves1
0
 
LVL 1

Author Comment

by:chadreeves1
ID: 17156058
Also,
I have accepted cristi_2112's comment as the answer because I need to download the PEAR portion of the PHP install from there site again. It didn't come with my origonal download of PHP.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question