The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Bugs Deffently need help on this one [SOLVED]

Found a bug? Tell us!!
kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 4:22 pm

hi got one that need to be solved.
first time i go to the blog i get this:
Notice: Undefined index: QUERY_STRING in C:\path-to-my-server-root\blog\serendipity_config.inc.php on line 26
written at the botten of my blog.

in php i have set my domain in the session.cookie_domain and after 1 login it dosnt show anymore.

but if i close my browser and go to the blog i comes back, how do i fix this. dont want it to show my server path like that (just a bit security happy).

greetings
kento
Last edited by kento on Mon Mar 21, 2011 7:37 pm, edited 1 time in total.

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 4:30 pm

Whats your php.ini error_reporting setting?
It should be good to have this (E_ALL & ~E_NOTICE), meaning show all errors, but do not show NOTICES.
Does your php also allow $_SERVER vars?
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 4:38 pm

Timbalu wrote:Whats your php.ini error_reporting setting?
It should be good to have this (E_ALL & ~E_NOTICE), meaning show all errors, but do not show NOTICES.
Does your php also allow $_SERVER vars?

from my php.ini

; error_reporting
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED

; html_errors
; Default Value: On
; Development Value: On
; Production value: Off

; log_errors
; Default Value: Off
; Development Value: On
; Production Value: On

thats the one?

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 4:46 pm

Please see the actual settings later in the document for more details as to why
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 4:53 pm

Timbalu wrote:Please see the actual settings later in the document for more details as to why
error_reporting = E_ALL & ~E_NOTICE
display_errors = On

now the php.ini =

; display_errors
Default Value: On
; Development Value: On
; Production Value: Off

; error_reporting
Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED

Result:

Warning: date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\path\blog\include\compat.inc.php on line 322

Fatal error: Call to undefined function mysql_connect() in C:\path\blog\include\db\mysql.inc.php on line 270

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 4:58 pm

NO no, leave the ; where it is.
The part of the php.ini you are looking is somewhere on top and is some sort of explanation, mine is somewhere in the middle (beneath line 500)

If you solved that which Server are you using? Apache, IIS or ??
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 5:01 pm

Timbalu wrote:NO no, leave the ; where it is.
The part of the php.ini you are looking is somewhere on top and is some sort of explanation, mine is somewhere in the middle (beneath line 500)

If you solved that which Server are you using? Apache, IIS or ??

windows abyss server.

ok wrong place i looked in the php.ini (damn LOL).
alot to look at, but dont get it, becource its only to i have logged on then it dosnt show that Notice anymore.

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 5:04 pm

belive its fixed (display_errors = Off) in php.ini :-)

thanx again for your help, now its seams safe all the way.

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 5:14 pm

I don't know Abyss web server, but I do know that IIS does not support all $_SERVER vars. This might be the same for Abyss...

So please check in abyss forum, if is, what you need, to support $_SERVER['QUERY_STRING'] and some more. Maybe there is a problem with $_SESSION vars too.

We can't really support this here in serendipity forum. But if you find out what is needed to change to support Abyss with Serendipity please report here.
Regards,
Ian

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 5:16 pm

display_errors = Off :shock: is unsafe and not good to have.
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 5:18 pm

Timbalu wrote:display_errors = Off :shock: is unsafe and not good to have.

then how do i fix this... im not that good at php and those errors.. and cant se why it comes with that error when the session file is made and all.

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 5:21 pm

kento wrote:then how do i fix this... im not that good at php and those errors.. and cant se why it comes with that error when the session file is made and all.

error_reporting = E_ALL & ~E_NOTICE

And read my vote concerning Abyss web server and the $_SERVER/$_SESSION variables.
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 5:32 pm

Timbalu wrote:
kento wrote:then how do i fix this... im not that good at php and those errors.. and cant se why it comes with that error when the session file is made and all.

error_reporting = E_ALL & ~E_NOTICE

And read my vote concerning Abyss web server and the $_SERVER/$_SESSION variables.

ok found out that if i surf the blog for arround 2-3 links the nitice goes away, so for me it looks like this:
it makes the session file, but on page load it disn't gives enough time for the script to have a look at that session file. else that notice would stay right?
and found out that there is 3 levels of error log for php in the webserver. none/some/all (its says a bit diffrent but thats about it. so if i set it to log all that should help right?

User avatar
Timbalu
Regular
 
Posts: 3563
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Mon Mar 21, 2011 5:50 pm

Having errors on with E_ALL or E_STRICT with not showing ~E_NOTICES is state of the art.
Setting error_reporting to log, does not solve a possible issue with your webserver!

As I said before, I think Abyss does not give back all $_SERVER (and maybe &_SESSION) vars needed by Serendipity.
Before I search all SERVER and SESSION vars in Serendipity, I ask you to tell me, which of them does Abyss support. Maybe there is a documentation telling us, or you have to write a test.php file
Code: Select all
<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';

echo <br /><br />';

echo '<pre>';
print_r($_SESSION);
echo '</pre>';
?>


This will output a bunch of variable with the name and the values like
Code: Select all
    [QUERY_STRING] =>
    [REQUEST_URI] => /path/toblog/html/

Post us the names and only leave the values which are safe to be posted here. Do not delete empty ones like the one in my example.
Regards,
Ian

kento
Regular
 
Posts: 31
Joined: Sun Mar 20, 2011 1:38 pm

Postby kento » Mon Mar 21, 2011 6:00 pm

running (as test.php)

<?php
echo '<pre>';
print_r($_SERVER);
echo '</pre>';

echo <br /><br />';

echo '<pre>';
print_r($_SESSION);
echo '</pre>';
?>

gives:

Parse error: syntax error, unexpected '<' in C:\path\htdocs\test.php on line 6

Next


Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests

cron