PHPee.com PHP development forum
Error Message on Setup Page

 
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support
View previous topic :: View next topic  
Author Message
veronicak



Joined: 25 Jan 2005
Posts: 12

PostPosted: Tue Jan 25, 2005 8:33 pm    Post subject: Error Message on Setup Page Reply with quote
I have the following errors on the setup page and I have read through all the other postings. However, removing line #74 did not change anything as was suggested in an earlier message.

Warning: session_start(): open(/tmp/php-ses/sess_9195d1348054d2fe642d8889472c898d, O_RDWR) failed: No such file or directory (2) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 160

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:160) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 160

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:160) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 160

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:160) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:160) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:160) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 16


Here is my coding on the config.inc.php page:

///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2003 Philip Iezzi [] //
// https://phpee.com //
// //
// This file is part of PowerPhlogger. //
// //
// PowerPhlogger 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. //
// //
// PowerPhlogger 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 PowerPhlogger; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
///////////////////////////////////////////////////////////////////////////////

// $Id: config.inc.php,v 1.14 2003/08/18 19:10:02 cvs_iezzi Exp $

if (!defined('__GOT_MYSQL__')){

################################################################################
# mySQL SETTINGS #
################################################################################
define('PPHL_DB_HOST' , 'mysql.mediafrogg.com'); // MySQL server hostname
define('PPHL_DB_NAME' , 'mediafro'); // name of your database
define('PPHL_DB_USER' , 'mediafro'); // username
define('PPHL_DB_PWD' , '*******'); // password

######## optional settings: ####################################################

// Leaving this empty defaults to port 3306
define('PPHL_DB_PORT' , '');
// To use persistent connections, change this to TRUE
define('PPHL_DB_PERSISTENT', FALSE);

//in case you need a prefix in front of your tables...
define('PPHL_DB_PREFIX' , 'pphl_');

//please enter your old prefix here. The update-script
//going to change all your tables automatically to the
//new prefix set above.
define('PPHL_DB_PREFIX_OLD', '');
################################################################################

//-------------------------------------------------------------------------------
// nothing needs to be changed beyond this line.
// All further settings can be configured in the setup script: /admin/setup.php
//-------------------------------------------------------------------------------

/* connect to mySQL database */
$cfunction = (PPHL_DB_PERSISTENT) ? 'mysql_pconnect' : 'mysql_connect';
if(!function_exists($cfunction)) die('MySQL support is not available in this PHP configuration!');
function str_is_int($str) {
$var = intval($str);
return ("$str" == "$var");
}
$mysql_port = (str_is_int(PPHL_DB_PORT)) ? ':'.PPHL_DB_PORT : '';
$connected = @$cfunction(PPHL_DB_HOST.$mysql_port, PPHL_DB_USER, PPHL_DB_PWD)
or die("unable to connect to database on '".PPHL_DB_HOST."' with user '".PPHL_DB_USER."'
".
'('.mysql_errno().') '.mysql_error().'
'.
"Please check your settings in config.inc.php !
");
mysql_select_db(PPHL_DB_NAME) or die("Please first create your database '".PPHL_DB_NAME."' and make sure your user got the correct access rights on it !"); ;

define('__GOT_MYSQL__', 1);
}
?>

Here is the web address:

http://www.mediafrogg.com/pphlogger/admin/setup.php

Please help!!!

Thanks!


/reason for edit : starred out your password, be carefull to never release any passwords or confidential information onto public pages, Lionel Smile
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 927
Location: London, UK

PostPosted: Wed Jan 26, 2005 1:15 am    Post subject: Reply with quote
Your sessions don't appear to be setup correctly for PHP.
Get your host to look at the path for where the sessions files are being stored to verify it is correct.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
veronicak



Joined: 25 Jan 2005
Posts: 12

PostPosted: Wed Jan 26, 2005 2:07 pm    Post subject: have path, but dont know what to do with it Reply with quote
I have contacted the host and they gave me the path /usr/local/bin/php however I am not familiar with php and where this path should be placed.

My line 160 on the main.php page is as follows:

if (!defined('NO_SESS') && defined('PHP_SESS')) session_start();

there is also a blank line after it.

Can you please help?

Thanks.
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 927
Location: London, UK

PostPosted: Wed Jan 26, 2005 5:20 pm    Post subject: Reply with quote
This first error message:
Quote:

Warning: session_start(): open(/tmp/php-ses/sess_9195d1348054d2fe642d8889472c898d, O_RDWR) failed: No such file or directory (2) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 160


States that PHP is having problems reading the session file from the /tmp directory.
Copy that error message to your host and see what they say.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
veronicak



Joined: 25 Jan 2005
Posts: 12

PostPosted: Wed Jan 26, 2005 5:43 pm    Post subject: Reply with quote
This is what they said:

I am getting an error message when attempting to write /tmp space using PHP.
 
When using the “session_start” function in an php script you get this error:

Warning: open(/tmp/php-es/sess_dd2b92bdf6a405f4a63ef5a9e999aded, O_RDWR) failed: No such file or directory (2) in /c3/xeno5993/phpwebsite/open_session.php on line 2
 
This is because you don’t have permissions to the “/tmp” directory on the server where the php.ini specifies that sessions are stored. However, by using the “session_save_path” function you can specify where sessions are saved. Specify the path to a folder within your site for sessions to be saved, and override the setting specified in the php.ini. Below is an example:

NOTE: It is important that the “session_save_path” function is called before the “session_start” function.

PHP Session Path Function:
Syntax: session_save_path('');

session_save_path("/a1/abcd6789/tmp/session");
session_start();
// create dir

?>

Note: You should replace the "/a1/abcd6789" with the appropriate path for your user data.
 
(Please be advised that ValueWeb cannot support your custom programming or scripts)



so on what file would I place this new code if you suggest I do and how do i accomplish this?

Thanks for all your help so far!
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 927
Location: London, UK

PostPosted: Wed Jan 26, 2005 6:22 pm    Post subject: Reply with quote
PHP writes to the /tmp partition, not you as a user.
If you host has disabled or is attempting to disable session writing to the /tmp directory, they're a little unusual.

Open main.php
Go to line 160 or there abouts.
Find:
PHP:
if (!defined('NO_SESS') && defined('PHP_SESS')) session_start();

Change to:
PHP:
if (!defined('NO_SESS') && defined('PHP_SESS')) {
session_save_path("/your/path");
session_start();
}


David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
veronicak



Joined: 25 Jan 2005
Posts: 12

PostPosted: Wed Jan 26, 2005 6:34 pm    Post subject: Reply with quote
Sad I am still getting the same errors even with the new code.

include LIB_DEFINES;

/* start session */
if (!defined('NO_SESS') && defined('PHP_SESS')) {
session_save_path("/usr/local/bin/php/tmp/session");
session_start();
}

/*
* No matter if register_globals is turned Off or on, always get
* the global variables from the $HTTP_*_VARS arrays. (security)
* In PHP 4.1 we're getting the variables from the global $_GET,
* $_POST, $_COOKIE ... arrays.
*/

my path section is what they gave me, but i also tried /mediafrogg/sessions

its giving me the error message:
Warning: session_start(): open(/usr/local/bin/php/tmp/session/sess_c9fd3671063c7896ee0159a3be75ff63, O_RDWR) failed: Not a directory (20) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 162

so it is the session start line that is the problem now

why is this not working Sad
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 927
Location: London, UK

PostPosted: Thu Jan 27, 2005 12:52 am    Post subject: Reply with quote
You need to specify a path which you have access to "as a customer" so your host kindly puts it.

For instance, the path on my server is this: /home/username/public_html/pphlogger

I've no idea what yours is so you'll have to work that part out for yourself i'm afraid.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
veronicak



Joined: 25 Jan 2005
Posts: 12

PostPosted: Thu Jan 27, 2005 3:20 pm    Post subject: Reply with quote
Ok. I got the setup page and admin page to come up properly!!!

Actually, depending on what path I put down, either the admin page works right or if I use a different path, the home page for user login works right. Why is this?

Also, I only get tracking for one page, the index page, and nothing else. I checked my coding and all is right for the tracking.

Warning: session_start(): open(../sessions//sess_b8f5e3ee5b8569611b0d5c9f592ee855, O_RDWR) failed: No such file or directory (2) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 162

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:162) in /nfs/cust/6/47/57/575746/web/pphlogger/main.php on line 162

Warning: session_destroy(): Session object destruction failed in /nfs/cust/6/47/57/575746/web/pphlogger/index.php on line 18

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:162) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:162) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/47/57/575746/web/pphlogger/main.php:162) in /nfs/cust/6/47/57/575746/web/pphlogger/include/head.inc.php on line 16
Back to top
View user's profile Send private message
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger Support All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11
Theme design based on Team 101 Designs, modified by Philip Iezzi