Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > DAMN PHP - basic getting started help

DAMN PHP - basic getting started help
Thread Tools
Addicted to MacNN
Join Date: Sep 2001
Location: NYC*Crooklyn
Status: Offline
Reply With Quote
Aug 10, 2003, 10:08 PM
 
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
Reply With Quote
Aug 11, 2003, 12:02 AM
 
I know for apache it is htdocs, but that probably won't help.
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Aug 11, 2003, 05:44 AM
 
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
Reply With Quote
Aug 11, 2003, 06:03 AM
 
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
Reply With Quote
Aug 11, 2003, 06:13 AM
 
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
Reply With Quote
Aug 11, 2003, 07:58 AM
 
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
Reply With Quote
Aug 11, 2003, 11:44 AM
 
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
Reply With Quote
Aug 11, 2003, 03:05 PM
 
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
Reply With Quote
Aug 11, 2003, 04:18 PM
 
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
Reply With Quote
Aug 11, 2003, 08:48 PM
 
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
Reply With Quote
Aug 14, 2003, 11:31 AM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:17 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2