freak4 Posted August 15, 2013 Share Posted August 15, 2013 I am using this file: https://github.com/pear/pear-core/blob/master/PEAR.php In one of my mail sending application. But I am getting this error: PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'PEAR5.php' for inclusion (include_path='/home/path/to/../framework:/home/path/to/../modules:/home/path/to/:.:/usr/lib/php:/usr/local/lib/php') in /home/path/to/modules/PEAR.php on line 730 Line 730 has this: if (PEAR_ZE2) { include_once 'PEAR5.php';} Any advice? Link to comment https://forums.phpfreaks.com/topic/281224-pearphp-include_path-error/ Share on other sites More sharing options...
AbraCadaver Posted August 15, 2013 Share Posted August 15, 2013 Well it looks like the file is called PEAR.php and you are trying to include PEAR5.php. Not sure what else given the limited info. Link to comment https://forums.phpfreaks.com/topic/281224-pearphp-include_path-error/#findComment-1445269 Share on other sites More sharing options...
freak4 Posted August 16, 2013 Author Share Posted August 16, 2013 If I use this, it is working: if (PEAR_ZE2) { include_once '/usr/share/pear/PEAR5.php';} But I need to pull this path using 'ini_set'. Not sure how to do it. Link to comment https://forums.phpfreaks.com/topic/281224-pearphp-include_path-error/#findComment-1445421 Share on other sites More sharing options...
AbraCadaver Posted August 16, 2013 Share Posted August 16, 2013 //probably do this in a main file that is always included or in the file with the include set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear'); include_once('PEAR5.php'); Link to comment https://forums.phpfreaks.com/topic/281224-pearphp-include_path-error/#findComment-1445432 Share on other sites More sharing options...
freak4 Posted August 16, 2013 Author Share Posted August 16, 2013 set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/pear'); Problem is /usr/share/pear varies on different servers. So still I can not use this. How to get pear path? Link to comment https://forums.phpfreaks.com/topic/281224-pearphp-include_path-error/#findComment-1445437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.