Hello all,

I have a problem that I cannot bypass.
Is it possible to execute php statements/files from a cgi script?
I have to output the content of a php page (the result of it) from a cgi/perl script. How can I do it?
I hope somebody can help me.
Thanks a lot

    If you have PHP installed as stand alone and not as a webserver module, you can call a PHP script from a perl script and pass data to it. If you are using Apache and have PHP installed as a mod, you will have to call Lynx or something to make the web server execute the script.

      4 days later

      I'm having the same problem. I have PHP installed as an Apache module, and I need to schedule a script to run every day. I put a line to hit the page in my cron to load it via lynx, but, even though I can load that page manually using "lynx [url]http://...[/url]" it won't work in my cron. My crontab line looks like this:

      40 7 * root lynx http://someserver.com/phpscript.php

      as I want the script to run at 7:40am.

      Do I need to use lynx with some sort of option or specify a different user to run the cron?

      This is on Mac OS X 10.1.5 with PHP 4.2.2, and the most recent version of lynx (can't remember off the top of my head).

      Thanks for any help,

      Steven

        Most recent installs of PHP should allow you to run php scripts from the command line with a call like this:
        php scriptname.php

          Wow. No kidding. I didn't realize that. I tried it and it works just fine. I guess all the things I googled-up last night were out of date.

          Thanks for the tip. It works find from the command line, but apparently I still have some cron issues to sort out.

          thanks,

          steven

            Write a Reply...