Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Can't access /tmp on host server

edited January 2008 in Vanilla 1.0 Help
I can't access /tmp on the web host's server. Below you will find their solution, but I'm not sure where they want me to put the new path. Thanks in advance. Why do I lose my PHP session variables and how do I correct this? SOULTION: Since Gate.com employs multiple servers in the web hosting cluster, customers cannot use the default PHP session path in /tmp. Instead, sessions will need to be saved in each account’s home directory. To properly configure your session path, you will want to create a folder in your /web folder called ‘tmp’ (You can use any folder name you wish. For this example, we will use ‘tmp’). Log into your Gate.com Control Panel, and select the ‘Perl Checker’ utility from the Tools menu. Near the bottom of this page, you will see a section that looks similar to this: Notice the line that reads “Absolute Path To Root.” You can determine your session_save_path by appending the folder name that you just created, ‘tmp’ in this example, to the end of the “Absolute Path to Root.” Be sure to include the appropriate slashes (/) and enclose the entire line in single quotes. Example: /nfs/cust/8/73/26/462378/web becomes '/nfs/cust/8/73/26/462378/web/tmp/' Finally, the entire line of PHP code will read: session_save_path ('/nfs/cust/8/73/26/462378/web/tmp/'); This line must appear on every PHP page, and it must appear before your session_start line.

Comments

  • Options
    Try adding that line to the top of appg/init_vanilla.php in a new line below the <?
  • Options
    edited January 2008
    Thanks. That got me a little further, but the following is what I see now.

    Warning: session_start(): open(/tmp/php-ses/sess_a4dd74f7df1d2c1a40015d45195e5788, O_RDWR) failed: Permission denied (13) in /nfs/cust/4/8/6/danriv/forum/library/People/People.Class.Authenticator.php on line 113

    Dan River Region Forum
    You are signed in

    * Click here to continue to the discussions
    * Click here to continue to the categories
    * Review new membership applicants (1 new)

    Lussumo Vanilla, Swell, and People Copyright © 2001-2006

    Warning: Unknown(): open(/tmp/php-ses/sess_a4dd74f7df1d2c1a40015d45195e5788, O_RDWR) failed: Permission denied (13) in Unknown on line 0

    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp/php-ses) in Unknown on line 0

    You can see the live page here http://www.danriverregion.com/forum/
  • Options
    Paste us the exact line you put in.
  • Options
    I created the directory /tmp on the host
    I then I put the following line in the appg/init_vanilla.php

    session_save_path (' /nfs/cust/4/8/6/danriv/tmp/');

    You'll note below where I put it.
    Thanks again

    <?php
    /*
    * Copyright 2003 Mark O'Sullivan
    * This file is part of Vanilla.
    * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    * The latest source code for Vanilla is available at www.lussumo.com
    * Contact Mark O'Sullivan at mark [at] lussumo [dot] com
    *
    * Description: Constants and objects specific to forum pages.
    */
    // Make sure this file was not accessed directly and prevent register_globals configuration array attack
    if (!defined('IN_VANILLA')) exit();
    session_save_path (' /nfs/cust/4/8/6/danriv/tmp/');
    include($Configuration['APPLICATION_PATH'].'appg/headers.php');
    include($Configuration['APPLICATION_PATH'].'appg/database.php');
    include($Configuration['DATABASE_PATH']);
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Functions.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.Database.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.'.$Configuration['DATABASE_SERVER'].'.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.SqlBuilder.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.MessageCollector.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.ErrorManager.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.ObjectFactory.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.StringManipulator.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.Context.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.Delegation.php');
    include($Configuration['LIBRARY_PATH'].'Framework/Framework.Class.Control.php');
    include($Configuration['LIBRARY_PATH'].$Configuration['AUTHENTICATION_MODULE']);
    include($Configuration['LIBRARY_PATH'].'People/People.Class.Session.php');
    include($Configuration['LIBRARY_PATH'].'People/People.Class.User.php');
  • Options
    That prefixed space may or may not have something to do with it.
  • Options
    I removed the space.
    Still no change.

    * Description: Constants and objects specific to forum pages.
    */
    // Make sure this file was not accessed directly and prevent register_globals configuration array attack
    if (!defined('IN_VANILLA')) exit();
    session_save_path('/nfs/cust/4/8/6/danriv/tmp/');
    include($Configuration['APPLICATION_PATH'].'appg/headers.php');
    include($Configuration['APPLICATION_PATH'].'appg/database.php');
  • Options
    Hmm it seems to be ignoring your session_save_path for some reason. You may want to bug your support again. Show them the error, specifically the filepath that PHP says it's trying to save the data to. Also, make absolutely sure session_start is not getting called before your session_save_path.
  • Options
    While I was changing pages in my control panel from
    https://my.gate.com/tools/mysql.htm
    to
    https://secure1.gate.com/SSL/danriv/sys/cp/tools/perl_checker.php

    the following flashed on my screen for an instant.
    After several attempts I was able to capture the message.

    find: /nfs/cust/4/8/6/danriv/./tmp: Permission denied

    I'm not sure why it's saying " /./tmp"
    As noted above I used the line - session_save_path(' /nfs/cust/4/8/6/danriv/tmp/'); after creating the directory tmp in my root.

    I'll give them a call on Monday. Phone Support is limited to business hours.

    Thanks for the suggestions.
  • Options
    Although it's strange that it says /./tmp, that shouldn't really pose a problem. '.' is identified as the current directory. What have you set as the permissions on your new tmp directory?
  • Options
    Depending on how well your server's setup you may have to set the directory to 777 permissions. If it's setup correctly however then you should be able to just use 755.
  • Options
    or 666. Should session files really need execute permission?
  • Options
    edited January 2008
    Good point, probably not. In fact, where I said 755, you can take that to mean 644.
  • Options
    It seems owner must have executable I'm using 744 and it works fine. Do you see any problem with that. Thanks for the input.
This discussion has been closed.