I'm a PHP noob and I'm getting an error

Firepoet

Registered
So set up mac os x for php apache and mysql. I have a php file I want to view in the browser. So for a URL I go to where the file is at http://127.0.0.1/~stevenbenjamin/tos.php, but I get a white screen and this error:Error: One or more unknown errors have occured. If this message persists, please notify an administrator.
I've tried several php files and they all give me that, and I know they are good. So I'm assuming I made a mistake installation of either php or mysql?

I hope this isn't too stupid of a question, but I've never used PHP before.
 
to make sure its not a server problem just make a simple php file and call the phpinfo function.

Code:
<?php
phpinfo();
?>

if that doesn't work then your configuration is messed up.
 
You might also want to look at the Apache error.log (or error_log, I can't remember) file. It may give some hint as to whether it's a problem in your PHP setup or in your PHP coding.
 
Try "tail -f /var/log/httpd/error_log" in a shell, then reload the php script in the browser. See if you get any error messages written to that log.

Next, try "php -i" in the shell. You should see a long list of configuration information echoed to the screen. If you don't, that's a good sign that PHP is broken or missing.

Let us know what happens; this is eminently fixable.
 
Back
Top