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
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 .
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.
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;
$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 ...
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
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!