• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

is PHP support PEAR?

Helen Pang

Basic Pleskian
Hi,

May I know if PHP in Plesk Windows support PEAR? I checked in phpinfo(), i saw this:

include_path .;./includes;./pear .;./includes;./pear

But when i enter below code

<?php
require_once 'System.php';
var_dump(class_exists('System'));
?>

It shows:
Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in D:\inetpub\vhosts\oxy.com.my\httpdocs\php\mailtest.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.;./includes;./pear') in D:\inetpub\vhosts\oxy.com.my\httpdocs\php\mailtest.php on line 2

I read from another forum, they advice to change the path in php.ini. My current config in php.ini is:

; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
include_path = ".;./includes;./pear"

Please advice.

Thanks.
 
other than PEAR, what else can customer use to send out email using PHP script? They tried to use mail() but failed, is it blocked in Plesk?
 
other than PEAR, what else can customer use to send out email using PHP script? They tried to use mail() but failed, is it blocked in Plesk?

PHP mail() function should work without any problems. Make sure that php.ini has SMTP host as localhost.
[Mail Function]
SMTP = 127.0.0.1

And test it using the following sample script,

<?php
mail("myemail@example.com", "My Subject", "It Works!!");
?>
 
I've checked the php.ini, it shows

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

but when i tested it with the script you given, it shows:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\inetpub\vhosts\domain.com\httpdocs\php\mailtest.php on line 2

please help.

Thanks.
 
Do you have opened port 25 on your Plesk server? Try to check it with

telnet localhost 25

If you have SMTP server started outside your Plesk server - specify it in php.ini instead localhost.
 
Back
Top