Thread: Sessions.php

Results 1 to 10 of 10
  1. #1

    Sessions.php

    I am getting the following errors


    I've been searching the forums in here for a couple of hours now and can't seem to find anything.







    Warning: session_save_path() [function.session-save-path]: open_basedir restriction in effect. File(/home/hri/public_html/cart/cache) is not within the allowed path(s): (/home/hebtv:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/hebtv/public_html/store/includes/functions/sessions.php on line 143

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/hebtv/public_html/store/includes/functions/sessions.php:143) in /home/hebtv/public_html/store/includes/functions/sessions.php on line 100

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hebtv/public_html/store/includes/functions/sessions.php:143) in /home/hebtv/public_html/store/includes/functions/sessions.php on line 100

    Warning: Cannot modify header information - headers already sent by (output started at /home/hebtv/public_html/store/includes/functions/sessions.php:143) in /home/hebtv/public_html/store/includes/init_includes/init_templates.php on line 78

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Sessions.php

    Admin->Configuration->Sessions->Session Directory ... needs to be set to a valid path on your server

    Right now it's set to:
    home/hri/public_html/cart/cache

    but should be set to:
    home/hebtv/public_html/store/cache


    You might also check the settings in your configure.php files for DIR_FS_SQL_CACHE
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3

    Default Re: Sessions.php

    Quote Originally Posted by DrByte
    Admin->Configuration->Sessions->Session Directory ... needs to be set to a valid path on your server

    Right now it's set to:
    home/hri/public_html/cart/cache

    but should be set to:
    home/hebtv/public_html/store/cache


    You might also check the settings in your configure.php files for DIR_FS_SQL_CACHE


    That is actually how it reads --it reads ...home/hebtv/... but it doesn't seem to be working properly --I just changed servers and i've been able to just transfer everything and modify the configuire.php before I'm just not sure why it's not working this time


    my configuire.php reads as follows(With the private data removed)

    <?php
    /**
    *
    * @package Configuration Settings
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    */


    // Define the webserver and path parameters
    // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
    // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
    define('HTTP_SERVER', 'http://www.hebtv.net');
    define('HTTPS_SERVER', 'http://www.hebtv.net');

    // Use secure webserver for checkout procedure?
    define('ENABLE_SSL', 'true');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
    // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
    define('DIR_WS_CATALOG', '/store/');
    define('DIR_WS_HTTPS_CATALOG', '/store/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

    define('DIR_WS_PHPBB', '/');

    // * DIR_FS_* = Filesystem directories (local/physical)
    //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
    define('DIR_FS_CATALOG', '/home/hebtv/public_html/store/');

    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
    define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
    define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
    define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

    // define our database connection
    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', '');
    define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
    define('DB_SERVER_USERNAME', '*****');
    define('DB_SERVER_PASSWORD', '******');
    define('DB_DATABASE', 'hebtv_store');
    define('USE_PCONNECT', 'false'); // use persistent connections?
    define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

    // The next 2 "defines" are for SQL cache support.
    // For SQL_CACHE_METHOD, you can select from: none, database, or file
    // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
    // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
    // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
    define('SQL_CACHE_METHOD', 'database');
    define('DIR_FS_SQL_CACHE', '/home/hebtv/public_html/store/cache');

    ?>

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Sessions.php

    Is there anything here that may help?

    http://www.zen-cart.com/wiki/index.p...Switch_Servers
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5

    Default Re: Sessions.php

    Sorry none of that did me any good. I learned all that the last time I switched servers but I didn't have this problem the last time.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Sessions.php

    Quote Originally Posted by Chris The Ninja
    Warning: session_save_path() [function.session-save-path]: open_basedir restriction in effect. File(/home/hri/public_html/cart/cache) is not within the allowed path(s): (/home/hebtv:/usr/lib/php:/usr/local/lib/php:/tmp)
    1. Zen Cart is attempting to start a PHP session.

    2. It is being told from your configuration that the place to store its temporary session information is at:
    /home/hri/public_html/cart/cache

    3. But, that is an invalid path.
    The server is reporting that valid paths start with these patterns:
    /home/hebtv
    /usr/lib/php
    /usr/local/lib/php
    /tmp

    4. The only place Zen Cart will get the foldername for temporary session storage is from your setting in Admin->Configuration->Sessions->Session Directory
    Specifically, in your database, this is the configuration_key of SESSION_WRITE_DIRECTORY in your configuration table.
    Changing it in the admin area changes it in the table.


    The fix_cache_key.php utility, documented in the link I posted above, lets you set this without even logging in to the admin.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7

    Default Re: Sessions.php

    Quote Originally Posted by DrByte

    The fix_cache_key.php utility, documented in the link I posted above, lets you set this without even logging in to the admin.
    I installed and attempted this and even got the same errors on the fix_cache_key.php page. It did not work.


    my store is located at http://www.hebtv.net/store if you'd like to see the error as they appear on page

  8. #8

    Default Re: Sessions.php

    Quote Originally Posted by Chris The Ninja
    I installed and attempted this and even got the same errors on the fix_cache_key.php page. It did not work.


    my store is located at http://www.hebtv.net/store if you'd like to see the error as they appear on page
    Nevermind on that one that one did work but now I am getting an error in my admin so that I can't loggin:

    0 DB_ERROR_NOT_CONNECTED
    in:
    [delete from db_cache]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Sessions.php

    0 DB_ERROR_NOT_CONNECTED
    means that the information in the configure.php file for database access doesn't match the required settings for your server's database.

    - username
    - password
    - database host/server
    - database name

    The most common cause of this is a user that hasn't been granted access to the database, or incorrect information, or a true problem on the database server.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10

    Idea or Suggestion Re: Sessions.php

    I figured it out:!!

    // define our database connection
    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', 'hebtv_');
    define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
    define('DB_SERVER_USERNAME', '*******');
    define('DB_SERVER_PASSWORD', '*******');
    define('DB_DATABASE', 'hebtv_store');
    define('USE_PCONNECT', 'false'); // use persistent connections?
    define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'


    I was missing the db_prefix on my old sever it didn't need a prefix but it would seem on this one it does

 

 

Similar Threads

  1. sessions.php issue. cant login to admin? PHP 5.2.0
    By Slashdot in forum General Questions
    Replies: 9
    Last Post: 30 Nov 2006, 12:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg