waynemac Posted February 9, 2004 Posted February 9, 2004 (edited) Was doing something on my site last night and this happened... ----------- Parse error: parse error in /home/my_user_name/public_html/phpwebsite/mod/menuman/class/Menuman.php on line 267 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/my_user_name/public_html/phpwebsite/mod/menuman/class/Menuman.php:267) in /home/my_user_name/public_html/phpwebsite/core/Core.php on line 293 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/my_user_name/public_html/phpwebsite/mod/menuman/class/Menuman.php:267) in /home/my_user_name/public_html/phpwebsite/core/Core.php on line 293 Fatal error: Call to a member function on a non-object in /home/my_user_name/public_html/phpwebsite/mod/users/class/Forms.php on line 662 ------------ Anyone got any ideas? Wayne [Edit: I removed your home directory's name. No need for everyone to know it ] Edited February 9, 2004 by TCH-Raul Quote
TCH-Rick Posted February 9, 2004 Posted February 9, 2004 You might try repairing the database in PhpMyAdmin in your CPanel. Just choose your database and click Check All and then use the drop down menu to select Repair tables. Quote
kaseytraeger Posted February 9, 2004 Posted February 9, 2004 waynemac, I received almost identical errors a few months ago with a user authentication/session script in PHP. It turned out that the only thing wrong was the placement of my call to PHP. The PHP session/authentication script was the very first PHP script I ever tried using on my web site. I didn't know you needed to put the PHP call to open and verify the session before you declare <html>. So I basically had ><html> ... some code <?php ... my php session code ?> continue with the html For some weird reason, this seemed to work for a short while. Then one day, it didn't work any more and I received errors identical to yours. When I finally learned what my error was (that the <?php should come before the <html>), I made the appropriate changes, and we all lived happily ever after. My code now looks like this... ><?php session_start(); if (session_is_registered('username')){ ?> <html><head><title>You are logged in</title></head> <body bgcolor="#DEDEBA"> So, I don't know if you've made the same mistake I did, but it's just a thought. Good luck! Kasey Quote
vendlus Posted February 10, 2004 Posted February 10, 2004 I agree with Kasey. It's probably where the code is located. You must declare any cookie info before you write any HTML at all. So just check for your cookies first thing and then start the <HTML> part afterwards. Quote
DarqFlare Posted February 10, 2004 Posted February 10, 2004 Yep. They're right. I usually run all of my PHP coding before the HTML output. By convention, I'll run all of the PHP code up top and have it store any HTML output in variables, then generate the HTML output after the PHP-intensive things have been executed and evaluated. The only problem with doing it that way is that if there's a holdup in the PHP script execution, there's no output of HTML until it completes. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.