Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 15th, 2005, 05:01 PM
Registered User
 
Join Date: Apr 2005
Location: , , United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 16, Message Board Header Problems

I have been attempting to implement the Comic Book Appreaction forum described in Chapter 16, however, i am getting the following error:
"Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at \\premfs17\sites\premium17\lsrl\webroot\MessageBoa rd\conn.php:26) in \\premfs17\sites\premium17\lsrl\webroot\MessageBoa rd\transact-user.php on line 19
Could not redirect; Headers already sent (output)."

I have read about these header problems in the book but I am new to php and I would be grateful for any assistance in resolving these issues.
Reply With Quote
  #2 (permalink)  
Old April 15th, 2005, 06:45 PM
Registered User
 
Join Date: Apr 2005
Location: , , United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have now solved the above problem, had some blank spaces at the end of my conn.php file. However i now have another problem, my index.php page says:

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod FROM forum_forum f LEFT JOIN forum_posts p ON f.id"

Any ideas?? The full sql statement is as below:

$sql = <<<EOS
  SELECT f.id as id, f.forum_name as forum,
    f.forum_desc as description,
    count(forum_id) as threads, u.name as mod
  FROM forum_forum f
  LEFT JOIN forum_posts p
  ON f.id = p.forum_id
  AND p.topic_id=0
  LEFT JOIN forum_users u
  ON f.forum_moderator = u.id
  GROUP BY f.id
EOS;
Reply With Quote
  #3 (permalink)  
Old April 26th, 2005, 07:20 PM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yer I have the same error.

I posted on a different section of these forums after some others had the same problem 2.

Not a clue what the problem vould be to be honest.

Any help would be apreciated

Cheers.

Reply With Quote
  #4 (permalink)  
Old May 6th, 2005, 03:51 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:D

Code should read:

$sql = <<<EOS
  SELECT f.id as id, f.forum_name as forum,
    f.forum_desc as description,
    count(forum_id) as threads, u.name as 'mod'
  FROM forum_forum f
  LEFT JOIN forum_posts p
  ON f.id = p.forum_id
  AND p.topic_id=0
  LEFT JOIN forum_users u
  ON f.forum_moderator = u.id
  GROUP BY f.id
EOS;

It should be 'mod' and not mod cos the latter is a reserved ...

Ebony
Reply With Quote
  #5 (permalink)  
Old January 26th, 2011, 10:49 AM
sun sun is offline
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default header error

i meant while implementing a header with my book Beginning PHP, Apache,
MySQL® Web Development,
am getting header already sent error message i.e
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\chapter6\commit.php:9) in C:\xampp\htdocs\chapter6\commit.php on line 137
Reply With Quote
  #6 (permalink)  
Old January 30th, 2011, 08:44 AM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hei!

The error message occurs due to some code you have implemented before the headerinfo (Html- and w3-info) in your script. It might be "session()" or anything else. Use of blank spaces will also cause problems. Read some of the first chapters in the book!

grstad
__________________
Internet has become favorable with that tool...thank you Tim Berners-Lee!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems in chapter 15 and 16 sgeorgiev BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 0 May 8th, 2008 12:57 AM
chapter 16 - Problems with sessions. kb90 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 April 11th, 2008 10:07 AM
Ch 16 Bulletin Board Code Problem bigkevracer BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 March 10th, 2008 03:52 PM
Chapter 16 problems silas428 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 4th, 2008 06:32 PM
Adding Categories to Message board in Ch.16 PlaGuE BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 November 19th, 2005 08:24 PM



All times are GMT -4. The time now is 01:52 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.