Topic: Session Coding problem

I copied all files to root directory but session coding needs some correction. While opening index file it says

session_save_path() [function.session-save-path]: open_basedir restriction in Warning: session_save_path() [function.session-save-path]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/dhanshre:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/dhanshre/public_html/config.php on line 23

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/dhanshre/public_html/config.php:23) in /home/dhanshre/public_html/includes/lang/language.php on line 75

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dhanshre/public_html/config.php:23) in /home/dhanshre/public_html/includes/lang/language.php on line 75

Warning: Cannot modify header information - headers already sent by (output started at /home/dhanshre/public_html/config.php:23) in /home/dhanshre/public_html/includes/lang/language.php on line 77

So please help.

regards
sushil dikshit

Re: Session Coding problem

This is related to your server setup. You can avoid this by making small change in config.php:

@@ -9,12 +9,12 @@
    |                                                   |
    \--------------------------------------------------*/

-/*
+
    // Make sure this directory exists and is writable!
    $session_save_path = dirname(__FILE__).'/tmp/';

-*/
-    $session_save_path = session_save_path();
+
+//    $session_save_path = session_save_path();
    if (strpos($session_save_path, ";") !== false)
        $session_save_path = substr($session_save_path, strpos($session_save_path, ";") + 1);


Janusz

Re: Session Coding problem

I edited the config.php as directed by you.
i.e.

I inserted the following lines as it is

@@ -9,12 +9,12 @@
    |                                                   |
    \--------------------------------------------------*/

-/*
+
    // Make sure this directory exists and is writable!
    $session_save_path = dirname(__FILE__).'/tmp/';

-*/
-    $session_save_path = session_save_path();
+
+//    $session_save_path = session_save_path();
    if (strpos($session_save_path, ";") !== false)
        $session_save_path = substr($session_save_path, strpos($session_save_path, ";") + 1);


and removed the lines given below

    |                                                   |
    \--------------------------------------------------*/

/*
    // Make sure this directory exists and is writable!
    $session_save_path = dirname(__FILE__).'/tmp/';

*/
    $session_save_path = session_save_path();
    if (strpos($session_save_path, ";") !== false)
          $session_save_path = substr($session_save_path, strpos($session_save_path, ";") + 1);

but I get the following errors

Parse error: syntax error, unexpected T_IF in /home/dhanshre/public_html/bholenath/config.php on line 22

I need your help because my server admin is not able to help me. Please write exactly what I have to insert and what is to remove.

regards
sushil dikshit

Re: Session Coding problem

Sir,

I have got the solution at

https://frontaccounting.com/punbb/viewtopic.php?id=7


thanks a lot

regards
sushil dikshit
kanpur

Re: Session Coding problem

One more thing I have done the change as mentioned at https://frontaccounting.com/punbb/viewtopic.php?id=7 and it is working fine.

regards

Re: Session Coding problem

I've noticed a little misunderstanding.
The attached text in my previousd post was patch to apply with standard 'patch' utility, not to insert as it was smile.

Anyway I'm glad all works right for You.

Regards
Janusz