Xampp already has pear folder but is missing Mail.php?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Xampp already has pear folder but is missing Mail.php?

Postby aanders50 » 12. January 2017 15:21

Been trying to manually get the files installed, but each time I find and add something it then throws additional errors about other dependencies. I am wondering if PEAR just has skeleton code/files here that came with Xampp's initial install.

I have gone back and removed all the extra stuff I added/changed in an attempt to have someone who has done this before help me through it. PHP has been working fine for me so far as I use it for the backend of my application and I am just trying to extend mailing features now for user registration.

Using my template code it currently just complains that it cannot find "Mail.php" when I do require_once "Mail.php", doing a search under Xampp/php returned no results for Mail or Mail.php

The exact error is..

Code: Select all
Warning: require_once(Mail.php): failed to open stream: No such file or directory in C:\xampp\htdocs\MyApplication\PHP\Register\register.php on line 97

Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='C:\xampp\php\pear\') in C:\xampp\htdocs\MyApplication\PHP\Register\register.php on line 97


As for the /php/pear directory looks like
Image

And I took a screenshot of /php/pear/PEAR/ as well
Image

Any help appreciated! Will be trying to check back hourly.
aanders50
 
Posts: 1
Joined: 12. January 2017 15:13
XAMPP version: 3.2.2
Operating System: Windows 10

Re: Xampp already has pear folder but is missing Mail.php?

Postby Altrea » 12. January 2017 17:29

PEAR is a library containing more than 600 packages.
Of course didn't XAMPP include all of them by delivery (how huge should the download file of XAMPP be?).
So, you just need to know how to install a missing pear package?

Why do you still use PEAR? All modern projects i know have switched to composer with packagist. PEAR is a dying distribution system (just my 2 cents).
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp already has pear folder but is missing Mail.php?

Postby laneOC » 20. March 2020 21:46

I have this issue, too.

Did you find a solution?
laneOC
 
Posts: 1
Joined: 20. March 2020 21:45
XAMPP version: 5.6.40
Operating System: Windows

Re: Xampp already has pear folder but is missing Mail.php?

Postby Altrea » 20. March 2020 22:16

PEAR in XAMPP is a litte bit buggy.
But here is a step by step instruction that should work:

  1. fixing PEAR TAR Package
    • Open \xampp\php\pear\Archive\Tar.php in your editor
    • search for
      Code: Select all
      $v_att_list = & func_get_args();

      and replace with the following code
      Code: Select all
      $v_att_list = func_get_args();
    • save the file
  2. update PEAR
    • Open the XAMPP Shell (Shell-Button in your XAMPP control panel)
    • type in
      Code: Select all
      pear channel-update pear.php.net

      and
      Code: Select all
      pear upgrade PEAR
  3. Install Mail class
    • Again in the XAMPP Shell type in
      Code: Select all
      pear install Mail-1.4.1

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 109 guests