Jump to content

Recommended Posts

Hello,

I am having real problems using pear on shared host.

I have installed a local version of pear at http://mydomain/php/PEAR/ and tried to include it into my page using

<?php
ini_set(
  'include_path',
  ini_get( 'include_path' ) . PATH_SEPARATOR . "/home/server/mydomain/php/PEAR/"
);

set_include_path(
    get_include_path() .
    PATH_SEPARATOR . '/home/server/mydomain/php/PEAR/'
);

// include PEAR mail classes
    include('Mail.php');
    include('Mail/Mime.php');
?>

 

I receive the following errors


Warning: require(Mail/Mime.php) [function.require]: failed to open stream: No such file or directory in /mnt/local/home/server/mydomain/send_newsletter.php on line 16

Fatal error: require() [function.require]: Failed opening required 'Mail/Mime.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php:/home/server/mydomain/php/PEAR/:/home/server/mydomain/php/PEAR/') in /mnt/local/home/server/mydomain/send_newsletter.php on line 16

 

Can someone please help, I have search and followed many different tutorials but still cant get it to work.

Thanks

Link to comment
https://forums.phpfreaks.com/topic/127151-php-pear/
Share on other sites

PEAR on a shared host is a real headache! I've felt the pain from my own experience, and at least with my host, I would not attempt it again. At least in my experience, I was not able to install PEAR correctly, and had to have the host do it. Installation is not hard, but I believe you need special priveledges, like sudo/admin.

Link to comment
https://forums.phpfreaks.com/topic/127151-php-pear/#findComment-657788
Share on other sites

If PEAR is a must, you might change hosts to one that offers PEAR, like inmotionhosting.com. This is the host that I am currently using, and they are the best that I have worked with so far. I'm not going to say they are perfect, because no host is, but so far so good for me.

Link to comment
https://forums.phpfreaks.com/topic/127151-php-pear/#findComment-658551
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.