RE: [PHP] configuration problem?
sorry for the confusing response and yes, the cgi script is written in perl, and i'm still looking for ways to execute this script from php. everything works okay until the cgi script uses a package. hope this helps making my question clearer. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 2:08 PM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I'm more confused now than ever. Originally you wanted to execute a .CGI script (presumably a PERL script) from inside a PHP script. Now it looks like you want to do just the opposite. If that's the case then you would be better served by posting your question in a PERL email list. -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:53 PM To: Kevin Stone; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? thanks for the response. i have no problem executing a simple perl script using passthru() or system(), but looks like i can't use a package in that perl script. for example, i have a perl script like this: #!/usr/bin/perl use strict; use lib qw(/dept/tools/lib); #use myPackage; print "hello world\n"; but when i uncomment the 'use myPackage' nothing shows up. please help. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:14 AM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
thanks. yes, i've tried using virtual but it gives me: Warning: Unable to include 'items_for_users.cgi' - request execution failed but the cgi and php are in the same directory. /bw -Original Message- From: SHEETS,JASON (Non-HP-Boise,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 1:45 PM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? Have you tried using virtual() ? virtual() is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:53 PM To: Kevin Stone; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? thanks for the response. i have no problem executing a simple perl script using passthru() or system(), but looks like i can't use a package in that perl script. for example, i have a perl script like this: #!/usr/bin/perl use strict; use lib qw(/dept/tools/lib); #use myPackage; print "hello world\n"; but when i uncomment the 'use myPackage' nothing shows up. please help. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:14 AM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
I'm more confused now than ever. Originally you wanted to execute a .CGI script (presumably a PERL script) from inside a PHP script. Now it looks like you want to do just the opposite. If that's the case then you would be better served by posting your question in a PERL email list. -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:53 PM To: Kevin Stone; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? thanks for the response. i have no problem executing a simple perl script using passthru() or system(), but looks like i can't use a package in that perl script. for example, i have a perl script like this: #!/usr/bin/perl use strict; use lib qw(/dept/tools/lib); #use myPackage; print "hello world\n"; but when i uncomment the 'use myPackage' nothing shows up. please help. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:14 AM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
Have you tried using virtual() ? virtual() is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:53 PM To: Kevin Stone; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? thanks for the response. i have no problem executing a simple perl script using passthru() or system(), but looks like i can't use a package in that perl script. for example, i have a perl script like this: #!/usr/bin/perl use strict; use lib qw(/dept/tools/lib); #use myPackage; print "hello world\n"; but when i uncomment the 'use myPackage' nothing shows up. please help. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:14 AM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
thanks for the response. i have no problem executing a simple perl script using passthru() or system(), but looks like i can't use a package in that perl script. for example, i have a perl script like this: #!/usr/bin/perl use strict; use lib qw(/dept/tools/lib); #use myPackage; print "hello world\n"; but when i uncomment the 'use myPackage' nothing shows up. please help. /bw -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:14 AM To: 'Boris Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
I believe include() will only work if the CGI script is written in PHP. You should be able to extract the results of a foreign script by running passthru() or system(). For example if I wanted to print out a listing of all the files in a directory. You can use the optional input to pass a CGI script some variables. I don't use the command line very often so I don't know the proper system command to execute a script. I imagine it's 'run' or 'execute' or something like that. But I'm sure it's possible. http://www.php.net/manual/en/function.system.php -Kevin -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] configuration problem? btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4 .0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] configuration problem?
btw, the reason i want to use include() is that i have a cgi script under the same directory structure but i don't want to use exec() since this command can't execute the cgi well enough (for one thing, the cgi script doesn't work well when i include "use warnings;" or create an object) and including the cgi script won't execute it so this won't work. i'm thinking of including the cgi script via http like: include ('http://www.myurl.com/hello.cgi') but the browser keeps on loading the page and returns a blank page eventually. contrastly, including a cgi script from other domains works just fine. /bw -Original Message- From: Boris Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] configure problem? hi, got a question on the usage of include: when i do something like this: http://www.myurl.com'); ?> where my php file is located under the same directory structure of www.my.url.com, the browse seems keep on loading until it returns a blank page. does this mean that php can't include any file located in the same directory structure of itself? or is it more like a configuration problem? here's my configure command from phpinfo(), if this helps: './configure' '--prefix=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5' '--with-apache=/workplace/dpd/btp/apache_1.3.20' '--enable-bcmath' '--with-config-file-path=/opt/third-party/depot/Linux-2.2c2.1-i686/php-4.0.5 /lib' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-ldap' thank you! /bw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php