Excuse the ignorance if there is any. I am extremely new to PHP (Just bought the book yesterday and feel I have been ripped off). I just downloaded and installed WebServ 1.2.5.1 and when I use an example out of my new book, the browser only displays the PHP source code instead of pasing and showing html. (well, it shows a combined mixture of HTML and PHP) My PHP file tags end in .php and this happens to every document. I am assuming this is a minor hangup, but I can't find a solution anywhere, so I have resorted to the forums. Any help would be greatly appreciated, as I look to use a localhost to parse my PHP learning examples. Thank You in advance for anyone who has answers to this dillema.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is not the first time this has happened. I have heard of this issue many times without a note of how to fix it. Somone please help if you have any knowledge of this matter.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<?php
// this is the code in a nutshell
echo "Hello World";
?>
I am using version 5.0.0 PHP downloaded from php.net
I think i may need to make changes to the php.ini file or some files within the Apache folder. Im still lost as hell. Like i said, im a "newbie". Im sure this stuff appears often in the forums, but for the love of God, I have tried to get this damn thing working for the past week, sometimes working on it several hours at a time, and doing all kinds of online research.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the love of God, while you are struggling with that issue... just make sure you are very careful with your changes... eg. back up your .ini files with meaningful filenames, and, if it ain't broke don't fix it... too many people out there get frustrated with Apache/PHP, and then try something willy nilly, and then go backwards (breaking things by trying to fix them)... my suggestion is that forums and phonecalls are best... and whatever you do, I suggest you DO NOT TRY to install a fresh instance alongside the current instance just for comparison purposes:
Excuse the ignorance if there is any. I am extremely new to PHP (Just bought the book yesterday and feel I have been ripped off). I just downloaded and installed WebServ 1.2.5.1 and when I use an example out of my new book, the browser only displays the PHP source code instead of pasing and showing html. (well, it shows a combined mixture of HTML and PHP) My PHP file tags end in .php and this happens to every document. I am assuming this is a minor hangup, but I can't find a solution anywhere, so I have resorted to the forums. Any help would be greatly appreciated, as I look to use a localhost to parse my PHP learning examples. Thank You in advance for anyone who has answers to this dillema.
are you using the opening and closing tags?
<?php
?>
Yes, I am using the opening and closing tags. Still doesn't work. I am getting so frustrated.
This is not the first time this has happened. I have heard of this issue many times without a note of how to fix it. Somone please help if you have any knowledge of this matter.
are you getting an error in the php error log?
can you post a snipet of your code?
and witch ver of php are you using 5.0.0 or 4.3.8?
There is no error reported in the error log.
The code is simple (as follows)
<?php
// this is the code in a nutshell
echo "Hello World";
?>
I am using version 5.0.0 PHP downloaded from php.net
I think i may need to make changes to the php.ini file or some files within the Apache folder. Im still lost as hell. Like i said, im a "newbie". Im sure this stuff appears often in the forums, but for the love of God, I have tried to get this damn thing working for the past week, sometimes working on it several hours at a time, and doing all kinds of online research.
For the love of God, while you are struggling with that issue... just make sure you are very careful with your changes... eg. back up your .ini files with meaningful filenames, and, if it ain't broke don't fix it... too many people out there get frustrated with Apache/PHP, and then try something willy nilly, and then go backwards (breaking things by trying to fix them)... my suggestion is that forums and phonecalls are best... and whatever you do, I suggest you DO NOT TRY to install a fresh instance alongside the current instance just for comparison purposes:
C:/webserv1 (first try) alongside
C:/webserv2 (second try)
will not help you, so don't try it.
are you using webserv?
or have you downloaded php and installed it your self?
I downloaded the complete WebServ program and installed it according to directions.
try this and see if you get any results
create a file called phpinfo.php
edit this file to read
<?
phpinfo();
?>
save it into the weberv\wwwroot\htdocs folder
then go to http://127.0.0.1/phpinfo.php
see if you get any output.