GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   SSI PHP Question (https://gfy.com/showthread.php?t=69355)

[Labret] 07-25-2002 06:17 AM

SSI PHP Question
 
How do you make a damn php page execute a cgi... server side include style?

For example, a SSI that dealt out cookies.

Found out cant stick the old ssi tag in the php like with html the hard way... and I NEED to get this cgi goooiiing.

Daymare 07-25-2002 06:20 AM

First you have to ask yourself; "Do you feel lucky? Huh, punk!? Do ya?" Then go for it. Once you go for it, nothing can stop you.

[Labret] 07-25-2002 06:21 AM

Quote:

Originally posted by Daymare
First you have to ask yourself; "Do you feel lucky? Huh, punk!? Do ya?" Then go for it. Once you go for it, nothing can stop you.
******.

Daymare 07-25-2002 06:22 AM

:Graucho I'm just fuckin with ya. LOL You're too easy.

Libertine 07-25-2002 06:23 AM

Code:

virtual("path/filename.cgi");
http://www.php.net/manual/en/function.virtual.php

That should help :)

[Labret] 07-25-2002 06:44 AM

Quote:

Originally posted by punkworld
Code:

virtual("path/filename.cgi");
http://www.php.net/manual/en/function.virtual.php

That should help :)

Yeah, tried that one.

Gives me
Quote:

Warning: Unable to include '/path/to.cgi' - request execution failed in /home/html/nothing.com/ssitest.php on line 2
ANd I know the path is right, works just fine when called from a standard SSI.

Thanks for the link though, I have to be getting closer. Shit been driving me nuts for 4 hours now.

Libertine 07-25-2002 06:58 AM

Hmm...virtual() is the function you need for this...
Is the cgi giving out appropriate headers n shit?
And, you might want to try out different path types (full/relative).

[Labret] 07-25-2002 07:03 AM

Quote:

Originally posted by punkworld
Hmm...virtual() is the function you need for this...
Is the cgi giving out appropriate headers n shit?
And, you might want to try out different path types (full/relative).

Yeah, tried full and relative. Same problem.

As for the headers I dont know. All it spits out is a small snippet of javascript with some cookie info in it. Sorta like ucj.

And I know the script works just fine, no problem with standard ssi. But I think I already said that.

mrthumbs 07-25-2002 07:04 AM

Did you chmod the cgi executable?

[Labret] 07-25-2002 07:05 AM

Quote:

Originally posted by mrthumbs
Did you chmod the cgi executable?
Of course, it works with normal ol SSI.

12clicks 07-25-2002 07:06 AM

wow, successful guy like you begging for free help on a chatboard.
nice way to stay in touch with the people.

want me to ask on of my php guys here in the office?:1orglaugh

[Labret] 07-25-2002 07:12 AM

Quote:

Originally posted by 12clicks
wow, successful guy like you begging for free help on a chatboard.
nice way to stay in touch with the people.

want me to ask on of my php guys here in the office?:1orglaugh

Oh the pain of Ronalds whit cuts deep.

Ohhhh make the pain go away....

Please... no more Ron, I submit!

Seriously though. Foe is my php stud, he is sleeping. I am too impatient to wait till he wakes up. Impatient, like you trying to figure out how to reply to this.

Old people get up early in the morning. I would love to see your medicine cabinet.

12clicks 07-25-2002 07:19 AM

I'm sorry. I didn't know foe was on your payroll.
I guess you don't need my guys then.

Ted 07-25-2002 07:42 AM

I'm only guessing but if you want to run something that aint php then try http://www.php.net/manual/en/function.exec.php or maybe http://www.php.net/manual/en/function.passthru.php

there are a few other options there depending on what you want to do.

Script Dude 07-25-2002 08:43 AM

Your post is a little short on detail.

Are you relying on the CGI script or the PHP script to set headers?

Perhaps you have to parse the headers returned by the CGI script and re-issue them in your PHP script? (or at least strip them to prevent them from being issued twice.) If you are seeing headers in your output when you access the page in a browser, this is probably the case.

I've used exec() to include the output of a perl script in my PHP code. Never had any real problems with it.

Contact me ([email protected]) if you want a second pair of eyes to double check what you're doing.

alias 07-25-2002 08:46 AM

pay an expert

Script Dude 07-25-2002 08:54 AM

I should learn to read things before posting.

Alky 07-25-2002 09:14 AM

is the script running and just spitting out that error? if so..

error_reporting(0); :thumbsup

mike503 07-25-2002 10:08 AM

virtual is virtual path - the path seen from docroot of the webserver for that virtual host.

equivalent of include virtual - include file is different (just fyi) - that goes from the filesystem paths.

TomasDean 07-25-2002 11:52 AM

Send the CGI file to my address [email protected], I will rewrite it to php for you... For free :)

foe 07-25-2002 12:54 PM

I woke up :) ......


Everything works fine now :)


All times are GMT -7. The time now is 11:35 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123