-
local php.ini include_path errors, looking for PEAR packages "Mail" and "Mail_MIME"
I can not find the PHP PEAR packages "Mail" and "Mail_MIME" in the default Siteground server installation.
I need to put their location in my php.ini include_path statement.
I need to get my php script "send-email-form.php" to include the PEAR modules Mail and Mail_MIME.
I have placed that script and the php.ini file in my home/my_cPanel_username/Public_html folder.
Running the script produces the 4 Warning error messages below. Clearly the include_path statement is not pointing to the correct directory locations.
I have tried installing PEAR via go-pear.php but this has not achieved anything, so I have deleted the files installed.
I have also placed the php.ini file in my /home/my_cPanel_username/PEAR directory - in case I need to add any extra PEAR packages in the future
Paths advised by the PHP & MYSQL Tutorial/Section - PEAR Modules/How to install an additional Pear package/Step 7
= include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/my_cPanel_username/pear";
However - Cpanel Program Paths gives the following- PHP --> /usr/bin/php
N.B. The zsend_extension paths in php.ini lines 2 & 3 were obtained by using the cPanel PHP Variables Manager
I have tried using various paths, but nothing seems to work.
*** So what am I doing wrong ???
*******
Using the php.ini file below, I get the following error messages:
Warning: include_once(Mail.php) [function.include-once]: failed to open stream: No such file or directory in /home/my_cPanel_username/public_html/send-email-form.php on line 7
Warning: include_once() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/my_cPanel_username/pear') in /home/my_cPanel_username/public_html/send-email-form.php on line 7
Warning: include_once(Mail_Mime/mime.php) [function.include-once]: failed to open stream: No such file or directory in /home/my_cPanel_username/public_html/send-email-form.php on line 8
Warning: include_once() [function.include]: Failed opening 'Mail_Mime/mime.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/my_cPanel_username/pear') in /home/my_cPanel_username/public_html/send-email-form.php on line 8
*******
********
my local php.ini file contains the following lines:
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/my_cPanel_username/pear";
zend_extension=/usr/local/php52/lib/php/extensions/ioncube.so
zend_extension=/usr/local/php52/lib/php/extensions/ZendOptimizer.so
********
********
my send-email-form.php includes the following lines:
7 include_once('Mail.php');
8 include_once('Mail_Mime/mime.php');
********
Thanks in advance.
-
OK. Now fixed by the Siteground Helpdesk (Many Thanks).
Turns out that I was making it more complicated than it needed to be, because my local php.ini file was not required.
Also, one of my "include_path" statements was pointing at the wrong place. The correct statements are below:
include_once('Mail.php');
include_once('Mail/mime.php');
The default php.ini file is at /usr/local/php52/lib/php.ini and this works just fine for the Siteground default installation of PEAR packages - see https://www.siteground.com/tutorials...ar_modules.htm
So... another happy ending.
Thanks Siteground Helpdesk!
Similar Threads
-
By Necriis in forum Free Joomla Templates
Replies: 1
Last Post: 04-26-2011, 01:56 AM
-
By itsMeFred in forum Other Software and Applications
Replies: 1
Last Post: 07-14-2008, 04:42 PM
-
By Arven in forum Hosting Related Questions
Replies: 0
Last Post: 05-30-2007, 08:41 AM
-
By Gavin in forum General Joomla Discussions
Replies: 3
Last Post: 05-21-2006, 08:51 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Copyright © 2012 SiteGround.com Inc