![]() |
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. |
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.
|
Quote:
|
:Graucho I'm just fuckin with ya. LOL You're too easy.
|
Code:
virtual("path/filename.cgi");That should help :) |
Quote:
Gives me Quote:
Thanks for the link though, I have to be getting closer. Shit been driving me nuts for 4 hours now. |
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). |
Quote:
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. |
Did you chmod the cgi executable?
|
Quote:
|
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 |
Quote:
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. |
I'm sorry. I didn't know foe was on your payroll.
I guess you don't need my guys then. |
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. |
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. |
pay an expert
|
I should learn to read things before posting.
|
is the script running and just spitting out that error? if so..
error_reporting(0); :thumbsup |
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. |
Send the CGI file to my address [email protected], I will rewrite it to php for you... For free :)
|
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