PHP Oddity

3 posts / 0 new
Last post
BDub's picture
Offline
Last seen: 2 years 9 months ago
Joined: Dec 20 2003 - 10:38
Posts: 703
PHP Oddity

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

Offline
Last seen: 2 months 3 weeks ago
Joined: Dec 19 2003 - 17:40
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
Last seen: 2 years 9 months ago
Joined: Dec 20 2003 - 10:38
Posts: 703
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.

Log in or register to post comments