Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 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 September 29th, 2006, 01:44 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2

In chapter 2 page 48, when dealing with passing info by session, I copied the code exactly but my server is telling me error on line 5 which is" if ($_SESSION['authuser'] !=1) { "


Is something wrong with my line of code or the server.

I upload my pages to a dreamhost server where my website is.
http://www.nicholasrice.net/movie1.php

is the first part of the program it takes you to
http://www.nicholasrie.net/moviesite.php where the error is.

btw i think i have the first eddition copyright 2005

Thanks Nick



 
Old February 4th, 2007, 11:37 AM
Registered User
 
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to LawrenceX
Default

I myself have a problem with passing session variables. I've gone through all the steps carefully but still to no avail. I'm using the latest PHP 5 and apache 2.2. I greatly suspect it's something to do with the configuration somewhere in the browsers (I'm using IE6 and Firefox 2) regarding the session cookies.

 
Old February 7th, 2007, 02:33 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not sure of this will help or not. I fought with chapter 2 for 3 days. What finally worked was looking at the phpinfo() screen. I found that I had set up my php.ini file in a different directory than I thought. I looked at the phpinfo and none of the changes I made to session.save_path or session.use_cookies appeared. I set the first to my directory in the format "d:\directory\subdirectory" and session.use_cookies to 1. When I scrolled farther down I found that it was looking at my php.ini file in my php5 directory and not in my Windows directory (which was the one I had been changing). Once I copied from Windows to php5 everything worked.

 
Old February 16th, 2007, 02:52 PM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there's one little change that u'll have to make to the code u copied to ur server's root directory....(In the file named movie1-rev03.php u hav to change the url given to point to the file moviesite-rev05.php instaed of the default url given as moviesite.php) ...
If this solves ur problem then great.. if not then , scrap back on the thread and i'll try to see wht could be wrong.

 
Old March 5th, 2007, 01:46 AM
Authorized User
 
Join Date: Mar 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to malay mehta Send a message via Yahoo to malay mehta
Default

Hi all there,
its nice looking to the queries from you all.Please check the php.ini file where you can see the session_save_path file and other session related files are there.
Just check the path of the variables defined and the pages that you all might be using.Please dont set any path at any one place else you have to set it at all the
pages...

Hoping it might help to some of the guys,,

Bye,,,

Malay Mehta,
[email protected]

malay mehta
 
Old March 11th, 2007, 08:01 PM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I hope someone sees this because the last post was in March! Everything has been working fine until I got to using Functions on page 62. I couldn't get it to work so I downloaded the code and even that didn't work. I found the session_save_path in the PHP.ini and mine says /Applications/MAMP/temp/php (I'm working on a Mac and I don't want any wisecracks! ha ha). When I click on any of the links, all I get is a blank page. I am not a programmer, so PLEASE, if anyone can help me, try to make it for a "beginner level." THANKS!

Anne

 
Old March 12th, 2007, 09:09 AM
Registered User
 
Join Date: Mar 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, I'm replying to my own message. This is what makes programming so difficult: it's really easy to miss something, even something glaring. I spent all kinds of time going through my code, looking for a missing bracket, semi-colon, etc., and could not find it. So, this morning when I looked again at the code I had downloaded, there it was--an entire line of code I had left out at the very bottom, where it should have been so easy to see. Now, I have moved on to the next revision that uses an array and I got that to work on the first try. Duh!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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