Connecting Tech Pros Worldwide Forums | Help | Site Map

Completely new and dumb PLEASE HELP !

gjdagis
Guest
 
Posts: n/a
#1: Dec 21 '05
This is my first day trying to learn PHP and ALREADY I'm stumped. I
bought the SAMS Guide toPHP. MySQL, and Apache Book. On page 18 it
tells me to create a file called phpinfo.php. HOW do I create a PGP
file ? I have Word etc but programs like this create TEXT files etc. ,
DON'T THEY? I created it anyway and did as told. Was this OK ?

The file looks like this
<?php
phpinfo();
?>
and was created in WORD saved as phpinfo.pgp

Secondly: On the same page (after creating the above and putting it
into C:/Apache/Apache2/htdocs as told) it says to point the web browser
to http://localhost/phpinfo.php and I should see the PHP information
page. All my browser does is hang up while searching for the page. What
the heck am I doing wrong ALREADY ! Geez this is HORRIBLE. Please help.

Thank you,
George


Gordon Burditt
Guest
 
Posts: n/a
#2: Dec 21 '05

re: Completely new and dumb PLEASE HELP !


>This is my first day trying to learn PHP and ALREADY I'm stumped. I[color=blue]
>bought the SAMS Guide toPHP. MySQL, and Apache Book. On page 18 it
>tells me to create a file called phpinfo.php. HOW do I create a PGP
>file ?[/color]

With a text editor.
[color=blue]
>I have Word etc but programs like this create TEXT files etc. ,
>DON'T THEY?[/color]

Doesn't Windows have a text editor, like EDLIN?
[color=blue]
>I created it anyway and did as told. Was this OK ?[/color]
[color=blue]
>The file looks like this
><?php
>phpinfo();
>?>
>and was created in WORD saved as phpinfo.pgp[/color]

Unless WORD has a mode to save as flat ASCII text with absolutely
no fonts, color, colour, etc., it's the wrong thing to use.
How about NOTEPAD?

Gordon L. Burditt
Steve Doria
Guest
 
Posts: n/a
#3: Dec 21 '05

re: Completely new and dumb PLEASE HELP !


I highly recommend Notepad++. It's free and awesome.

Steve Doria
http://blog.stevedoria.net/

Gordon Burditt wrote:[color=blue][color=green]
>>This is my first day trying to learn PHP and ALREADY I'm stumped. I
>>bought the SAMS Guide toPHP. MySQL, and Apache Book. On page 18 it
>>tells me to create a file called phpinfo.php. HOW do I create a PGP
>>file ?[/color]
>
>
> With a text editor.
>
>[color=green]
>>I have Word etc but programs like this create TEXT files etc. ,
>>DON'T THEY?[/color]
>
>
> Doesn't Windows have a text editor, like EDLIN?
>
>[color=green]
>>I created it anyway and did as told. Was this OK ?[/color]
>
>[color=green]
>>The file looks like this
>><?php
>>phpinfo();
>>?>
>>and was created in WORD saved as phpinfo.pgp[/color]
>
>
> Unless WORD has a mode to save as flat ASCII text with absolutely
> no fonts, color, colour, etc., it's the wrong thing to use.
> How about NOTEPAD?
>
> Gordon L. Burditt[/color]
Michael
Guest
 
Posts: n/a
#4: Dec 21 '05

re: Completely new and dumb PLEASE HELP !


Yes I suggest Notepad++ too. I also suggest that just to make sure you
have your apacfhe configuration correct, that you uninstall it and
install XAMPP <http://www.apachefriends.org/en/xampp.html> (which is a
preconfigured php, mysql and apache program) , this will allow you to
make sure that everything is working fine.

Andy Hassall
Guest
 
Posts: n/a
#5: Dec 21 '05

re: Completely new and dumb PLEASE HELP !


On 20 Dec 2005 19:33:10 -0800, "gjdagis" <gjdagis@hvc.rr.com> wrote:
[color=blue]
>This is my first day trying to learn PHP and ALREADY I'm stumped. I
>bought the SAMS Guide toPHP. MySQL, and Apache Book. On page 18 it
>tells me to create a file called phpinfo.php. HOW do I create a PGP
>file ?[/color]

PHP, not PGP. PGP is an encryption program.
[color=blue]
>I have Word etc but programs like this create TEXT files etc. ,
>DON'T THEY? I created it anyway and did as told. Was this OK ?[/color]

PHP files are text files. The extension of a filename (the bit after the ".")
has nothing to do with the contents of the file - all it does is, on Windows
anyway, help to let the operating system know what program to open the file
with.

When you're running PHP in a webserver it has a similar function; you would
earlier have set up your webserver to run files ending with .php through the
PHP interpreter, instead of just serving the file directly as it would by
default.
[color=blue]
>The file looks like this
><?php
>phpinfo();
>?>
>and was created in WORD saved as phpinfo.pgp[/color]

phpinfo.php.

Ensure it's not saved it as phpinfo.php.txt, as the Microsoft programs have a
bad habit of doing that.

If you're on Windows XP, make sure you have the "Hide file extensions" option
turned OFF (somewhere in Options when you have a directory window open) as this
will just confuse things further.
[color=blue]
>Secondly: On the same page (after creating the above and putting it
>into C:/Apache/Apache2/htdocs as told) it says to point the web browser
>to http://localhost/phpinfo.php and I should see the PHP information
>page. All my browser does is hang up while searching for the page.[/color]

Is your webserver running?

Did the book start with the basics first, getting Apache to serve up a plain
page first before moving on to PHP?

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
gjdagis
Guest
 
Posts: n/a
#6: Dec 22 '05

re: Completely new and dumb PLEASE HELP !


I want to SINCERELY thank those of you who responded; it was MUCH
appreciated. I wish ALL a safe & happy holiday.

Sincerely,
George

Closed Thread