1

Topic: Fatal error when running on webhosting

On our webhosting the ImageManager module doesn't work. The same code does work on our dev server.

On our webhosting, upon clicking the image browse button to open the ImageManager window opens and dislays a PHP error:

Fatal error: main(): Failed opening required 'error' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/imagemanager/includes/general.php on line 37

After some tracing of the code, I found the problem is general.php is trying to include a file which does not exist:

"/var/www/html/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/imagemanager/includes/../classes/Utils/.php"

The file that should be loaded is

$mcImageManagerConfig['thumbnail'] = "ImageToolsGD";

as defined in the default_config.php
The problem appears to occur when the config.php is included and the

require_once("classes/Authenticators/DrupalAuthenticatorImpl.php");

include occurs. After that the $mcImageManagerConfig turns to NULL!

I'm running Drupal 4.7.3 - any ideas what could be causing this, I'm assuming its apache/php related as the same setup works okay on our dev server. The hosting is shared, running Ensim, should that make any difference to debugging this problem.

2

Re: Fatal error when running on webhosting

That is really weird, it should definetly never be able to be null.

Check the PHP versions and post them both here.

Afraithe
TinyMCE Developer
Moxiecode Systems

3

Re: Fatal error when running on webhosting

PHP Version 4.4.2 is on the webhosting, and PHP Version 4.3.10 is on the dev server.

Whilst checking the webhosting PHP info, I noticed PHP is running in CGI API mode. Are there security implication here which could cause problems?

Last edited by budda (2006-08-24 14:38:32)

4

Re: Fatal error when running on webhosting

Having changed the Ensim site configuration to "3.1 compatibility mode" for security, the ImageManager module now works as expected. Some sort of CGI restrictions are coming in to play and causing the config variable array to be blanked - which seems an odd outcome?

5

Re: Fatal error when running on webhosting

Yes, sounds a bit odd, no idea what kind of restrictions would cause that effect.

Afraithe
TinyMCE Developer
Moxiecode Systems

6

Re: Fatal error when running on webhosting

I have found out that Ensim "3.1 compatibility mode" means:

"3.1 compatibility runs the chroot in a different manner and uses the servers PHP installation. The high security tightens up the sites chroot and each sites runs it own PHP cgi module (and thats why you have your own php.ini)."

How can the above affect TinyMCE ImageManager module?

7

Re: Fatal error when running on webhosting

I don't know, could be something in your custom php.ini thats not quite correct.

Afraithe
TinyMCE Developer
Moxiecode Systems

8

Re: Fatal error when running on webhosting

It's an out of the box php.ini as far as we are concerned. Could it be related to the chroot environment, and ImageManager using absolute paths built up from / ?

9

Re: Fatal error when running on webhosting

Might be something related to the chroot, but honestly, its kind of hard to say what the reason for this error is.

Afraithe
TinyMCE Developer
Moxiecode Systems

10

Re: Fatal error when running on webhosting

I recently experienced this error in a non-shared environment.  I think Ensim is a red herring.

There's something about the Drupal bootstrap process that appears to intermittently clear out the other variables in scope.  What worked for me was moving the line

require_once("./classes/Authenticators/DrupalAuthenticatorImpl.php");

to the top of includes/default_config.php (there should be a comment indicating that it's okay to put it here).  Then remove that line entirely from config.php. 

This way the Drupal bootstrap completes before the $mcImageManagerConfig array is built.  I'm still conducting testing, but so far everything appears to be working.

Good luck!

tom (at) echoditto (dot) com