Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - .php files format and display | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Dylan
Devil Trumpets and Angel Trombones ~
Level: 54

Posts: 840/1407
EXP: 1181697
For next: 52173

Since: 06-19-04
From: Ottawa, Canada.

Since last post: 1 day
Last activity: 6 hours
Posted on 09-04-04 03:46 AM Link | Quote
Well, I decided to start a bit of php. I don't plan to put anything on the web, I just wanna test stuff locally, you know, to learn. So I downloaded all the neccessary fixings to power it, but I have a small problem. I made a very simple little script in a note doc and saved it as a .php, but it turns into a microsoft picture it! file. Now, I understand that picture it files also have the extension .php. So, how can I get around this? I don't even know if this is causing the problem, because it opens in the browser. Problem is, its just a blank page. Well actually, html is displayed, but any blocks of php are ignored. Hmm... help!
dan

Snap Dragon
Level: 43

Posts: 154/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 09-04-04 05:23 AM Link | Quote
What is your script's code, and are you accessing it through http://localhost/whereverthescriptis, instead of C:\documents and settings\user\whateverthescriptis?
Modereb

Paragoomba
Level: 15

Posts: 40/75
EXP: 14749
For next: 1635

Since: 06-04-04

Since last post: 350 days
Last activity: 339 days
Posted on 09-04-04 10:43 AM Link | Quote
Think it's more of a File Association problem than a programming problem.

In a Windows Explorer window, go to 'Extra', then 'Map Options' (bottom item in the menu under 'Extra'), and then the third Tab 'Extensions'. Here you can change with what program every file type will be opened.

Or, just open your browser window and go to the URL/location of the PHP file itself.
dan

Snap Dragon
Level: 43

Posts: 157/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 09-04-04 05:01 PM Link | Quote
Your file association in Windows has nothing to do with how a web server on your system renders the page. It sounds like he's either not got PHP installed, or is running the page by double-clicking it in explorer. (Which you shouldn't do)
Dylan
Devil Trumpets and Angel Trombones ~
Level: 54

Posts: 847/1407
EXP: 1181697
For next: 52173

Since: 06-19-04
From: Ottawa, Canada.

Since last post: 1 day
Last activity: 6 hours
Posted on 09-04-04 09:32 PM Link | Quote
Originally posted by dan
Your file association in Windows has nothing to do with how a web server on your system renders the page. It sounds like he's either not got PHP installed, or is running the page by double-clicking it in explorer. (Which you shouldn't do)

No I have a php interpreter with fast-cgi installed along with Apache. They are both configured properly. Dan, your first post helped a bit. I opened it with localhost; but I am not sure if I have the dir correct. Apache/htdocs/filewithphp.php? I believe thats the root directory of the local server. And do I literally open it like http://localhost/filewithphp.php, or do I need something to replace localhost? How can I find that?


(edited by GB-K on 09-04-04 12:49 PM)
dan

Snap Dragon
Level: 43

Posts: 160/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 09-04-04 11:39 PM Link | Quote
Open your Apache's httpd.conf file (located in the 'conf' directory), and find the setting for DocumentRoot. It should tell you the directory on your system that you should put the scripts in.
Dylan
Devil Trumpets and Angel Trombones ~
Level: 54

Posts: 849/1407
EXP: 1181697
For next: 52173

Since: 06-19-04
From: Ottawa, Canada.

Since last post: 1 day
Last activity: 6 hours
Posted on 09-04-04 11:57 PM Link | Quote
Originally posted by dan
Open your Apache's httpd.conf file (located in the 'conf' directory), and find the setting for DocumentRoot. It should tell you the directory on your system that you should put the scripts in.

Yeah, the DocumentRoot is Apache2/htdocs, like I said. It still locks up when I try to access http://localhost/phpfile.php(when phpfile.php is in htdocs). Hmm.

Edit: In httpd.conf, I see a line that looks like:
ServerName mdg-bzj30pmtond.slnt.phub.net.cable.rogers.com:80
Do I need to change "mdg-bzj30pmtond.slnt.phub.net.cable.rogers.com:80" to "localhost"?
Or open the test file in http://mdg-bzj30pmtond.slnt.phub.net.cable.rogers.com:80/test.php?

Edit: I experimented with the above, and nothing has worked.


(edited by GB-K on 09-04-04 03:13 PM)
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 2022/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 09-05-04 05:54 PM Link | Quote
Normaly you should be able to open the file like this:
http://localhost/test.php
OR
http://127.0.0.1/test.php

Which are the same. Or else you can try:
http://insert ip here/test.php

If nothing works, see if apache is running (We never know)
Dylan
Devil Trumpets and Angel Trombones ~
Level: 54

Posts: 853/1407
EXP: 1181697
For next: 52173

Since: 06-19-04
From: Ottawa, Canada.

Since last post: 1 day
Last activity: 6 hours
Posted on 09-05-04 10:30 PM Link | Quote
Ah, none of that worked. Its probably something I overlooked when configuring Apache.
random

Goomba
Level: 10

Posts: 21/32
EXP: 3871
For next: 543

Since: 08-02-04
From: Eastern Deathville

Since last post: 387 days
Last activity: 276 days
Posted on 09-06-04 02:16 AM Link | Quote
did you configure php properly with apache? It's doesn't configure automaticly you have to edit some files.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - .php files format and display | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.006 seconds.