
November 8th, 2005
04:09 AM
Funny problem...
I was copying, word for word, a tutorial from a magazine. It didn't work sadly, so I checked the file that was on the magazine disc, copied the the file, that is exactly the same as the one I've written, and gave it a different name. So then I checked it again, and the file dopied from the disc, worked like a charm, but the one I'd written (it is exact, letter for letter, I triple-checked), doesn't work at all!
It isn't a real problem, but I was wondering if someone else knew about htis sort of problem... Or maybe encountered something yourself.
___________________


November 8th, 2005
04:34 AM
thinking of something witty to put here
Status: Offline!
Probably has to do with different line breaks and the way your editor handles them. Did you get any errors?

November 8th, 2005
04:38 AM
Originally posted by Rad:
Probably has to do with different line breaks and the way your editor handles them. Did you get any errors?
Well the funny thing is, I've edited the copied file in the same way, as my original file (the one I typed), but it still gets the same results... (I'm using Dreamweaver 8 btw...)
What it is, is basically a php file that shows some data out of a list, no problems. But my own file shows nothing, and the source in firefox only gives me a <html></html> output, but the other file works as if it's not the same. So, same words, exact same layout and markups... It's keeping me up at 1 in the night 
___________________


November 8th, 2005
05:03 AM
Lost in Berkeley, CA
Status: Offline!
Does you have PHP support
___________________
There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.

November 8th, 2005
08:36 PM
Originally posted by TheClincher:
Does you have PHP support
Yes, otherwise the second one wouldn't work either, would it 
___________________


November 9th, 2005
01:29 AM
Neversidian
Status: Offline!
are the two files in the same directory with the same error_reporting levels?
___________________
Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

November 10th, 2005
01:22 AM
Yeah, kiswa.
Status: Offline!
I'm curious to see if this can be replicated. Could you attach the two files so we can compare them?
___________________
www.kiswa.com
My attempt at articles for Neverside CodeBase: Part 1 Part 2 Part 3
(. )v( ·) <- The Webstandards Owl

November 10th, 2005
02:30 AM
thinking of something witty to put here
Status: Offline!
Make sure display_errors is set to on in your php.ini, and that error_reporting is at E_ALL.

November 11th, 2005
12:07 AM
I did error_reporting(E_ALL); but nothing... I'll attach the files, see if you can see something. It might be just a single comma or something, but I'm sure I wouldn't have missed it... Even with the error reporting on, it still puts out only <html></html> in Firefox...
The test.php file is the one that is working properly...
___________________

Last edited by TylerDurden, November 11th, 2005 12:09 AM (Edited 1 times)

November 12th, 2005
12:43 AM
Procrastination Guru
Status: Offline!
Your problem is simple, you didn't type it exactly the same. On line 59 of index.php, the code is as follows:
if {$result2 = mysql_query($sql)) {
When in fact it should be as follows:
if ($result2 = mysql_query($sql)) {
Take note of the first character after if. You got a curlie bracket instead of a parathesis.
Other than that, there might be more typos but I'm too lazy to check it any more than I already have. Or to run the script @ localhost. Because starting up my server takes 15 seconds too long.
___________________
Bored? Join us at #Central on irc.Neverside.com