PEAR 1.3.6 installation problem with PHP4.4.4
| From: | Joseph OShea | Date: | Sat, 24 Nov 2007 17:08:28 +0000 |
| Subject: | PEAR 1.3.6 installation problem with PHP4.4.4 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28215@lists.php.net to get a copy of this message | ||
I received a reply from Gregory Beaver with some instructions for manual installation steps.
I could not get the install to work properly.
Attached to this email is a text file with the output from the suggested actions.
The file was scanned using McAfee Antivirus.
Thanks again,
Joseph O'Shea
CPA Student
Cortec DNA Service Laboratories, Inc.
Kingston, ON Canada
Email: joshea@sympatico.ca
Contents of my PATH enviroment variable ============================================= C:\PHP>echo %path% C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Intel\DMIX;C:\Program Files \Java\jdk1.5.0_02\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\ATI Technologies\ ATI Control Panel;C:\PHP;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files\Micr osoft SQL Server\90\Tools\binn\;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 Output from the 'php -cli -v' command ============================================= C:\PHP>php -cli -v PHP 4.4.4 (cgi-fcgi) (built: Aug 16 2006 01:17:43) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies Output from the 'php v' command ============================================= C:\PHP>php v Status: 404 X-Powered-By: PHP/4.4.4 Set-Cookie: PHPSESSID=852fb85f7ec03fab10176b5c629045d7; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-type: text/html No input file specified. go-pear.bat output ============================================ C:\PHP>go-pear.bat Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Use 'php PEAR\go-pear.php local' to install a local copy of PEAR. Go-pear also lets you download and install the PEAR packages bundled with PHP: MDB2, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. If you wish to abort, press Control-C now, or press Enter to continue: HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation prefix : C:\PHP 2. Binaries directory : $prefix 3. PHP code directory ($php_dir) : $prefix\pear 4. Documentation base directory : $php_dir\docs 5. Data base directory : $php_dir\data 6. Tests base directory : $php_dir\tests 7. Temporary files directory : $prefix\temp 8. php.exe path : C:\PHP\cli\php.exe 1-8, 'all' or Enter to continue: The following PEAR packages are bundled with PHP: MDB2, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. Would you like to install these as well? [Y/n] : y Loading zlib: ok Using local package: PEAR-stable......ok Using local package: Archive_Tar-stable....ok Using local package: Console_Getopt-stable....ok Using local package: XML_RPC-stable....ok Bootstrapping: PEAR...................(remote) ok Bootstrapping: Archive_Tar............(local) ok Bootstrapping: Console_Getopt.........(remote) ok Downloading package: MDB2.............ok Downloading package: Net_Socket.......ok Downloading package: Net_SMTP.........ok Downloading package: Mail.............ok Downloading package: XML_Parser.......ok Downloading package: PHPUnit..........ok Extracting installer..................ok warning: pear/PEAR requires package "pear/Archive_Tar" (version >= 1.3.1) warning: pear/PEAR requires package "pear/Console_Getopt" (version >= 1.2) warning: pear/PEAR requires package "pear/Structures_Graph" (version >= 1.0.2) pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0) pear/PEAR can optionally use package "pear/PEAR_Frontend_Web" (version >= 0.5.0) pear/PEAR can optionally use package "pear/PEAR_Frontend_Gtk" (version >= 0.4.0) Press any key to continue . . . Note: did not know what to use for HTTP proxy value, so I went with "Enter for none". Error output running php -dallow_url_include=1 -r "include 'http://pear.php.net/go-pear';" ========================================================================================== C:\PHP>php -dallow_url_include=1 -r "include 'http://pear.php.net/go-pear';" Error in argument 2, char 2: option not found r Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>] php <file> [args...] -a Run interactively -C Do not chdir to the script's directory -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>. Note: I get the same error with no blank between -r and "include..." as well. Output from a sample PHP/Pear script attempting to use the Mail object (after running go-pear.bat and adding path to PHP.INI file) ======================================================================================================================== PHP Fatal error: Undefined class name 'mail' in C:\Inetpub\wwwroot\Trillium\e-test.php on line 10 Source Code for sample PHP/Pear script ====================================== <?php $from = "Joseph OShea <joshea@sympatico.ca>"; $to = "Joseph OShea <joshea@sympatico.ca>"; $subject = "Hello from PHP 11/23/2007"; $body = "Test message using PHP PEAR extention.\n\nFriday November 23, 2007."; $username = "myusername"; $password = "mypassword"; $host = "myhostprovider"; $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 sent successfully!</p>"); ?> Note: all authentication values were changed for display; I can use the authentication features in the C# .Net mail package with no problem. PEAR.INI file created by the installer ================================================ #PEAR_Config 0.9 a:10:{s:15:"preferred_state";s:6:"stable";s:7:"bin_dir";s:6:"C:\PHP";s:7:"php_dir";s:11:"C:\PHP\pear";s:7:"doc_dir";s:16:"C:\PHP\pear\docs";s:8:"data_dir";s:16:"C:\PHP\pear\data";s:8:"test_dir";s:17:"C:\PHP\pear\tests";s:8:"temp_dir";s:11:"C:\PHP\temp";s:7:"php_bin";s:18:"C:\PHP\cli\php.exe";s:12:"download_dir";s:20:"C:\PHP\temp/download";s:10:"__channels";a:2:{s:5:"__uri";a:0:{}s:12:"pecl.php.net";a:0:{}}}
Contents of my PATH enviroment variable ============================================= C:\PHP>echo %path% C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Intel\DMIX;C:\Program Files \Java\jdk1.5.0_02\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\ATI Technologies\ ATI Control Panel;C:\PHP;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files\Micr osoft SQL Server\90\Tools\binn\;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 Output from the 'php -cli -v' command ============================================= C:\PHP>php -cli -v PHP 4.4.4 (cgi-fcgi) (built: Aug 16 2006 01:17:43) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies Output from the 'php v' command ============================================= C:\PHP>php v Status: 404 X-Powered-By: PHP/4.4.4 Set-Cookie: PHPSESSID=852fb85f7ec03fab10176b5c629045d7; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-type: text/html No input file specified. go-pear.bat output ============================================ C:\PHP>go-pear.bat Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Use 'php PEAR\go-pear.php local' to install a local copy of PEAR. Go-pear also lets you download and install the PEAR packages bundled with PHP: MDB2, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. If you wish to abort, press Control-C now, or press Enter to continue: HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation prefix : C:\PHP 2. Binaries directory : $prefix 3. PHP code directory ($php_dir) : $prefix\pear 4. Documentation base directory : $php_dir\docs 5. Data base directory : $php_dir\data 6. Tests base directory : $php_dir\tests 7. Temporary files directory : $prefix\temp 8. php.exe path : C:\PHP\cli\php.exe 1-8, 'all' or Enter to continue: The following PEAR packages are bundled with PHP: MDB2, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. Would you like to install these as well? [Y/n] : y Loading zlib: ok Using local package: PEAR-stable......ok Using local package: Archive_Tar-stable....ok Using local package: Console_Getopt-stable....ok Using local package: XML_RPC-stable....ok Bootstrapping: PEAR...................(remote) ok Bootstrapping: Archive_Tar............(local) ok Bootstrapping: Console_Getopt.........(remote) ok Downloading package: MDB2.............ok Downloading package: Net_Socket.......ok Downloading package: Net_SMTP.........ok Downloading package: Mail.............ok Downloading package: XML_Parser.......ok Downloading package: PHPUnit..........ok Extracting installer..................ok warning: pear/PEAR requires package "pear/Archive_Tar" (version >= 1.3.1) warning: pear/PEAR requires package "pear/Console_Getopt" (version >= 1.2) warning: pear/PEAR requires package "pear/Structures_Graph" (version >= 1.0.2) pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0) pear/PEAR can optionally use package "pear/PEAR_Frontend_Web" (version >= 0.5.0) pear/PEAR can optionally use package "pear/PEAR_Frontend_Gtk" (version >= 0.4.0) Press any key to continue . . . Note: did not know what to use for HTTP proxy value, so I went with "Enter for none". Error output running php -dallow_url_include=1 -r "include 'http://pear.php.net/go-pear';" ========================================================================================== C:\PHP>php -dallow_url_include=1 -r "include 'http://pear.php.net/go-pear';" Error in argument 2, char 2: option not found r Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>] php <file> [args...] -a Run interactively -C Do not chdir to the script's directory -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>. Note: I get the same error with no blank between -r and "include..." as well. Output from a sample PHP/Pear script attempting to use the Mail object (after running go-pear.bat and adding path to PHP.INI file) ======================================================================================================================== PHP Fatal error: Undefined class name 'mail' in C:\Inetpub\wwwroot\Trillium\e-test.php on line 10 Source Code for sample PHP/Pear script ====================================== <?php $from = "Joseph OShea <joshea@sympatico.ca>"; $to = "Joseph OShea <joshea@sympatico.ca>"; $subject = "Hello from PHP 11/23/2007"; $body = "Test message using PHP PEAR extention.\n\nFriday November 23, 2007."; $username = "myusername"; $password = "mypassword"; $host = "myhostprovider"; $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 sent successfully!</p>"); ?> Note: all authentication values were changed for display; I can use the authentication features in the C# .Net mail package with no problem. PEAR.INI file created by the installer ================================================ #PEAR_Config 0.9 a:10:{s:15:"preferred_state";s:6:"stable";s:7:"bin_dir";s:6:"C:\PHP";s:7:"php_dir";s:11:"C:\PHP\pear";s:7:"doc_dir";s:16:"C:\PHP\pear\docs";s:8:"data_dir";s:16:"C:\PHP\pear\data";s:8:"test_dir";s:17:"C:\PHP\pear\tests";s:8:"temp_dir";s:11:"C:\PHP\temp";s:7:"php_bin";s:18:"C:\PHP\cli\php.exe";s:12:"download_dir";s:20:"C:\PHP\temp/download";s:10:"__channels";a:2:{s:5:"__uri";a:0:{}s:12:"pecl.php.net";a:0:{}}}