PEAR with php 5.3
moltra said 1 year, 2 months ago:
Can PEAR be enable on 4GH hosting with php 5.3
sherrod said 1 year, 2 months ago:
@moltra,
PEAR is supported in our Linux Shared Hosting Account with php 4 and 5. The following may assist further:
Sherrod
urvish said 1 year, 1 month ago:
Hi,
As per the other link, PEAR is supported in PHP 5.2 and even the ini include path is that of php 5.2 . The php 5.3 include path adds line PHP5_3 in the path.
So now to run PEAR modules, do I need to change my language to PHP 5.2 ? Also as per your language recommendation , PHP 5.2 is no longer actively supported. So what is recommended to use PEAR modules with PHP 5.3 ?
Thanks and Regards,
Urvish
adamr said 1 year, 1 month ago:
@urvish
You are welcome to use PEAR with PHP 5.3. The include path will remain the same.
-Adam
adamr said 10 months, 3 weeks ago:
I apologize for my previous confusion. The include path for our PHP5.3 enabled hosting plans is:
include_path = “.:/usr/local/php5_3/lib/php”
-Adam
cswsblv said 9 months, 3 weeks ago:
I put this line into my script:
ini_set(‘include_path’, ‘.:/usr/local/php5_3/lib/php’);
I got this error message:
Fatal error: require_once() [function.require]: Failed opening required ‘Mail.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/c/s/w/cswsblv/html/onlinebankar/level/onlinebankar_befektetes_level_feldolgozas.php on line 14
Please help to find the PEAR
adamr said 9 months, 3 weeks ago:
@cswsblv
You may want to check the PHP version of your hosting account to ensure you are working with a PHP5.3 enabled plan.
Viewing or Changing Your PHP Language Version
-Adam
ben_r_ said 6 months ago:
Im having issues getting this PEAR installation to work too.
I have my PHP set to 5.3. I have my php5.ini file in the root html directory with the line in it: include_path = “.:/usr/local/php5_3/bin/php”
And Im still getting:
Fatal error: require_once() [function.require]: Failed opening required ‘Mail.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in
ben_r_ said 6 months ago:
I realize the include path above shows bin, but that was due to some testing I was doing. I tried lib with the same result.
ben_r_ said 6 months ago:
Okay, that was a nightmare, got that working, couple of dumb mistakes and A LOT of include issues not covered in GoDaddy’s install instructions for PEAR.
BUT I finally seem to have it all working only to get the following error:
“Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )]“
And here is the code Im using:
<?php
require_once “Mail.php”;
$from = “<XXXX@gmail.com>”;
$to = “<XXXX@gmail.com>”;
$subject = “Test PEAR Email”;
$body = “Hi,nnThis is a test email sent using PEAR through Gmail.”;
$host = “ssl://smtp.gmail.com”;
$port = “465″;
$username = “XXXXXXX@gmail.com”; //<> give errors
$password = “XXXXXXX”;
$headers = array ( ‘From’ => $from,
‘To’ => $to,
‘Subject’ => $subject);
$smtp = Mail::factory(‘smtp’,
array (‘host’ => $host,
‘port’ => $port,
‘auth’ => true,
‘username’ => $username,
‘password’ => $password));
if (PEAR::isError($smtp))
{
echo “<p>”.$smtp->getMessage().”</p>”;
}
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail))
{
echo “<p>”.$mail->getMessage().”</p>”;
}
else
{
echo “<p>Message successfully sent!</p>”;
}
?>
Does GoDaddy no support mail sent through SSL from websites or am I doing something wrong? Thats what Im kinda seeing around the net.
adamr said 6 months ago:
@ben_r_
When sending emails from our shared hosting environment, you will be unable to connect to a 3rd party SMTP server. You will want to use our relay server:
relay-hosting.secureserver.net
This server will allow you to send up to 1000 emails per day and does not require authentication. We do not currently offer mail sent through SSL in our shared hosting environment.
-Adam
ben_r_ said 6 months ago:
@Adam
So that means that there is now way to send emails through Gmail addresses correct?
And can you point me to some documentation discussing how to setup and use the relay server? So far I have been using the simple PHP Mail() function and whenever emails are sent out they show up as from in the users accounts as a suspicious looking “XXXXXXX@p3nlhg942.shr.prod.phx3.secureserver.net” which more often than not get sent to the SPAM/Junk folder. I was hoping to use Gmail accounts to clean that up and avoid it becoming SPAM, but I could also use email addresses create in my GoDaddy hosting account if I knew how to send email in PHP from those addresses.
adamr said 6 months ago:
@ben_r_
That is correct. You will be unable to send using a Gmail.com email address as the ‘From:’ address. You are welcome to use your in house Go Daddy email address as the ‘From:’ address. When using the PHP Mail() function, you will not need to specify the relay server. Here’s a link to a basic php mail script that shows how to include a ‘From:’ address:
http://www.w3schools.com/php/php_mail.asp
-Adam
ben_r_ said 6 months ago:
Yes that def cleaned it up, though it does still add “via p3nlhg941.shr.prod.phx3.secureserver.net” after the from email address when viewing the email in the Gmail browser version. But I guess thats something Ill have to live with unless I switch hosting companies and perhaps the next doesnt show that.
Thanks for the help.
0 min expected wait time