PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

[FIXED] Why won't PEAR work on my PHP Windows installation?

 August 31, 2022     cmd, cygwin, pear, php, windows-7     No comments   

Issue

I'm running Wampserver on Windows 7, and I can't seem to get PEAR to work. Well, that's not entirely true-apparently it works on the command line (both cmd.exe and on Cygwin). Here's the sample program I found on PHP.Net that shows you if PEAR is installed:

<?PHP

require_once 'System.php';
var_dump(class_exists('System', false));

?>

On the command line, it returns "bool(true)", and in the browser I get

Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\foobar.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.;C:\php\pear') in C:\wamp\www\foobar.php on line 3

I'm honestly not sure what I'm doing wrong. It seems like both should work, but I'm stumped.

Thanks.


Solution

Based on your comments, it looks like your include_path is wrong. Go change your PHP.ini and set your include path to:

include_path = ".;C:\wamp\bin\php\php5.3.10\pear"


Answered By - Brad
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing