http://pastebin.ca/392649
Read notes to the right of <--------------------------------
I've been trying stuff for a good hour, cant figure anything out.
| SitePoint Sponsor |
http://pastebin.ca/392649
Read notes to the right of <--------------------------------
I've been trying stuff for a good hour, cant figure anything out.
You've a syntax error and error reporting turned off. The error is missing closing parenthesis here:
PHP Code:if(isset($_COOKIE['join'])){
Saul
Thanks, got past that but its still not completely working...
How do I turn on error reporting?

error_reporting(2039);
The number means what level you want it at. Look it up.
Once it's on PHP should tell you what line the error is on.
Made a simple php error page to see if this works and it doesnt
Page comes up empty.PHP Code:<?php
error_reporting(6143);
$hide = 1;
if($hide == 1){
echo "error";
echo "error2";
?>
http://pastebin.ca/392696 <------ updated notes
Of course it doesn't, you don't have a closing brace for your if clause.
Wyte R@ven - Creator of the Rift
you can't have thehttp://pastebin.ca/392696 <------ updated noteson line 61. You cannot parse anything in between an elseif { } and else { statement.Code:echo "passes";
- Edward Sun ..blog.. printdoublesided
Potential client demands a portfolio, but you don't have one? ...
Easily create your own portfolio!



In your php.ini file, find the line that includes "error_reporting", and change it to "error_reporting = E_ALL | E_STRICT".
Just below, change the "display_errors" line to "display_errors = On".
This assumes that you are using your own server, and not renting hosting. If that is the case, you may be able to achieve the same result using Apache's .htaccess file.
Never do this on a publicly accessible server!

If you ARE on a public server and don't have php.ini access, just go to http://whatismyip.com and add this to the top of the page:
Easy enough.PHP Code:if($_SERVER['REMOTE_ADDR'] == "put your ip address here") {
error_reporting(E_ALL ^ E_NOTICE);
}
![]()
Wyte R@ven - Creator of the Rift
- Edward Sun ..blog.. printdoublesided
Potential client demands a portfolio, but you don't have one? ...
Easily create your own portfolio!
error_reporting(E_ALL);
By the way: you don't need a custom sentenceCase() function, look up ucwords in the manual.
Not my server, on a host. Had it on for a while, then they went down and came back up and low and behold, no error reporting
Tried it, still shows up blank when there is an error.
Correct
Tried it. no cigar
Will look into it, seems a lot easier than the function.
Still can't find that damn error
EDIT 2 SECONDS LATER: found the problem, had two else statements D'oh!





The problem with your main script was found by tcwd way back in post8.
Your lines
need to be changed toPHP Code:}elseif(!preg_match($regexp, $email)){
echo("Your email seems to be incorrect!");
}
echo "passes";
else{
you cannot have the echo statement between the closing bracket and the else statement.PHP Code:}elseif(!preg_match($regexp, $email)){
echo("Your email seems to be incorrect!");
}else{
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming



The problem is that the sample error you posted is a compile-time error, so the script errors out before the call to turn on error reporting ever occurs.
This may not be the optimal solution, but I've used this to find compile-time errors like this on a server with error reporting off.
If I'm testing index.php, and need to view it with error reporting on, I create a file called index.debug.php, and fill it with this:
This will turn error reporting on, and then include the file to debug. That way, even compile-time errors will be displayed. Of course, you may want to tweak this to accept the page to load in the query string. If that is the case, make sure that only you have access to this, or you may risk your entire server. Especially make sure that you have set your open_basedir if you decide to do such a thing.PHP Code:<?php
if($_SERVER['REMOTE_ADDR'] == "put your ip address here") {
error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors','On');
require_once('index.php');
}
?>

Tarh, that's a great idea.![]()
Bookmarks