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

Tuesday, August 30, 2022

[FIXED] How to get pear working on Azure website?

 August 30, 2022     azure, pear     No comments   

Issue

Related question: Azure websites & MediaWiki: how to enable emails sending

I am trying to send mail with PEAR. The error message at http://modeldoc.azurewebsites.net/wiki/index.php?title=Special:RequestAccount is

Exception from line 268 of D:\home\site\wwwroot\wiki\includes\mail\UserMailer.php: PEAR mail package is not installed

What I did (on local linux machine)

php go-pear.phar.php 

This created a folder wiki/pear, with subfolders wiki/pear/share, wiki/pear/bin etc.

I added .user.ini in wiki/ with values

display_errors = On
upload_max_filesize = 10M
include_path=".;D:\home\site\wwwroot\wiki\pear\share\pear\PEAR"

I pushed the changes i.e. git add . git commit -m "add pear path" git push

but it didn't work. I also tried different paths in .user.ini


Solution

Remove the \PEAR from the include path.

The include path needs to be the one System.php is in - see http://pear.php.net/manual/en/installation.checking.php



Answered By - cweiske
Answer Checked By - Cary Denson (PHPFixing Admin)
  • 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