Recent Topics

1 Jun 11, 2004 21:52    

I've installed b2evolution on my personal machine, which is running Winodows 2000 and IIS 5.0. It runs almost completely, except I get the following errors on every blog and the index.php login:

Notice: Undefined index: SCRIPT_FILENAME in c:\inetpub\wwwroot\blog\skins\custom\_bloglist.php on line 8

Any idea how to fix this?


2 Jun 11, 2004 22:10


We definitely do aim towards making b2evolution compatible with almost all versions of IIS, so I'm eager to solve the problem, as it may prevent others in the future.

1. What version of b2evolution are you using? I ask because we've recently updated the IIS support for this kind of thing.

2. Check this out:
Does the solution there solve your problem?

3. If you're still stumped, then open up
in your web browser. Look for any of the _SERVER environment variables that look like they're set to something like:
Let us know which line this appears on. That'll help us prevent this in the future, if it's a case we're not already testing for.

3 Jun 11, 2004 22:18


Just realized, we use $_SERVER['SCRIPT_NAME'] in other places, too!

This will have to be reworked a bit, it seems. We may want to set this environment var when finding the $ReqPath, if it's missing.

I'll post updates here.

Whoops, we're talking about $_SERVER['SCRIPT_FILENAME'], which is used in almost all of the skin files, not $_SERVER['SCRIPT_NAME'] which is only used once, and won't generate an error if its not set.

4 Jun 12, 2004 04:03

Open up your php.ini file in your favorite text editor. (By default, this will reside at C:\windows\php.ini.)

Search for this term

I'm guessing that's set to display notices, yes?

That line is there to try to prevent people from going directly to the skin templates, but lacking it is not really a problem. It just means that you'll usually see a blank page or an error message rather than "Please, do not access this page directly."

I recommend setting your error_reporting directive to something less strict. wrote:

error_reporting integer

Set the error reporting level. The parameter is either an integer representing a bit field, or named constants. The error_reporting levels and constants are described in Predefined Constants, and in php.ini. To set at runtime, use the error_reporting() function. See also the display_errors directive.

In PHP 4 and PHP 5 the default value is E_ALL & ~E_NOTICE. This setting does not show E_NOTICE level errors. You may want to show them during development.

Note: Enabling E_NOTICE during development has some benefits. For debugging purposes: NOTICE messages will warn you about possible bugs in your code. For example, use of unassigned values is warned. It is extremely useful to find typos and to save time for debugging. NOTICE messages will warn you about bad style. For example, $arr[item] is better to be written as $arr['item'] since PHP tries to treat "item" as constant. If it is not a constant, PHP assumes it is a string index for the array.

Note: In PHP 5 a new error level E_STRICT is available. As E_STRICT is not included within E_ALL you have to explicitly enable this kind of error level. Enabling E_STRICT during development has some benefits. STRICT messages will help you to use the latest and greatest suggested method of coding, for example warn you about using deprecated functions.

In PHP 3, the default setting is (E_ERROR | E_WARNING | E_PARSE), meaning the same thing. Note, however, that since constants are not supported in PHP 3's php3.ini, the error_reporting setting there must be numeric; hence, it is 7.

5 Jun 15, 2004 17:38


I changed my php.ini file's error reporting to:


This gets rid of the error messages on the blog. My questions are:

Is the message I received important or not?
Can I safely ignore it now?
What exactly was/is going on?
Will the error affect the operation in any meaningful way?


6 Jun 16, 2004 22:01

The message is not important, really.. it's just a check if the file has been called directly.
With this is fixed.
It tried to check the $_SERVER array's SCRIPT_FILENAME value. This is normally the filename of the running script. But in your case it was not set and therefor the notice.
The check was simply to check if the running script (SCRIPT_FILENAME) had a '_' as first character, which means that it's a file that's not meant to be called directly, like _archives.php.


7 Mar 28, 2006 20:30

I was having this same problem. this is what I did to fix it.

FYI to fixt this I changed This

		die("Please, do not access this page directly.");

to this

	if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );

My problems are gone. It was not a problem with B2E but with my skin I was using. I customized my skin, so I did not want to update it.

Form is loading...