Deffently need help on this one [SOLVED]

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

Deffently need help on this one [SOLVED]

Post by kento »

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 6:37 pm, edited 1 time in total.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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

thanx again for your help, now its seams safe all the way.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Deffently need help on this one arggggggggg

Post by Timbalu »

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

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kento
Regular
Posts: 31
Joined: Sun Mar 20, 2011 12:38 pm
Contact:

Re: Deffently need help on this one arggggggggg

Post by kento »

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
Post Reply