pear errors

Support/Development for PHP
npavlidis
Forum Regular
Forum Regular
Posts: 122
Joined: Sun Jun 04, 2006 10:03 am

pear errors

Unread post by npavlidis »

Everything used to be pretty easy with joomla so far but it seems that when i try to install some components i get the same fatal error:

PHP Fatal error: main() [<a href='function.require'>function.require</a>]: Failed opening required '' (include_path='.:/usr/share/pear') in /var/www/vhosts/host.net/httpdocs/administrator/components/com_mls_events/admin.mls_events.php on line 6, referer: http://www.host.net/administrator/index ... =component

same error came up with a number of components and i am suspecting that this is not a joomla problem... what could it be?
(same issuewith another component used on the same site to bridge smf and fixed when i put an absolute path on a .php file on the include part)

System:

Centos 4.4-current

PHP 5.0.4 (cli) (built: Jan 29 2006 21:37:43)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

ASL kernel patches
thanks
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

safe_mode maybe?
npavlidis
Forum Regular
Forum Regular
Posts: 122
Joined: Sun Jun 04, 2006 10:03 am

Unread post by npavlidis »

checked it no :S


______________

what amazes me is that the same component wont work in this domain but it IS working in a domain I set up couple of months ago(same component version)
npavlidis
Forum Regular
Forum Regular
Posts: 122
Joined: Sun Jun 04, 2006 10:03 am

thoughts

Unread post by npavlidis »

To note something further (since I dont know what the problem is and how this whole php - pear stuff runs) i got this:

I installed gigcalendar all good successful install but thought the admin interface when i tried to open the configuration menu of gigcalendar i got a blank page and this error on the log file:

PHP Warning: main() [<a href='function.main'>function.main</a>]: open_basedir restriction in effect. File(/usr/share/pear/tasks.php) is not within the allowed path(s): (/var/www/vhosts/domain.net/httpdocs:/tmp) in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 26, referer: http://www.domain.net/administrator/ind ... com_gigcal

PHP Warning: main(tasks.php) [<a href='function.main'>function.main</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 26, referer: http://www.domain.net/administrator/ind ... com_gigcal

and the fatal one:

PHP Fatal error: main() [<a href='function.require'>function.require</a>]: Failed opening required 'tasks.php' (include_path='.:/usr/share/pear') in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 26, referer: http://www.domain.net/administrator/ind ... com_gigcal

the 26th line of admin.gigcal.php had this:
require_once('tasks.php');
relative path
which when i changed to the absolute path
require_once('/var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/tasks.php');
the thing worked! but with the following errors:

PHP Warning: main() [<a href='function.main'>function.main</a>]: open_basedir restriction in effect. File(/usr/share/pear/gigmanager.php) is not within the allowed path(s): (/var/www/vhosts/domain.net/httpdocs:/tmp) in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 119, referer: http://www.domain.net/administrator/ind ... com_gigcal

PHP Warning: main(gigmanager.php) [<a href='function.main'>function.main</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 119, referer: http://www.domain.net/administrator/ind ... com_gigcal

PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'gigmanager.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/domain.net/httpdocs/administrator/components/com_gigcal/admin.gigcal.php on line 119, referer: http://www.domain.net/administrator/ind ... com_gigcal

safe_mode on plesk is turned off since the begining of the install

and... thats pretty much it... now you know what i know(not much)

any help is much appreciated

Thank you
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Add /usr/share/pear to a domain's open_basedir path to enable the use of PEAR.

http://kb.swsoft.com/article_41_432_en.html
Lemonbit Internet Dedicated Server Management
npavlidis
Forum Regular
Forum Regular
Posts: 122
Joined: Sun Jun 04, 2006 10:03 am

Unread post by npavlidis »

breun! u brilliant brilliant man :) WORKS!

the question still being though in the other domain (the one that it worked before and still does) nothing in any config is mentioned about /usr/share/pear!
what the hell!

how can i do this setting a global one? i dont want add files for every domain each time!(that wouldnt be a security hole would it?)

Thank you :)
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Yeah, I think it's strange that by default /usr/share/pear isn't in the open_basedir path. Sadly you can't set this globally as each domain's httpd.include would override a global open_basedir path setting. You could create a vhost.conf in the skeleton that has an open_basedir entry with /usr/share/pear added though. And maybe bug SWsoft to have this added by default. :)
Lemonbit Internet Dedicated Server Management
Post Reply