SSI PHP Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • [Labret]
    Registered User
    • May 2001
    • 10945

    #1

    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.
    Last edited by [Labret]; 07-25-2002, 05:21 AM.
  • Daymare
    Confirmed User
    • Feb 2002
    • 2674

    #2
    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.

    Comment

    • [Labret]
      Registered User
      • May 2001
      • 10945

      #3
      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.
      ******.

      Comment

      • Daymare
        Confirmed User
        • Feb 2002
        • 2674

        #4
        I'm just fuckin with ya. LOL You're too easy.

        Comment

        • Libertine
          sex dwarf
          • May 2002
          • 17860

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

          That should help
          /(bb|[^b]{2})/

          Comment

          • [Labret]
            Registered User
            • May 2001
            • 10945

            #6
            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
            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.

            Comment

            • Libertine
              sex dwarf
              • May 2002
              • 17860

              #7
              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).
              /(bb|[^b]{2})/

              Comment

              • [Labret]
                Registered User
                • May 2001
                • 10945

                #8
                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.

                Comment

                • mrthumbs
                  salad tossing sig guy
                  • Apr 2002
                  • 11702

                  #9
                  Did you chmod the cgi executable?

                  Comment

                  • [Labret]
                    Registered User
                    • May 2001
                    • 10945

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

                    Comment

                    • 12clicks
                      Too lazy to set a custom title
                      • Jan 2001
                      • 19813

                      #11
                      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?
                      I'm not a dinosaur, I'm a crocodile. I've seen dinosaurs come and go and I'm left unimpressed.

                      Comment

                      • [Labret]
                        Registered User
                        • May 2001
                        • 10945

                        #12
                        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?
                        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.

                        Comment

                        • 12clicks
                          Too lazy to set a custom title
                          • Jan 2001
                          • 19813

                          #13
                          I'm sorry. I didn't know foe was on your payroll.
                          I guess you don't need my guys then.
                          I'm not a dinosaur, I'm a crocodile. I've seen dinosaurs come and go and I'm left unimpressed.

                          Comment

                          • Ted
                            Confirmed User
                            • Nov 2001
                            • 830

                            #14
                            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.

                            Comment

                            • Script Dude
                              Registered User
                              • Jun 2002
                              • 86

                              #15
                              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.

                              Comment

                              • alias
                                aliasx
                                • Apr 2001
                                • 19010

                                #16
                                pay an expert
                                https://porncorporation.com

                                Comment

                                • Script Dude
                                  Registered User
                                  • Jun 2002
                                  • 86

                                  #17
                                  I should learn to read things before posting.

                                  Comment

                                  • Alky
                                    Confirmed User
                                    • Apr 2002
                                    • 5651

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

                                    error_reporting(0);

                                    Comment

                                    • mike503
                                      Confirmed User
                                      • May 2002
                                      • 2243

                                      #19
                                      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.
                                      php/mysql guru. hosting, coding, all that jazz.

                                      Comment

                                      • TomasDean
                                        So Fucking Banned
                                        • Jul 2002
                                        • 2292

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

                                        Comment

                                        • foe
                                          Confirmed User
                                          • May 2002
                                          • 5246

                                          #21
                                          I woke up ......


                                          Everything works fine now

                                          Comment

                                          Working...