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 April 15th, 2005, 04:01 PM
Registered User
 
Join Date: Apr 2005
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.
 
Old April 15th, 2005, 05:45 PM
Registered User
 
Join Date: Apr 2005
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;
 
Old April 26th, 2005, 06:20 PM
Registered User
 
Join Date: Apr 2005
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.

 
Old May 6th, 2005, 02:51 PM
Registered User
 
Join Date: May 2005
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
 
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
 
Old January 30th, 2011, 08:44 AM
Friend of Wrox
 
Join Date: May 2005
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!





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 7th, 2008 11:57 PM
chapter 16 - Problems with sessions. kb90 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 April 11th, 2008 09: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 02: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





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