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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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'); Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.