| Author |
Re: [PEAR] Re: Basic Install issue - Missing PEAR class?
|
|
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Hi,
Thanks for the tip Greg.
Upon a fresh install the same problem is occurring but affecting the
pear/registry.php file.
It is absolutely path related. I had to change the registry.php file
line 26 to -
require_once 'PEAR/PEAR.php';
When I do that I can run scripts but THEN when I try to use the pear
package manager by command line it doesn't work.
I have to change that line back to
require_once 'PEAR.php';
To get the command line aspects of pear working. Its prety bizaare.
This is a default installation of the latest version using go-pear.php.
I suppose thats good enough if I can get the live server version going
without having to change that line everytime I run something/add more
packages to pear.
Also another basic newby question - I am getting the config info
displaying on every page, where is the flag to turn it off?
Thanks for the help,
Paul
Greg Beaver wrote:
>Paul Fitzpatrick wrote:
>
>
>
>Try adding:
>
>var_dump(get_included_files());
>
>right before line 196, and see if PEAR.php is being included from the
>location you think it is.
>
>I suspect that there is a file named "pear.php" somewhere in the current
>directory that is being included instead of C:\wamp\php\PEAR\PEAR.php
>
>Greg
>
>
>
| |
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Hi,
This enough info (below)?
Thanks,
Paul
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir C:\wamp\php
PEAR documentation directory doc_dir C:\wamp\php\pear\docs
PHP extension directory ext_dir C:\php5
PEAR directory php_dir C:\wamp\php\pear
PEAR Installer cache directory cache_dir
C:\DOCUME~1\ADMINI~1\LOCALS~1\Te
mp\pear\cache
PEAR data directory data_dir C:\wamp\php\pear\data
PHP CLI/CGI binary php_bin C:\wamp\php\php.exe
PEAR test directory test_dir C:\wamp\php\pear\tests
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:\gnupg\gpg.exe
Signature Key Directory sig_keydir C:\WINDOWS\pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename C:\WINDOWS\pear.ini
System Configuration File Filename C:\WINDOWS\pearsys.ini
C:\wamp\php>
Justin Patrin wrote:
>On 10/26/05, Paul Fitzpatrick <paulfitz@internode.on.net> wrote:
>
>
>
>
>Don't alter the require_once paths. Just set your include_path
>correctly. Run phpinfo() in a script on your website and see what the
>include_path is. Then check where the php.ini is and go edit that one
>to fix the path.
>
>
>
>
>What config info?
>
>
>
>
>
>--
>Justin Patrin
>
>
>
| |
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Hi,
I am using the below include path in my php ini config, however certain
files such as pear/registry.php refuse to work unless the path to
pear.php is altered.
include_path = ".;c:\wamp\php\PEAR"
Its a strange issue, apart from this the setup was smooth.
Thanks,
Paul
Justin Patrin wrote:
>On 10/26/05, Paul Fitzpatrick <paulfitz@internode.on.net> wrote:
>
>
>
>
>Don't alter the require_once paths. Just set your include_path
>correctly. Run phpinfo() in a script on your website and see what the
>include_path is. Then check where the php.ini is and go edit that one
>to fix the path.
>
>
>
>
>What config info?
>
>
>
>
>
>--
>Justin Patrin
>
>
>
| |
| Greg Beaver 2005-10-27, 3:56 am |
| Paul Fitzpatrick wrote:
>
> Hi,
>
> I am using the below include path in my php ini config, however certain
> files such as pear/registry.php refuse to work unless the path to
> pear.php is altered.
>
> include_path = ".;c:\wamp\php\PEAR"
>
> Its a strange issue, apart from this the setup was smooth.
Is your PEAR.php in C:\wamp\php\PEAR\PEAR.php or in
C:\wamp\php\PEAR\PEAR\PEAR.php?
Greg
| |
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Hi,
Yes I meant to say yes that phpinfo(); is displaying the correct include
path that I specified in php.ini
include_path .;c:\wamp\php\PEAR .;c:\wamp\php\PEAR
Certain files are having trouble finding the pear class for some reason.
Any other info that could help track the problem down?
Thanks,
Paul
Justin Patrin wrote:
>On 10/26/05, Paul Fitzpatrick <paulfitz@internode.on.net> wrote:
>
>
>
>Please re-read my e-mail. Check the include_path and php.ini when you
>run phpinfo(); in a PHP script *on your webserver*. I bet you'll
>notice that they're not what you think they should be.
>
>
>
>
>
>--
>Justin Patrin
>
>
>
| |
| Greg Beaver 2005-10-27, 3:56 am |
| Paul Fitzpatrick wrote:
>
> Hi,
>
> Yes I meant to say yes that phpinfo(); is displaying the correct include
> path that I specified in php.ini
> include_path .;c:\wamp\php\PEAR .;c:\wamp\php\PEAR
>
>
> Certain files are having trouble finding the pear class for some reason.
> Any other info that could help track the problem down?
You haven't tried the var_dump(get_included_files())
Greg
| |
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Hi Greg,
Yes here are the results -
array(10) { [0]=> string(28) "l:\sites\mumbai\bb_test1.php" [1]=>
string(28) "l:\sites\mumbai\init.inc.php" [2]=> string(38)
"c:\wamp\php\pear\HTML\BBCodeParser.php" [3]=> string(24)
"l:\sites\mumbai\PEAR.php" [4]=> string(38)
"c:\wamp\php\pear\Validate\Validate.php" [5]=> string(30)
"c:\wamp\php\pear\PEAR\Info.php" [6]=> string(32)
"c:\wamp\php\pear\PEAR\Remote.php" [7]=> string(32)
"c:\wamp\php\pear\PEAR\Config.php" [8]=> string(34)
"c:\wamp\php\pear\PEAR\Registry.php" [9]=> string(38)
"c:\wamp\php\pear\PEAR\DependencyDB.php" }
*Fatal error*: Class 'PEAR' not found in
*c:\wamp\php\pear\PEAR\Registry.php* on line *52
-------------------------------
*Thats when I have registry.php including pear as "require_once
'PEAR.php'; (the original way)
When I alter the registry.php code to 'require_once 'PEAR/PEAR.php'; It
works as intended. Its taking an alteration of the original pear file
to get it working at the moment.
Heres a screenshot of my directory layout. The PEAR.php file is in the
base folder of the include_path. It should be making it in but it isn't
atm.
Screenshot of my directory layout... http://ezhostingaustralia.com/pear.jpg
Thanks,
Paul
*
*
Greg Beaver wrote:
>Paul Fitzpatrick wrote:
>
>
>
>You haven't tried the var_dump(get_included_files())
>
>Greg
>
>
>
| |
| Paul Fitzpatrick 2005-10-27, 3:56 am |
|
Found it!
Thanks for the help guys, I noticed l:\sites\mumbai\PEAR.php in there
which shouldn't have been.
Removed that file and it included the correct one.
Thanks again!
Paul
Paul Fitzpatrick wrote:
>
> Hi Greg,
>
> Yes here are the results -
>
> array(10) { [0]=> string(28) "l:\sites\mumbai\bb_test1.php" [1]=>
> string(28) "l:\sites\mumbai\init.inc.php" [2]=> string(38)
> "c:\wamp\php\pear\HTML\BBCodeParser.php" [3]=> string(24)
> "l:\sites\mumbai\PEAR.php" [4]=> string(38)
> "c:\wamp\php\pear\Validate\Validate.php" [5]=> string(30)
> "c:\wamp\php\pear\PEAR\Info.php" [6]=> string(32)
> "c:\wamp\php\pear\PEAR\Remote.php" [7]=> string(32)
> "c:\wamp\php\pear\PEAR\Config.php" [8]=> string(34)
> "c:\wamp\php\pear\PEAR\Registry.php" [9]=> string(38)
> "c:\wamp\php\pear\PEAR\DependencyDB.php" }
>
> *Fatal error*: Class 'PEAR' not found in
> *c:\wamp\php\pear\PEAR\Registry.php* on line *52
>
> -------------------------------
> *Thats when I have registry.php including pear as "require_once
> 'PEAR.php'; (the original way)
>
> When I alter the registry.php code to 'require_once 'PEAR/PEAR.php';
> It works as intended. Its taking an alteration of the original pear
> file to get it working at the moment.
>
> Heres a screenshot of my directory layout. The PEAR.php file is in
> the base folder of the include_path. It should be making it in but it
> isn't atm.
>
> Screenshot of my directory layout...
> http://ezhostingaustralia.com/pear.jpg
>
> Thanks,
> Paul
>
> *
> *
> Greg Beaver wrote:
>
>
|
|
|
|