Problem with CB not finding relative include files

17 years 11 months ago #9457 by maxx
I keep getting the following error message:

Warning: main(components/com_comprofiler/ue_config.php): failed to open stream: No such file or directory in /path-to-site/administrator/components/com_comprofiler/admin.comprofiler.php on line 26

and any other inlcuded file.


I have searched the forums on joomlapolis.com and can't find an answer to the problem. I can't figure out if it is a confuration problem or not. What I have done so far:

1) installed joomla 1.0.3 (tried 1.0.8 but when problems arose I thought I would revert to the supported joomla version for Community Builder). Then I tested the joomla installation. I am able to fully use Joomla as a stand alone CMS so that should rule out any problem in the configurations.php file (e.g. absolute_path ). plus I checked it manually just to be sure. next I installed Community Builder 1 RC2 and ran into problems with it (the above mentioned error appears on every page having to do with Community Builder).

2) I started from scratch with a new install of Joomla. After verifiying Joomla was working as expected I just installed comprofiler via Admin->Installers->Components. Then I went to Admin->Components->Community Builder->Configuration. That is when I am greeted by a page filled with the errors like the one mentioned above. I went through the file

joomla-root/administrator/components/com_comprofiler/admin.comprofiler.php and made the following edits:

changed line 25 through 29 from

require_once( $mainframe->getPath( 'admin_html' ) );
include_once( "components/com_comprofiler/ue_config.php" );
include_once("components/com_comprofiler/plugin.class.php");
include_once("components/com_comprofiler/comprofiler.class.php");
include_once("components/com_comprofiler/imgToolbox.class.php");

to this

$my_absolute_path = $mainframe->getCfg( 'absolute_path' );
include_once( $my_absolute_path . "/administrator/components/com_comprofiler/ue_config.php" );
include_once( $my_absolute_path . "/administrator/components/com_comprofiler/plugin.class.php");
include_once( $my_absolute_path . "/administrator/components/com_comprofiler/comprofiler.class.php");
include_once( $my_absolute_path . "/administrator/components/com_comprofiler/imgToolbox.class.php");


and changed line 911 from

require_once("includes/pageNavigation.php");

to this

require_once( $mainframe->getCfg( 'absolute_path' ) . "/administrator/includes/pageNavigation.php");


and comprofiler seems to be working fine now. That said what could be causing Community Builder to not being able to find the realtive path includes? I have installed Community Builder on Windows and it finds the relative path fine and works great. The platform i am having problems with is on Linux. with the following options

Safe Mode: OFF
Display Errors: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: OFF
XML enabled: Yes
Zlib enabled: Yes

Please Log in to join the conversation.

17 years 11 months ago #9500 by maxx
OK! OK! Totally dumb mistake and a great example of running on nothing but caffeine. When I installed php on linux I forgot to include in the php.ini file the local directory in the include_path like so

include_path = ".:/path_to_php_libraries"

the dot in there makes all the difference. :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn