MESteele Posted February 17, 2023 Share Posted February 17, 2023 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. Quote Link to comment Share on other sites More sharing options...
requinix Posted February 17, 2023 Share Posted February 17, 2023 "Unable" meaning what? What have you tried and what happened when you did? Quote Link to comment Share on other sites More sharing options...
MESteele Posted February 17, 2023 Author Share Posted February 17, 2023 With Windows PHP 7.x I installed PEAR using "php go-pear.phar" and that no longer works. It refuses to run under PHP 8.x. I'm trying to install PEAR packages for graphing. Quote Link to comment Share on other sites More sharing options...
requinix Posted February 18, 2023 Share Posted February 18, 2023 "Refuses to run" meaning what? Error messages? Nothing happens? We aren't sitting at your computer and watching you do things. We can't see what you see so you have to tell us what you see. Quote Link to comment Share on other sites More sharing options...
MESteele Posted February 18, 2023 Author Share Posted February 18, 2023 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 Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted February 18, 2023 Solution Share Posted February 18, 2023 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');" 1 Quote Link to comment Share on other sites More sharing options...
MESteele Posted February 18, 2023 Author Share Posted February 18, 2023 Yes, PHP copied the file, and it is now working Thanks... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.