BBlakley
Posts: 2
|
| Posted: 10/12/2004, 4:07 PM |
|
I am very experienced with Perl, but have not done any work with PHP (however they look very similar).
Anyway, I am playing with CodeCharge to try to determine if it is right for my needs, and am messing with the example "bookstore" application. If I publish it as ASP, it works fine. But I'm a Perl programmer, not an ASP programmer, so I changed the output language to Perl, and republished to a clean directory. Clearly a significant portion of the application is in PHP, so I went ahead and installed PHP 4.3.9 (running on Windows 2000 with IIS 5), added c:\php to the path, made sure the .php extension was properly registered to the php binary in IIS, and put a php test script on to make sure php was running right. This is the test script:
Quote :
<html>
<head>
<title> PHP Test Script </title>
</head>
<body>
<?php
phpinfo( );
?>
</body>
</html>
and it works fine.
However, when I try to go to http://127.0.0.1/store/default.php, all I get on the screen is all of the php code that is in default.php. If I run "php test.php" (the script above) from the command line, I get all of the html output just fine. If I run "php default.php" from the command line, I just get the code output to the screen just like in the browser. Should I be using a different document as the "default document" when I publish the bookstore as Perl?
As I said, I'm 100% confident that PHP is installed and working correctly through IIS, my Perl implementation works fine, and the bookstore will work as ASP, but not Perl.
Anyone done this successfully? Looking at default.php, it doesn't look like I'd expect it to look (no <? ?> tags), so I think perhaps I'm missing a piece of the puzzle.
Thanks for any help. Sorry if this is a stupid question. I tried searching the archives and beat on everything until I just had to give up and consult the experts.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 10/13/2004, 3:34 AM |
|
Hi,
Since you "changed the output language to Perl" then you generated Perl scripts and they cannot be executed by the PHP engine.
You may want to change the extension of the generated files to ".cgi". Click on the project name in Project Explorer (left panel in CCS) then in the properties find "Code File Extension" and specify your extension there.
Also, simply changing the language may not work with the examples. Please specify the language (Perl) when creating an example, as described at http://docs.codecharge.com/studio/html/ProgrammingTechn...SSolutions.html
Hope this helps.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
BBlakley
Posts: 2
|
| Posted: 10/13/2004, 10:50 PM |
|
I fixed it. I think it was confused because I first published it as ASP and then later changed to Perl and republished. Even though I said to publish as Perl, it still published part Perl and part PHP. I blew the whole thing away and did the "new project" and chose Perl from the beginning, and everything worked perfectly.
Thanks!!!
|
 |
 |
|