 |
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
|
|
|
|

December 11th, 2004, 07:40 PM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem - PHP - localhost
Hello,
Iâm having trouble activating PHP scripts on my testing server. (localhost) I have Apache, PHP and MySql installed and I get the âIf this works we really did itâ returned to me that is supposed to indicate that the three programmes are working.
At the moment I am trying to get a login page to work. (Beginning PHP, Apache, MySQL Web Development, Chapter 11 page 322). I have the three pages completed âtemplate.phpâ, âauth.inc.phpâ and âlogin.phpâ. However when I launch my template page I get this information at the top of the login.php page that appears.
Notice: A session had already been started - ignoring session_start () in C:\Program Files\Apache Group\Apache2\test\auth.inc.php on line 2
I can fill in the username and password, hit enter and then get that same message again.
I can run those same files on my remote server without any problems at all, so there does not appear to be anything wrong with the files. Itâs just on my localhost where I have difficulty so it must have something to do with the local installation or configure files but Iâve gone through them several times and canât find anything.
Any suggestions would be very much appreciated.
Peter
|
|

December 11th, 2004, 10:11 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Check php.ini, is session.auto_start set to 1 or 0?
Also make sure you haven't called session_start() more than once on the same page.
hth,
-Snib - http://www.snibworks.com
Where will you be in 100 years?
|
|

December 12th, 2004, 11:48 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello,
Thank-you for responding. I checked php.ini session.auto_start and it was set to '0'. I tried it at '1', but it didn't make any difference so I changed it back to '0' I checked to make sure that I don't have session_start more than once on a page.
What I do have:
At the top of the auth.inc.php page is:
session_start();
if ($_SESSION['logged'] != 1)
At the top of the login.php page is:
session_start();
$_SESSION['logged'] = 0;
In addition: the login guards a search page which has a php search engine. Again this works just fine on the remote server but the search function will not work on localhost?
Thank-you again, Peter
|
|
 |