Personal tools
Views

User Handbook/Installation/Troubleshooting

From CMSMS

This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių

Contents

Troubleshooting

Something went wrong during the installation? This section gives you answers to some common problems!


Cannot Access Installation Page

This can happen if there is an issue with mod_security, to fix this you need to edit the .htaccess file and add the line SecFilterEngine Off, if this does not fix your issue it is suggested that you look at your httpd error log.

Install went well, but I can't login to the admin

It seems the install went well. You can even browse the site. But you can't login to the admin console. You may face either:

  • a server side PHP session problem
  • a browser side cookie problem

Solution: enable server side PHP sessions and let the admin's browser accept cookies (at least transient cookies from your site).

Fatal error: xyz not found in /some/path/to/a/file.php in line zyx

...or xyz undeclared, undefined, redefined... or file not found.

If there is nothing special with your setup, you may face a common file transfer integrity problem : some files may not have been correctly uploaded to their hosting place.

Solution: install via shell or use a reliable FTP program. It also may be due to a faulty expander program, make sure there is a file named "include.php" and "version.php". A user has used Stuffit Expander by Allume and has noticed that it did not export all of the necessary files.

Fatal error: Call to undefined function token...() in /some/path/to/a/file.php in line xyz

...or something wrong about "token" or "tokenizer".

If there is nothing special with your setup, PHP tokenizer support seems not enabled at your hosting place.

Solution: ask you hosting provider not to disable it.

Fatal error: Cannot redeclare class user in installer step two

Most probably you have phplib installed and it conflicts with cmsms user class (this could change in future releases)

solution: setup .htaccess file with this content and try installing again

  php_flag auto_prepend_file ""
  php_flag include_path ".:/usr/local/share/pear:/php/includes:/usr/share/php:/usr/local/lib/php"


unrecognized tag 'title'

If you get an error like this:

Fatal error: Smarty error: [in template:14 line 8]: syntax error: unrecognized tag 'title' (Smarty_Compiler.class.php, line 580

  1. Open config.php and double-check the value of $config['root_path']
  2. Make sure that you have uploaded all the files in the "plugins" folder.


tempnam function disabled (revised by Nitrouz 10-05-07)

If you get an error like this:

Warning: tempnam() has been disabled for security reasons in /home/usrname/public_html/cms/admin/addcontent.php on line 217

To fix, you need to edit these files, so open them and get them ready:

lib/misc.functions.php
admin/addcontent.php
admin/editcontent.php
admin/addtemplate.php
admin/edittemplate.php
lib/smarty/internals/core.write_file.php
modules/FCKeditorX/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php
modules/ModuleManager/ModuleManager.module.php

Solution:

Open 'lib/misc.functions.php'

Find:

     /**
       * Misc functions
       *
       * @package CMS
       */

Add underneath it:

     /**
       *Tempnam fix
       *
       *
       *@author: Nitrouz, top7up, php.net
       *@since 1.06
       */
     function newtempnam($dir, $prefix, $postfix=''){
	if ($dir[strlen($dir) - 1] == '/') {
		$trailing_slash = "";
	} else {
		$trailing_slash = "/";
	}
	if (!is_dir(realpath($dir)) || filetype(realpath($dir)) != "dir") {
		return false;
	}
	if (!is_writable($dir)){
		return false;
	}
	do{
		$seed = substr(md5(microtime().posix_getpid()), 0, 8);
		$filename = $dir . $trailing_slash . $prefix . $seed . $postfix;
	} while (file_exists($filename));
	$fp = fopen($filename, "w");
	fclose($fp);
	return $filename;
}

Now below we are going to be replacing all references to 'tempnam' with 'newtempnam' which is the new function we have created in 'misc.functions.php'. Dont worry you wont overwrite anything you shouldnt if you run a replace algorithm. All references of tempnam need to be changed anyway.

Open 'admin/addcontent.php'

    Find: tempnam
    Replace With: newtempnam


Open 'admin/editcontent.php'

    Find: tempnam
    Replace With: newtempnam


Open 'admin/addtemplate.php'

    Find: tempnam
    Replace With: newtempnam


Open 'admin/edittemplate.php'

    Find: tempnam
    Replace With: newtempnam


Open 'lib/smarty/internals/core.write_file.php'

    Find: tempnam
    Replace With: newtempnam


Open 'modules/FCKeditorX/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php'

    Find: tempnam
    Replace With: newtempnam


Open 'modules/ModuleManager/ModuleManager.module.php'

    Find: tempnam
    Replace With: newtempnam

This page in: English - Deutsch - Français - Svenska - Русский - Norsk - Polski - Nederlands - Español - Lietuvių