Installation Problems

From GeeklogWiki
Revision as of 15:26, 7 May 2009 by Dirk (talk | contribs) (minor formatting fix)

Jump to: navigation, search


When you get an error message, please read it carefully. Even if you're not familiar with PHP, it will give you a hint about what is wrong. Pay special attention at the paths contained in the error message. Wrong paths are the most common cause for problems.

If you get more than one error message, always start with the very first error - the others will often go away automatically once you've fixed the first one.


I get the following error:

Parse error: parse error in /path/to/your/config.php on line 76

(line number may vary)

Answer:

A parse error usually hints at a typo you've made. Check the file at the given line (the actual error may be in the line preceding the one mentioned in the error message).

Common problems are:

  • not enclosing paths in single quotes properly
  • missing semicolon at the end of the line
  • using single quotes within a string (you need to write Joe's Site as Joe\'s Site, escaping the extra quote) 




I get the following errors:

Warning: main(some/path/to/system/databases/mysql.class.php): failed to open stream: No such file or directory in /path/to/your/system/lib-database.php on line 110

Fatal error: main(): Failed opening required 'some/path/to/system/databases/mysql.class.php' (include_path='.:/some/other/path/') in /some/path/to/system/lib-database.php on line 110

(line numbers may vary)

Answer:

The path that you've entered for the $_CONF['path'] variable in config.php is not correct. Make sure you typed it correctly. Also make sure it uses an absolute path, i.e. one that starts at the root of your file system (and that it starts with a / under Unix/Linux or a drive letter under Windows).


I get the following error:

1050: Table 'gl_access' already exists

Answer:

You must have run the install script before (possibly unsuccessfully). To be on the save side, drop the database and create a new, empty database before trying to run the install script again.


During installation, I get one of the following errors:

Case 1:

Parse error: parse error in ../../lib-common.php on line 2231

Fatal error: Cannot instantiate non-existent class: template in ../../lib-common.php on line 335

Case 2:

Parse error: parse error in /path/to/geeklog/public_html/lib-common.php on line 3036

Fatal error: Call to undefined function: plg_showcenterblock() in /path/to/geeklog/public_html/index.php on line 67

Case 3:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /path/to/geeklog/public_html/lib-common.php on line 3815

Fatal error: Cannot instantiate non-existent class: template in /path/to/geeklog/public_html/lib-common.php on line 709

(line numbers may vary)

Answer:

All of the above cases (and similar "parse error" messages you may get for lib-common.php, typically with a line number in the 3000 or 4000 range) indicate a corrupted lib-common.php file.

As noted at the top of this document this is usually caused by one of the following:

  • Uncompressing the tarball with certain versions of WinZip (try using WinRar instead)
  • Editing the lib-common.php with Dreamweaver or other so-called WYSIWYG HTML editors (use a simple text editor instead)
  • Editing the lib-common.php with "on-site" text editors built into tools like Cpanel (again, use a simple text editor instead)


You will need to unpack a fresh copy of the lib-common.php and edit it again, using a "normal" text editor. Windows users can find some recommendations for editors to use in this and this thread in the forums on geeklog.net.


I get the following error:

Template Error: set_root: /some/path/to/public_html/layout/professional is not a directory. Halted.

Answer:

This is a path problem again. Check the setting for $_CONF['path_html']. If you did not change or rename Geeklog's public_html directory, then there's no need to change that setting at all (restore the line to its original content). Otherwise, please read the comments above that line in config.php again carefully to understand how to change that line properly.


I get the following error:

Warning: mysql_connect(): Access denied for user: 'username@localhost' (Using password: YES) in
/path/to/geeklog/system/databases/mysql.class.php on line 104
Cannnot connect to DB server

(line number may vary)

Answer:

First of all, make sure the database settings in config.php are correct, specifically the name and password of your MySQL user, the name of your database, and the name of your MySQL server.

If you're running your own server, you may need to give your MySQL user proper permissions. Log in to MySQL as the MySQL root user and issue these commands:
GRANT ALL PRIVILEGES ON database_name TO user@host IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

Replacing the lower-case strings with the actual values, of course.

If you want (or need) to be more restrictive with database permissions: You will need to at least grant the ALTER, CREATE, DELETE, INSERT, SELECT, and UPDATE permissions to your database user. ALTER and CREATE permissions are only needed for installing and upgrading Geeklog, as well as for installing plugins and other add-ons.</p>