Solved

PEAR Installation Windows Server 2003

Posted on 2006-07-17
10
901 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mail Not Sent 6 42
PHP code to retrieve NDFD weather forecasts. 6 36
wordpress issue 2 21
Insert data into database 2 15
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…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

757 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

23 Experts available now in Live!

Get 1:1 Help Now