Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,636 members, 7,958,919 topics. Date: Thursday, 26 September 2024 at 07:22 AM |
Nairaland Forum / Science/Technology / Webmasters / Php Error. .Pls Help! (1756 Views)
I'm Getting "Warning: Session_start() [function.session-start]" Error. Pls Help / 500 Internal Server Error >>>>>> Pls Explain / I Keep Getting This Error::pls Help ::parse Error: Syntax Error, Unexpected '.', (2) (3) (4)
Php Error. .Pls Help! by Dawgzfada(m): 7:07pm On Jun 15, 2011 |
<?php Ordinarily, if username and pwd is correct, i should be taken to admwelcome.php, but it doesn't work that way. I still remain on the same index.php. Please is there anything i'm doing wrong. Thanks y'all. |
Re: Php Error. .Pls Help! by bakenda(m): 9:06am On Jun 16, 2011 |
Did you md5 hash the admin password before saving it to database? Comment out the error_reporting(0);line and let's see if any error message comes up. |
Re: Php Error. .Pls Help! by Dawgzfada(m): 9:16am On Jun 16, 2011 |
bakenda: Yes. I md5 hash the admin password. I just commented out error_reporting(0);but no difference still. What i noticed is once i try logging in with an invalid admin name/pwd, the error msg comes up but once i enter the right usrname/pwd, nothing happens. .but the session seems to have been set 'cos if i go to admwelcome.php manually, i'll be able to access it. I've been on this for hours. .Any help pls? |
Re: Php Error. .Pls Help! by bakenda(m): 9:20am On Jun 16, 2011 |
Do you have an htacces file in your script folder that handles redirection? Just let me know if you have an htaccess file, and if yes paste the content here. Cheers, help is on the way. |
Re: Php Error. .Pls Help! by Dawgzfada(m): 9:35am On Jun 16, 2011 |
bakenda: No. Thanks for the inspiration. |
Re: Php Error. .Pls Help! by bakenda(m): 1:50pm On Jun 16, 2011 |
Open a new notepad page, drop the following line in it: PHP_FLAG output_buffering on save the page as .htaccess choose the "All Files" option when saving drop the file in the folder containing your scripts. Let's hear how it goes. |
Re: Php Error. .Pls Help! by Dawgzfada(m): 3:08pm On Jun 16, 2011 |
Thanks so much bro. It worked like a charm. Thanks bruv. I rily appreciate. |
Re: Php Error. .Pls Help! by Dawgzfada(m): 3:09pm On Jun 16, 2011 |
Time to learn: What does the .htaccess hack PHP_FLAG output_buffering on do? |
Re: Php Error. .Pls Help! by bakenda(m): 3:47pm On Jun 16, 2011 |
The pleasure is mine. Very Short Explanation: Actually, if you want to use the header() function to redirect to another page, then it has to come before anything else in the script, that is, you should not send the header after the page output has started(logical enough), but we can't avoid that most of the time as evidenced in your script. Without output buffering (the default), your HTML is sent to the browser in pieces as PHP processes through your script. With output buffering=on, your HTML is stored in a variable and sent to the browser as one piece at the end of your script. The instruction in the htaccess file is just to instruct Apache to turn output buffering on, hope you get the idea. |
Re: Php Error. .Pls Help! by Nobody: 8:06pm On Jun 16, 2011 |
I am still not sure of where the problem is exactly, if it is from the server, or from the codes. . . |
Re: Php Error. .Pls Help! by bakenda(m): 6:50am On Jun 17, 2011 |
The problem is from the codes but it has a server solution, and it has been solved, the software that interprets the codes is on the server. The problem could also have been solved by modifying the codes - if he could find a way to place the header directive before any output is sent |
Re: Php Error. .Pls Help! by Nobody: 5:16pm On Jun 17, 2011 |
@poster, i seem to have figured out the problem - send the files to my email - zip 'em first |
Re: Php Error. .Pls Help! by DualCore1: 5:19pm On Jun 17, 2011 |
*dhtml:You and seun dey smoke the same pot this evening? ========= on a side note, ob_start() at the beginning of your php and ob_flush() at the end of it should also fix this. |
Re: Php Error. .Pls Help! by bakenda(m): 6:59pm On Jun 17, 2011 |
Dual Core: Yeah, that will also get the problem solved for the particular script the ob there stands for output buffering. The advantage of using an htaccess file is that it takes care of all files with that issue instead of inserting ob_start() and ob_flush() in every script. |
Re: Php Error. .Pls Help! by DualCore1: 8:28pm On Jun 17, 2011 |
Nice idea. This should be a "default" for my .htacces cuz ob_start ad flush are as good as regulars on my scripts. |
Re: Php Error. .Pls Help! by Nobody: 10:05pm On Jun 17, 2011 |
Dual Core:No weed man, ganja. . . Well, lets hope your solutions work, i have a different and shorter approach than all that. . .but am not posting it yet, let us hope the above work - it should on a normal day sha |
Re: Php Error. .Pls Help! by DualCore1: 11:35pm On Jun 17, 2011 |
I will believe you if you tell me you have a shorter way of <?php echo "babe" ?> |
(1) (Reply)
U.k And U.s Available@4k Each,nigeria@15k,enter To Purchase / Help Needed By Bloggers / Website Design/development
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 35 |