 |
 |
DAMN PHP - basic getting started help
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
i am setting up the basics of it on my old PC via php.net
http://us2.php.net/manual/en/tutorial.firstpage.php
i installed fireserv, a thing that installs mysql, php 4 and apache and some cgi stuff too
where the hell am i supposed to save the test files (for instance hello.php as in that tutorial)?
there is a "www" folder where the 404.html, index.htm and phpinfo.htm was and thats where i put it but my test script is not working/processing!!!!! i feel so dumb but i can't troubleshoot things i dont know very well.
(Last edited by Apple Pro Underwear; Aug 10, 2003 at 10:15 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2000
Location: south
Status:
Offline
|
|
I know for apache it is htdocs, but that probably won't help.
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Apple Pro Underwear:
i am setting up the basics of it on my old PC via php.net
http://us2.php.net/manual/en/tutorial.firstpage.php
i installed fireserv, a thing that installs mysql, php 4 and apache and some cgi stuff too
where the hell am i supposed to save the test files (for instance hello.php as in that tutorial)?
there is a "www" folder where the 404.html, index.htm and phpinfo.htm was and thats where i put it but my test script is not working/processing!!!!! i feel so dumb but i can't troubleshoot things i dont know very well.
wanna define "not working/processing" a little more?
maybe, uninstall what you've done, and install apache from scratch. it's easy enough. then, install php, then install mysql. they're all point/click installers.
if you wanna ask a brother, you know where i be at
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
 sup philz
if you go to the php.net screen...there is a easy fo-sheezy test script. the infamous "hello world" BS
i copy pasted that into a wordpad documnet and saved it unto .htm file
it's not coming back processed when i load that page. i look up the source and it is coming back unprocessed
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Jul 2003
Location: San Jose
Status:
Offline
|
|
Originally posted by Apple Pro Underwear:
i copy pasted that into a wordpad documnet and saved it unto .htm file
it's not coming back processed when i load that page. i look up the source and it is coming back unprocessed
so are you saving it as some_file. htm or as some_file. php?
if not, the extension needs to be .php... that may be why the page isn't processing. the php extension tells the server that it needs to parse the page before sending it to the client.
hope it's as simple as changing the extension for ya...
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Apple Pro Underwear:
sup philz
if you go to the php.net screen...there is a easy fo-sheezy test script. the infamous "hello world" BS
i copy pasted that into a wordpad documnet and saved it unto .htm file
it's not coming back processed when i load that page. i look up the source and it is coming back unprocessed
like some dude under there said, save as .php
also, open it in BBE, and turn Invisibles on, as copy/paste from web pages can often include naztay chizaraters
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
Originally posted by philzilla:
like some dude under there said, save as .php
also, open it in BBE, and turn Invisibles on, as copy/paste from web pages can often include naztay chizaraters
check and check
it is saved as .php and i indeed checked that it was valid html
i will post screenshots because this is KILLING ME!!! 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
You're running it on the PC running Windows? I've never done that. In any case, somewhere there ought to be a file called httpd.conf. Find that file and edit it in a text editor. Find the "DocumentRoot" in that file and put your .php documents in the folder indicated by the path specified. Make sure the php module is loaded (both the LoadModule and AddModule directives are in the httpd.conf file). Finally, make sure the .php extension is mapped to those documents in the file with something like this:
AddType application/x-httpd-php .php
I am assuming you're using PHP4 here.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
Originally posted by Arkham_c:
I am assuming you're using PHP4 here.
indeed i am.
i will give a shot, thx. brb tonight
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status:
Offline
|
|
argh...after some initial BS...i found the problem.
what was it? i dunno.
it started to work and i'm not gonna ask questions. so wish me luck and thanks you mofos!
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2003
Status:
Offline
|
|
All you have to do is write a file in php and make sure it ends with
.php and you should place this file in www folder. If you want to actualy see the file parsed,(make sure Apache is on) turn on your web browser (IE,Opera,Mozilla,etc) type this in for the url = localhost
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|