By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,106 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,106 IT Pros & Developers. It's quick & easy.

Include for a php.cgi? (Strato.de)

P: n/a
Hi there,

My provider (strato.de) offers me this cgi, which contains some php
elements as far as I guess. I am running my page with php and would
like to include in the over all design the formmanager (contact page)
However, I cannot include it from inside a page

Here is the code I use (without the // obviously)

// <?php
// include("/cgi-bin/formmanager.php.cgi?action=ext_preview&fid=2");
// ?>
The error reported is:

Warning: main($/cgi-bin/formmanager.php.cgi?action=ext_preview&fid=2):
failed to open stream: No such file or directory in
/mnt/am2/02/236/00000005/htdocs/ic-cms/kontakt.php on line 31

Warning: main(): Failed opening
'$/cgi-bin/formmanager.php.cgi?action=ext_preview&fid=2' for inclusion
(include_path='.:/opt/RZphp4/includes') in
/mnt/am2/02/236/00000005/htdocs/ic-cms/kontakt.php on line 31

Can any one help, the help desk at Strato is not particularly helpful
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dirk Grutzmacher wrote:
// <?php
// include("/cgi-bin/formmanager.php.cgi?action=ext_preview&fid=2");
// ?>


when including a file, PHP expects the given argument to be the actual file
name and location.

So, in your case, a file with a name matching the argument should exist:

/cgi-bin/formmanager.php.cgi?action=ext_preview&fid=2

To solve your problem, there are two options:

1. Use HTTP to call the script (can be done with include when the url_open
wrappers allow it, or use file/file_get_contents/fsockopen/curl instead)
2. Use system call functions like exec() to invoke the script with command
line arguments, e.g.:

exec("/cgi-bin/formmanager.php.cgi action=ext_preview fid=2");

Of course, the script should then be capable of parsing the command line
arguments.
JW

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.