sorry, here is the code
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line</p>
<?php echo “<p>This is a PHP line</p>”; phpinfo(); ?>
</body>
</html>
sorry, here is the code
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line</p>
<?php echo “<p>This is a PHP line</p>”; phpinfo(); ?>
</body>
</html>
And what exactly do you see when viewd in a broswer? Post the view source if possible.
<code>
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line</p>
<?php echo “<p>This is a PHP line</p>”; phpinfo(); ?>
</body>
</html>
</code>
This is the output in the browser
This is an HTML line
This is a PHP line
”; phpinfo(); ?>
This is the source code
<html><head>
<title>PHP Test</title></head>
<body>
<p>This is an HTML line</p>
This is a PHP line<p></p>”; phpinfo(); ?>
</body></html>
that a bit odd. Try just this in the file...
<?php
phpinfo();
?>
I get nothing on the page.
The code gives me nothing on the page
<?php
phpinfo();
?>
Does that mean it is not installed properly?
Forgive me if this is too obvious, but does the page filename end in .php?
Yep. If PHP were installed, you would NEVER see any '<?PHP' source when vieweing it in a browser.
Did you make sure that the page you were testing this on had a .php extension?
EDIT: Blasted second page! I always forget to see if there's a second page! Ignore the duplication of Doug's post above :x
I know I can't integrate PHP and ASP in one site but can I have both ASP.NET and PHP installed on the same computer? They would both be running on the same localhost server. Is there a problem with that because I dont understand why I am having such a hard time installing PHP and getting it to run in my computer.
can I have both ASP.NET and PHP installed on the same computer?
Yes you should be able to have them running on the same server, side by side. I dont know much at all about IIS or windows as I use apache / linux, otherwise I'd like to think I could be of more assistance.
What steps did you take to install php, and what steps did you take to let IIS recognise and process the .php extension? There is sure to be someone here who can help.
For IIS, I've always installed the php4isapi.dll SAPI module and then registered the .php extension to be handled by that.
You are right I didnt realise there was a second page. Okay I am reinstalling after running a system restore.
I dowloaded the windows installer from the site (php-5.1.2-installer.exe). I successfully installed it. Now there is the configuration part. I have a folder called apache in my C:/ folder but I am running IIS 5.1 (Default with XP). I have PHP for dummies(the book) which tells me to move a file called php.ini-dist from my php folder to the /windows folder but there is no such fine in the PHP folder so I am quessing that part was done automatically but I am open for suggestions and corrections. Now I also took a look at the setup manual that came with the program (in the PHP folder). It mentions some configuration regarding CGI binary or ISAPI module. The book that I am using (PHP for Dummies ) mentions nothing about these configurations.
I would really appreciate any help on this. Thanks.
Also
I have dreamweaver MX 2004 installed and there seems to be an association there with PHP and apache.
Make sure your file has a .php extension (not .asp or .htm or .html etc...)
if you still see nothing, then your server doesn't handle php. You may have to host elsewhere or look at getting your hosting upgraded.
Sorry, I have very little experience using the .EXE installers rather than the SAPI modules. I have even less experience with PHP5 since I don't like it and am sticking with PHP4 on all of my servers and projects!
Like bradgrafleman I also use the ISAPI php installation with IIS, it works the way I'm used to with asp code then, no cgi-bin stuff needed.
I doubt php script will integrate into a single NET page, or vice-versa, but the same server can certainly host both php and asp and NET in the same website. There are excellent commercial hosts that can provide combined hosting like this.
I gave this earlier as a pre-answer to your question about hosting. Check out my host, www.crystaltech.com if you're interested in a hosting solution with NET, SQL Server, MySQL, asp, php on a shared hosting server.