Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to... PHP as CGI ??

Status
Not open for further replies.

sikarius

Programmer
Dec 11, 2001
63
ES
i'm really interesting in execute some applications in java via PHP. The documentation of PHP tells that to use AWT php must to run as CGI...Well,How i configure IIS 5.0??

Thanks
 
sorry my inexperience but i read this docs and i dont find any configuration of PHP like a CGI.... i only find a isapi module configuration ....

Please could you give some help ??

Thanks
 
Thanks... i didnt see it sorry...... Thanks for your help :)
 
Hi everybody


Rycamor i've tried to configured my IIS with this information but i cant launch a AWT application in java. the program works because in pws works very well.


One more time, Could you give some help??

Thanks a lot
 
Last week i posted a message with all the steps you need to do to configure the PHP in IIS 5.0 as a CGI.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Which is the title of the post?? I'm really interesting ....

Thanks Anikin
 
well, finally I found the post and.... it was mine ;P, well, i followed the post but the problem is the same the application in php that launched a awt "pluggin" didnt works.

The script is the follow:
<?php
// This example is only intented to be run as a CGI.

$frame = new Java('java.awt.Frame', 'PHP');
$button = new Java('java.awt.Button', 'Hello Java World!');

$frame->add('North', $button);
$frame->validate();
$frame->pack();
$frame->visible = True;

$thread = new Java('java.lang.Thread');
$thread->sleep(10000);

$frame->dispose();
?>

This script (is a example of php.net) works very well in PWS but in IIS 5.0 and W2k doesnt work...........

My question: ISS 5.0 supports PHP as a CGI or only as a module??.... IIS supports a awt applications??
 
My webserver runs PHP as CGI and not as a module. That's for sure, so one of the questions is solved.

About the AWT, i don't know cause i never use it. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Thaks for all your help Anikin, thanks a lot....

My IIS 5.0 (i supose) is configure with PHP as a CGI because i follow your steps and i can obtain a PHP-page but when i try to access a PHP-page with awt (like the script before) i dont obtain anything.... this is my problem. In pws under win98 the same scripts works very well..... Why?? I dont know :(....

Thanks again ! :)
 
If you create a page containing just the following :-

<?php
phpinfo()
?>

call it info.php and put it in the root of your web

now if you call the output will tell you if you are running php as isapi or cgi.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top