I have followed all the instructions in PHP 5 in easy steps to set up Apache, MySQL, and PHP itself on my pc. but I try and write a php file and it is automatically turned into a php.txt file, waht should I do? :mad:
PHP Problems!
try finding easyphp1.8... is very very easy to set up, but the only thing is that i think it uses php 4.3.2 or something!
sitegod wrote:I have followed all the instructions in PHP 5 in easy steps to set up Apache, MySQL, and PHP itself on my pc. but I try and write a php file and it is automatically turned into a php.txt file, waht should I do? :mad:
Quit using Windows and get a real OS .... </rimshot>
IIRC, it's a setting in Windows explorer; do the following (this from XP, you may need to adjust slightly for other versions):
- Open "My Computer".
- Click Tools | Folder Options
- Click the "View" tab.
- Uncheck "Hide extensions for known file types".
- Rename your "php.txt" files to what you want them to be....
HTH,
sitegod wrote:I have followed all the instructions in PHP 5 in easy steps to set up Apache, MySQL, and PHP itself on my pc. but I try and write a php file and it is automatically turned into a php.txt file, waht should I do? :mad:
How are you writing the file? Are you using notepad? I have seen notepad insist on adding a ".txt" to any filename you try to use. You can get around this be enclosing the filename in quotes in the save dialog.
well- now it just shows up blank :mad: im using this code:
<?php phpinfo(); ?>
if any of you wonderful people could help out
If you've just got a single-line file which contains just
<?php phpinfo(); ?>
and it "comes up blank", there are a couple of possibilities. Either your webserver doesn't recognise that this file is to be interpreted by PHP, or it does but there's something bad happening in your PHP setup which is causing it to fall over.
The first thing to do is to "view source" on the "blank" page on the browser. Is the above code visible? If so, your browser doesn't realise that it is supposed to interpret your file as php. What is it's file extension? What is your webserver configured to recognise as php?
If "view source" doesn't contain the above then it's likely that PHP is trying to interpret but is choking.
Unfortunately I don't know enough about running PHP on a Windows box to offer any more specific advice.
im following instructions from teh book, so basically yes. I have clicked veiw source, but now the file wont even open
sitegod wrote:im following instructions from teh book, so basically yes. I have clicked veiw source, but now the file wont even open
I don't understand what you mean by "the file won't even open". Can you provide more details? What software are you using to try top open it? How are you trying to open it? What happens, do you get an error message?
You say you clicked on "view source" - what did you see?
justsomeone wrote:I don't understand what you mean by "the file won't even open". Can you provide more details? What software are you using to try top open it? How are you trying to open it? What happens, do you get an error message?
You say you clicked on "view source" - what did you see?
well, it offers me the cahnce to open or save, I click open, it wont do anything. I wont click save, because it wont let me open it anyway..
sitegod wrote:well, it offers me the cahnce to open or save, I click open, it wont do anything. I wont click save, because it wont let me open it anyway..
So the server appears to be serving the document with an unknown MIME type. or something similar.
And, furthermore, the software on the client side doesn't know what to do with it either?
Maybe I shouldn't have included the rimshot. :rolleyes:
Please answer the following questions...
What is the URI of the page you are trying to access?
What browser are you using to access the above URI?
When offered the option of "opening" or "saving", if you chose "save", what filename does the (browser) want to give to the file?
Hello,
I am a newbie, and am having the same problem as this person. I am also running windows. My OS is Windows XP
I have installed Apache, and have followed the steps in the book to get my PHP into Apache.
I did as the book said and made a file named in the htdocs file.
I too have put in the same <?php phpinfo(); ?> When I save the file the extension on it is txt even though I put php.
When I try to run the page in the browser explorer I get page cannot be found.
What am I doing wrong? How do I get the file to save as php. I did as the other person suggested and went to the tools area and unclicked the hide file extensions. This still does not work.
I am at a loss. Someone Please help.
Any suggestions is appreciated.
Thanks,
Dittobyte
Hi all me again,
Okay, I managed to get the file to open up in explorer, but what came up was the code <?phpinfo()?> What I find interesting is this is not the code I used. I had put in <?php phpinfo();?> For some reason it is taking out the first php.
Anyways, I will have to play with this some more. What I am trying to get it to do, is what the book says, which if done correctly I should be able to acces the file via my web browser and a table should display which say PHP Version 5.0.2
So far no luck with seeing this.
Any suggestions?
Thanks again,
Dittobyte
Please answer the following questions...
What is the URI of the page you are trying to access?
What browser are you using to access the above URI?
Dittobyte, no offense, but please don't piggyback on other's threads. Start your own if needed.