Jump to content

PHP 8.x and PEAR - Windows


Go to solution Solved by requinix,

Recommended Posts

I'm not sure if I am in the correct forum?

Issue: Installing PEAR into PHP 8.x for Windows

I have never had a problem installing PEAR on PHP 7.x on Windows, but I am unable to get PEAR installed using PHP 8.x.

Can someone direct me on how to get this done, and I'm on a local IIS and/or Apache webserver.

Link to comment
https://forums.phpfreaks.com/topic/315927-php-8x-and-pear-windows/
Share on other sites

The typical way of installing PEAR is to install PHP 8.2.3, add go-pear.phar to the root of PHP and then run go-pear.phar from the root of PHP.

Grabbing the latest version of go-pear.phar from http://pear.php.net/go-pear.phar for a more stable and current version

I drop it into the root of my PHP install folder and execute it.

d:\winids\php>php go-pear.phar
PHP Warning:  Private methods cannot be final as they are never overridden by other classes in D:\winids\php\go-pear.phar on line 339
manifest cannot be larger than 100 MB in phar "D:\winids\php\go-pear.phar"PHP Warning:  require_once(phar://go-pear.phar/index.php): Failed to open stream: manifest cannot be larger than 100 MB in phar "D:\winids\php\go-pear.phar" in D:\winids\php\go-pear.phar on line 1284
PHP Fatal error:  Uncaught Error: Failed opening required 'phar://go-pear.phar/index.php' (include_path='d:\winids\php;d:\winids\php\pear') in D:\winids\php\go-pear.phar:1284
Stack trace:
#0 {main}
  thrown in D:\winids\php\go-pear.phar on line 1284

  • Solution

Some Googling suggests that there's a weird and long-standing issue with the .phar such that you can't download it from a browser but need to use a tool like curl.

PHP itself might work too.

> php -r "copy('http://pear.php.net/go-pear.phar', 'go-pear.phar');"

 

  • Great Answer 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.