PDA

View Full Version : question on code


tcjay
12-18-01, 04:01 PM
What would generate such an error message.


Fatal error: Failed opening required '/functions.php' (include_path='') in /www/n/needlept/htdocs/kisgb/setup/index.php on line 23


This is line 22 and 23

All the permissions are set to 755.

Any help would be greatly appreciated.

wwuud
12-18-01, 06:52 PM
Will need more information for a full answer, but i'll take a guess. It could be that the setup routine expects to be in the root of the site (i.e. not in kisgb directory) or there is a config.php or config.inc file that must be edited first to set the path.

(perhaps something like:

$install_path = "/www/n/needlept/htdocs/kisgb/setup";

or something lke that....)

Post more info about what you are intalling, etc., if you need more help.

Bud
12-18-01, 07:06 PM
I agree with wwuud, somewhere there should be a place to set the path to functions.php - maybe in index.php or in a config file.

index.php is unable to find functions.php because the include path is blank.

~bud

tcjay
12-18-01, 11:02 PM
I am installing a guest book. I will look through the config and index files for a place to input the path.

The readme.file says just to type in www.needlepointbackbay.com/kisgb/index.php and presto. It automatically loads another index file for set up and this is where the error arises.

The config file has a list of paths........
##################################################
# Path and Security #
##################################################
$language = "english.lang.php";
$path_to_gb = "kisgb.csv.php";
$path_to_images = "images";
$path_to_languages = "languages";
$path_to_themes = "themes";
$path_to_docs = "docs";
$admin_id = "admin";
$admin_pw = "password";
$admin_from_web = false;
$version = "v2.6";
$myIP = "*";
$lock_admin_to_myIP = false;
$site_url = "http://www.needlepointbackbay.com";
$guestbook_name = "KISGB";
$guestbook_signature = "Sincerely,\n\nThe Webmaster\n$site_url";

Should I fill in the paths or is this somethting that the set up does. This is the first time though on this so I am just learning.

TIA

Tom

wwuud
12-19-01, 05:16 AM
Using a plain text editor, set line 22 of setup/index.php to read:

$default_install_path = "/www/n/needlept/htdocs/kisgb";

and see what happens.

apparently the specified "dirname(dirname($PATH_TRANSLATED))" if not returning the expected result.


Also, config.php and kisgb.csv must be writable (?? permissions 766 ??? - don't have my ftp client open right now...)

Peace,
- Earl

tcjay
12-19-01, 02:29 PM
I will give it a try and see what happens

tcjay
12-19-01, 06:03 PM
The installation works :) but now when I enter /ksgb/index.php to run the guestbook, it looks like the code from the config. file appears on the screen?

The final line is


Cannot add header information - headers already sent by (output started at /www/n/needlept/htdocs/kisgb/config.php:14) in /www/n/needlept/htdocs/kisgb/index.php on line 63

This is the line that generates the error.

if (!file_exists($path_to_gb)) {
header("Location: setup");
exit;
}

Is there a way so that the header is not sent twice

wwuud
12-21-01, 07:12 AM
It looks as though the setup did not work correctly, as it seems that it is tryong to run setup again. This could be because the setup routine did not have the needed permissions to create the path specified in $path_to_gb