#1  
Old 6th January 2010, 17:44
Brian_A Brian_A is offline
Member
 
Join Date: Nov 2008
Location: Paris France
Posts: 31
Thanks: 8
Thanked 3 Times in 2 Posts
Default Pear Mail in CHROOT Apache

Hi

I need to get apache which is chrooted to acces pear. So I tried first a test like this, but it fails and cannot see why.

mkdir -p /webroot/usr/share/pear
cd /webroot/usr/share/pear
cp -avr /usr/share/pear .

chown apache:apache /webroot/usr/share/pear -R

/etc/php.ini
include_path = ".:/webroot/usr/share/pear/pear"

apache restart

then run: www.idole.com/infoTest.php

<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);

require_once 'System.php';
var_dump(class_exists('System'));

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/


//set_include_path('');
phpinfo();


?>

produces:

Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/idole.com/httpdocs/infoTest.php on line 7

Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.:/webroot/usr/share/pear/pear') in /var/www/vhosts/idole.com/httpdocs/infoTest.php on line 7

So I guess there is something I don't see here. Can anyone help me fix this please

Brian
Reply With Quote
Sponsored Links
  #2  
Old 7th January 2010, 16:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

What is Apache's chroot directory?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Brian_A (8th January 2010)
  #3  
Old 7th January 2010, 17:30
Brian_A Brian_A is offline
Member
 
Join Date: Nov 2008
Location: Paris France
Posts: 31
Thanks: 8
Thanked 3 Times in 2 Posts
Default

Hi

Unless I'm mistaken it is:

/var/www/vhosts/chroot/

Brian
Reply With Quote
  #4  
Old 8th January 2010, 00:09
Leszek Leszek is offline
Senior Member
 
Join Date: Nov 2006
Location: Poland,Włocławek
Posts: 369
Thanks: 22
Thanked 42 Times in 35 Posts
Send a message via Skype™ to Leszek
Default

You could copy Pear files to Your docroot and refer to them in Your scripts.
It should work as long as the paths will be corect.
__________________

Reply With Quote
The Following User Says Thank You to Leszek For This Useful Post:
Brian_A (8th January 2010)
  #5  
Old 8th January 2010, 11:03
Brian_A Brian_A is offline
Member
 
Join Date: Nov 2008
Location: Paris France
Posts: 31
Thanks: 8
Thanked 3 Times in 2 Posts
Default

Thank you for the point in the right direction. I'm a little nervous about this on two counts. 1. I'm new to Linux and there are many things I'm still having to learn. 2. This is a production server, which I did not set up.

I think I should do the following:

cd /var/www/vhosts/chroot/usr/share

cp –avr /usr/share/pear .

chown apache:apache /var/www/vhosts/chroot/share/pear –R

vi /etc/php.ini
************
Include_path = ”.:/var/www/vhosts/chroot/usr/share/pear”

Does this seem correct?

Brian
Reply With Quote
  #6  
Old 8th January 2010, 15:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

This could work.
If the Include_path doesn't work, try
Code:
Include_path = ".:/var/www/vhosts/chroot/usr/share/pear:/usr/share/pear"
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Brian_A (8th January 2010)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
421 Unexpected failure Lizard King Installation/Configuration 20 7th July 2009 21:43
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 10:50
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 18:51
Would the problem come from postfix? satimis Server Operation 10 27th January 2008 11:31
Can not recieve mail with de virtual mail adress Mounir Installation/Configuration 9 25th July 2006 00:16


All times are GMT +2. The time now is 22:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.