Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 02:14 pm EST

Geeklog Forums

unexpected T_STRING on line 48


john

Anonymous
i have placed geeklog and public_html folder in your web root directory and when i try to map the Path to
Geeklog's config.php: /geeklog/config.php to set a new database. I get the Geeklog Installation - Error

I think this is due to setting below - Can anyone tell me if the setting for the paths are correct as my both geeklog and public_html file are in web root directory.

thanks


(2) Paths |
// +---------------------------------------------------------------------------+

// Note for Windows users: It's safe to use the forward slash '/' instead of
// the backslash '' in paths. Make sure each path starts with a drive letter!

// This should point to the directory where your config.php file resides.
$_CONF['path'] = '/geeklog/'; // should end in a slash

// You only need to change this if you moved or renamed the public_html
// directory. In that case, you should specify the complete path to the
// directory (i.e. without the $_CONF['path']) like this:
// $_CONF['path_html'] = '/public_html/';
$_CONF['path_html'] = $_CONF['path'] . '/public_html/index.php/';


// +---------------------------------------------------------------------------+

please help.


 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you get an error stating a problem in line 48, you should start looking there, i.e on or before line 48. You have a syntax error in your config.php somewhere around that line (usually a missing quote or semicolon). It has nothing at all to do with your path settings.

bye, Dirk
 Quote

Status: offline

Benta

Forum User
Regular Poster
Registered: 03/11/05
Posts: 80
Don't know what kind of system you are on, but those settings wouldn't work on any machine I have used.

Is this a linux system? In that case, web root isn't really the same as the root of the file system. I think you can put relative paths in there (e.g. ../geeklog takes you one step up in the file system and down into the geeklog dir) or use http://phpfm.sourceforge.net/ to figure out more.
 Quote

john

Anonymous
I checked on 48 and it points to Database setting and there doesn't seem to be anything wrong.

I as using
/geeklogic/config/php as a path to config.php

please help.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Line 48 is actually an empty line in the original config.php (just above the line for $_DB_host). So it's possible that the problem has been caused by one of the comments above that line being wrapped when you edited config.php.

And only looking at your paths right now, I have to agree with Benta. It's unlikely that /geeklog is your correct path - there should be something before that. The install script gives you a hint what your full path is at the bottom of the first page (actually, you may see that that full path in the error message you get because of that syntax error, too).

But you have to figure out that other error first before you can even start worrying about your path being correct or not.

bye, Dirk
 Quote

Status: offline

Benta

Forum User
Regular Poster
Registered: 03/11/05
Posts: 80
Quote by john: I checked on 48 and it points to Database setting and there doesn't seem to be anything wrong.


you know, you haven't really said in which file that line 48 is that's giving you the problem. i personally don't think it is in config.php.

when do you get this error message? when you go to the install script?

I as using
/geeklogic/config/php as a path to config.php


In lib-common.php? i don't think that's right.


i'll give you an example on how many people do this:

the nice thing about geeklog is that it lets you put most of the important code outside the web root, which is a safer place.

assume your web root directory is called "www" (they are usually called www, web, or public_html)

we then go to the directory right above www in the file tree. this directory is often called '/home-something/" and create a new diretory called "mygeeklog". this is where we put the geeklog code and the config.php (there are other interesting alternatives for advanced users)

in the web root directory, the "www", we put the part of the geeklog code that's in the public_html-part of the distribution farchive file.

that means that when you set you web browser to go to your site, it reads the index.php file in your web root. the index.php calls the lib-common.php file, which it finds because it is in the same directory.

lib-common has to find config.php, so it has to be directed there. this is done in line 70 in my version, where the path to config.php is entered. so assume we want to give it as a relative path: first we go up one step from the web root, the down in the mygeeklog directory: the path is ../mygeeklog.

the config.php needs the paths entered as well, but it is simply done the same way.


this all might seem confusing, but you'll learn to appreciate it after a while.


sorry about lack captials, i'm typing in bed.
 Quote

All times are EST. The time is now 02:14 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content