Click to See Complete Forum and Search --> : phpinfo( ) issue/ newbie php


jmcdonald21
07-05-2005, 06:36 PM
I am just starting to learn php. I created a file:


<html>
<head>
<title>test php</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>


I uploaded this file into the public html directory with the rest of my stuff and got an error. I had done this previously many months ago when I wanted to learn php, but abandonded it for python. At that time though, it worked. I got all the php info from my server. Now nothing. I know that the server has php support, and I can't figure out what I did different then. Can anyone help me on this, I gotta get the php ball rollin

bokeh
07-05-2005, 07:20 PM
Just put the following in the file; <?php phpinfo(); ?> No need for anything else.

jmcdonald21
07-05-2005, 11:35 PM
I just tried the <?php phpinfo(); ?> I saved the file as test.php and its still not working. I am I putting it in the wrong place maybe? Public html? Here is the error I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mjmcdonaldfam.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.mjmcdonaldfam.com Port 80

BeachSide
07-05-2005, 11:38 PM
Weird man! I would do like the error says and contact someone. I suspect that php isn't running properly on that server.

::Edit:: UNLESS they have that turned off... have you tried doing something else? Such as <?php echo "Hello All!"; ?>

jmcdonald21
07-05-2005, 11:44 PM
That didn't work either. I rember having problems the first time I tried this, but I don't rember what I did to get it to work, other than smack the computer desk a couple of times with my fist. Could my file location mess it up?

BeachSide
07-05-2005, 11:48 PM
only if your file isn't located in the web tree but if you aren't getting a 404 error then it is obviously there. Well I shouldn't say that...

Make sure that it is in the root folder ie - public_html or www or whatever it is named... mine is on windows and it is called www_root

jmcdonald21
07-05-2005, 11:55 PM
Yeah, it's just bo-jangled. I put it in every folder available. Didn't work in any. I guess I just gotta see if somebody at the hosting company will talk to me. :confused:

BeachSide
07-06-2005, 12:15 AM
Ya man, sorry but that is your best bet.

bokeh
07-06-2005, 03:06 AM
Are you sure php is enabled on that server? If you post the URL I could have a look at the signature to see.

jmcdonald21
07-06-2005, 03:08 AM
www.mjmcdonaldfam.com

the php is www.mjmcdonaldfam.com/infotest.php

bokeh
07-06-2005, 03:18 AM
For some reason that server doesn't identify itself whatsoever.