Link to home
Start Free TrialLog in
Avatar of chadreeves1
chadreeves1

asked on

PEAR Installation Windows Server 2003

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!!!
Avatar of snoyes_jw
snoyes_jw
Flag of United States of America image

What errors do you get from go-pear.bat?
Avatar of chadreeves1
chadreeves1

ASKER

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.
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
ASKER CERTIFIED SOLUTION
Avatar of cristi_2112
cristi_2112
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
From the command line, type
pear help install
to see the options.  In general, you'll do something like
pear install --alldeps NameOfThePackage
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?
I suspect that's an issue with Exchange Server rather than with PHP.  Post a pointer question to here in https://www.experts-exchange.com/Exchange_Server/ and we'll see if some Exchange experts can help out.
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
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.