Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2004, 02:19 PM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Permission denied message in Ch. 2

Greetings. I'm hoping I can get a bit of assistance. I'm working through the Beginning PHP/MySQl book, and I believe I've hit a snag in Chapter 2.
When I try to run the following code, I get the following errors.
I'm not on my own server (haven't set up MySQL or PHP yet), but instead I'm using a hosting service (Linux server). As a result, I can't check the session.save_path in the php config file.
PHP works on the hosts server as I can look at a phpinfo.php file and other scripts work including the previous scripts in the book.
Code:
<?php
session_start();
$_SESSION['username']="Joe12345";
$_SESSION['authuser']=1;
?>
<HTML>
<HEAD>
<TITLE>Find my Favorite Movie!</TITLE>
</HEAD>
<BODY>
<?php
     $myfavmovie=urlencode("Life of Brian");
     echo "<a href='http://localhost/moviesite.php?favmovie=$myfavmovie'>";
     echo "Click here to see information about my favorite movie!";
     echo "</a>";
?>
</BODY>
</HTML>
gives the following errors:
Code:
Warning: session_start(): open(/hsphere/local/home/rela/tmp/sess_e395dfaad86a77504fa936fd93b40aa9, O_RDWR) failed: Permission denied (13) in /home/hsphere/local/home/rela/domain.com/book/movie1.php on line 2

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hsphere/local/home/rela/domain.com/book/movie1.php:2) in /home/hsphere/local/home/rela/domain.com/book/movie1.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hsphere/local/home/rela/domain.com/book/movie1.php:2) in /home/hsphere/local/home/rela/domain.com/book/movie1.php on line 2
Click here to see information about my favorite movie! 
Warning: Unknown(): open(/hsphere/local/home/rela/tmp/sess_e395dfaad86a77504fa936fd93b40aa9, 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 (/hsphere/local/home/rela/tmp) in Unknown on line 0
I replaced my domain above with "domain.com" but it actually had my domain name.
It's the permission denied part that has me worried. Do I need to have my hosting service change permissions for the /tmp directory? And if so, what should the permissions be?

Many thanks,
SC

 
Old November 24th, 2004, 04:26 PM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never mind. The answer was to chmod the /tmp dir to 777
It all works now.
SC






Similar Threads
Thread Thread Starter Forum Replies Last Post
(0x800A0046) Permission denied,not IIS permission! David Hay Classic ASP Basics 3 April 30th, 2006 10:47 PM
Permission denied zah_amir Classic ASP Databases 1 January 24th, 2006 11:45 PM
Permission denied tksarun Classic ASP Components 0 March 11th, 2005 03:01 AM
Permission Denied hamidmq Javascript How-To 2 March 10th, 2005 09:41 AM
Permission Denied einstein Linux 1 December 10th, 2003 09:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.