PHP error reporting problems and missing php.ini

meharrington

Registered
Hi all,
I just reinstalled X and now have a fresh copy with all the updates. I was happy to see that PHP now worked but it seems to have problems. All parse errors come back saying they're on line 1 even though they aren't.

ie: the following message comes up
Fatal error: Call to undefined function: error_message() in /Library/WebServer/Documents/m/addressBook.php on line 1

eventhough I don't call error_message() until line 21.

Also I can't seem to find the php.ini file!

Does anyone have any ideas?

Thanks,
mark
 
You're in luck, I spent 2 hours figuring this out the other day. It's because your PHP/HTML files are using Mac line breaks. If you are using BBEdit, choose unix in the document drop menu. I would recommend setting your preferences to save text files in unix format as well since I haven't run into any need to ever have Macintosh linebreaks.
 
Back
Top