PHP Oddity

2 replies [Last post]
BDub's picture
Offline
Joined: Dec 20 2003
Posts: 706

So, I'm working on a piece of PHP software and I made a few major changes to my index.php script. Mostly just adding some include(); files to make the index script shorter and more understandable. I came across a rather odd occurrence which I thought I'd share.

One of my lines is:

$sig = "";

This is just a test variable, so at the moment I could set it to anything. When I edited the script, I must have brushed my trackpad the wrong way, because I found it turned into:

sig = "";

The really unusual thing is, when it changed to that, my script output no information. I added some words before the opening php tag, and it still wasn't outputting even them. It just returned a blank document everytime.

Does anyone here know why that would happen? Shouldn't I just get a variable telling me I used an unexpected command or something?

It's fixed, but I'm still curious. I spent most of the day ignoring my iBook because I was trying to let my subconcious come up with a solution.

-BDub

__________________

"There is going to be a future: let's chase it until it kills us." - Spider Robinson

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Dec 19 2003
Posts: 566
are you running php on your i

are you running php on your iBook or on a dedicated server? your php installation is probably surpressing the errors (the standard OS X install of php does this) ... if so then you probably need to open your php.ini ("/usr/local/php/lib/php.ini") and change the line that reads:

display_errors = Off

to:

display_errors = On

it should be around line 292 ...

you will probably need to restart PHP/Apache to get the errors to show up ...

TOM

BDub's picture
Offline
Joined: Dec 20 2003
Posts: 706
Display Errors

Nope, I've got displaying errors on my iBook. This is a file for Applefritter, so I've no idea how Tom has the .ini file set up here.

__________________

"There is going to be a future: let's chase it until it kills us." - Spider Robinson