Solved

PEAR Installation Windows Server 2003

Posted on 2006-07-17
10
903 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now