Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-20-2005, 10:01 PM   #1
aico
Moo Moo Cow
 
Join Date: Mar 2004
Location: Washington State
Posts: 14,748
PHP Question

I changed a .shtml page into a .php page so I could include some PHP files, etc.

On the .shtml page I was calling out a cgi script to be run like this:
<!--#exec cgi="../cgi-bin/script.cgi" -->

But now that the page is a .php it's not running. How to I call this out with php?

I tried:
<?php
include("../cgi-bin/script.cgi");
?>

But that didn't work...

Thanks!
aico is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-20-2005, 11:26 PM   #2
broke
Confirmed User
 
Join Date: Aug 2003
Location: Someplace Windy
Posts: 4,501
exec( "/path/to/cgi/script/script.cgi" );
__________________
Perfect Gonzo
broke is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 12:22 AM   #3
grumpy
Too lazy to set a custom title
 
grumpy's Avatar
 
Join Date: Jan 2002
Location: Holland
Posts: 9,870
include "file.php";
__________________
Don't let greediness blur your vision | You gotta let some shit slide
icq - 441-456-888
grumpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 01:00 AM   #4
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Quote:
Originally Posted by grumpy
include "file.php";
how does it feel to post such a useless reply ?
have you even bothered to read the thread ?
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 02:38 AM   #5
submitter
Confirmed User
 
Join Date: May 2004
Posts: 570
try
virtual("../cgi-bin/script.cgi");
it work for me
__________________
* lesbian thumb tgp/mgp:looking for trades
* submit your lesbian galleries here
* simple php programing on the cheap
* icq:158726131
submitter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 02:58 AM   #6
RazorSharpe
Confirmed User
 
RazorSharpe's Avatar
 
Industry Role:
Join Date: Aug 2001
Location: Scotland
Posts: 2,238
<?virtual("../cgi-bin/script.cgi");?>

that should work for you ...
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
RazorSharpe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 06:33 AM   #7
Radiate
Confirmed User
 
Join Date: Dec 2004
Location: the center
Posts: 1,454
you can use the SetHandler directive in htaccess to process the .php file as a .shtml file if you need to
__________________

icq 199437756 - contact me if you need a solid hosting solution
Radiate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 06:35 AM   #8
drama
Confirmed User
 
Join Date: Jul 2004
Posts: 847
ask jimthefiend, he knows everything!
drama is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 06:36 AM   #9
Gungadin
Confirmed User
 
Join Date: Aug 2005
Location: O&A PARTY ROCK
Posts: 444
Yeah, virtual might work, havent messed with it in a while. You could also try to fopen("http://www.your.com/cgi-bin/file.cgi"), slower but maybe better.

The problem is that PHP has no idea how to parse your CGI code, so you will have to read in the OUTPUT of the script.

-G
Gungadin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 06:44 AM   #10
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
virtual() is your best solution here as long as it is apache.

You can also use passthru() to execute the script, this would not case an apache subrequest to launch, and might be better in some cases.
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 06:46 AM   #11
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by drama
ask jimthefiend, he knows everything!
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 01:20 PM   #12
aico
Moo Moo Cow
 
Join Date: Mar 2004
Location: Washington State
Posts: 14,748
Hey, thanks for all the replies. I just made a seperate .shtml page and put it in an iframe, that worked the best.

Thanks!
aico is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.