Search Results

Search found 8408 results on 337 pages for 'cgi bin'.

Page 3/337 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • 2010 cgi script failure

    - by Barry F
    Hi. I hope you can help, I'm just a beginner! I have listed a few extra details which may not be relevant. I upload cgi scripts onto local/personal directory on a Apache/2.2.10 server, using FTP95Pro in ASCII. The scripts execute correctly using perl on my web-server in a terminal session. Thus my code has no fatal syntax errors. Webpages 'action' each cgi script at /cgi-bin/. There are symbolic links which link system directory files to my local directory files. FollowSymLinks is enabled (unsure how). Permissions are correct (755). This set-up hasnt changed, apparently. The scripts have excuted perfectly for years, up to 2010. But now, in 2010, I have replaced working scripts with new script/files, now with exactly the same text, filename and permissions. Only the date (last modified) has changed. But now I receive a 500 Internal Server Error, and cannot determine why. My server administator assumes I have code errors. But code is unchanged since last year, and it runs fine (albeit no arguments) on web-server console using perl myscript.cgi Is there anything you can think of which may have changed ? I'm suspicious of the new decade. I think the server swapped from Linux to Windows OS last year, but my server administrator got it all working OK. Is there something unusual he may have missed, related to 2010 ? Thank you in advance

    Read the article

  • How to restart php-cgi automatically with spawn-fcgi

    - by mrm8
    I'm running nginx with php as fcgi. It's working just fine, however, php-cgi keeps on exit()ing after serving 500 requests. I tried increasing that value (PHP_FCGI_MAX_REQUESTS), and that worked, but that seems to be a workaround. Then I set it to 0, and it didn't exit() yet. But I think there's a reason why php-cgi should be restarted. At the moment, I'm running php-cgi with spawn-fcgi: when the php process exits, spawn-fcgi exits, too. Now, is there a way to automatically restart php (without dirty hacks like while [ 1 ]; do spawn-fcgi; done etc)?

    Read the article

  • XAMPP Mercurial installation on Windows Apache --> HgWebDir.cgi Script Error

    - by Tim
    I try to publish multiple existing mercurial repository-locations though XAMPP Apache via CGI Python script hgwebdir.cgi ... as in this tutorial http://mercurial.selenic.com/wiki/HgWebDirStepByStep I get the following error from the apache error logs, when I try to access the repository path with a browser: Premature end of script headers: hgwebdir.cgi [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] Premature end of script headers: hgwebdir.cgi [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] File "C:/hostdir/xampp/cgi-bin/hg/hgwebdir.cgi", line 39\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] test = c:/hostdir/mercurial/test/\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] ^\r [Tue Apr 20 16:00:50 2010] [error] [client 91.67.44.216] SyntaxError: invalid syntax\r This is the path of the file where the script fails (and if I remove it, I get an empty HTML page shown with no visual elements in it): [paths] test = c:/hostdir/mercurial/test/ /hg = c:/hostdir/mercurial/** / = c:/hostdir/mercurial/ Does anybody have a clue for me?

    Read the article

  • Python CGI on Amazon AWS EC2 micro-instance -- a how-to!

    - by user595585
    How can you make an EC2 micro instance serve CGI scripts from lighthttpd? For instance Python CGI? Well, it took half a day, but I have gotten Python cgi running on a free Amazon AWS EC2 micro-instance, using the lighttpd server. I think it will help my fellow noobs to put all the steps in one place. Armed with the simple steps below, it will take you only 15 minutes to set things up! My question for the more experienced users reading this is: Are there any security flaws in what I've done? (See file and directory permissions.) Step 1: Start your EC2 instance and ssh into it. [Obviously, you'll need to sign up for Amazon EC2 and save your key pairs to a *.pem file. I won't go over this, as Amazon tells you how to do it.] Sign into your AWS account and start your EC2 instance. The web has tutorials on doing this. Notice that default instance-size that Amazon presents to you is "small." This is not "micro" and so it will cost you money. Be sure to manually choose "micro." (Micro instances are free only for the first year...) Find the public DNS code for your running instance. To do this, click on the instance in the top pane of the dashboard and you'll eventually see the "Public DNS" field populated in the bottom pane. (You may need to fiddle a bit.) The Public DNS looks something like: ec2-174-129-110-23.compute-1.amazonaws.com Start your Unix console program. (On Max OS X, it's called Terminal, and lives in the Applications - Utilities folder.) cd to the directory on your desktop system that has your *.pem file containing your AWS keypairs. ssh to your EC2 instance using a command like: ssh -i <<your *.pem filename>> ec2-user@<< Public DNS address >> So, for me, this was: ssh -i amzn_ec2_keypair.pem [email protected] Your EC2 instance should let you in. Step 2: Download lighttpd to your EC2 instance. To install lighttpd, you will need root access on your EC2 instance. The problem is: Amazon will not let you sign in as root. (Not straightforwardly, at least.) But there is a workaround. Type this command: sudo /bin/bash The system prompt-character will change from $ to #. We won't exit from "sudo" until the very last step in this whole process. Install the lighttpd application (version 1.4.28-1.3.amzn1 for me): yum install lighttpd Install the FastCGI libraries for lighttpd (not needed, but why not?): yum install lighttpd-fastcgi Test that your server is working: /etc/init.d/lighttpd start Step 3: Let the outside world see your server. If you now tried to hit your server from the browser on your desktop, it would fail. The reason: By default, Amazon AWS does not open any ports to your EC2 instance. So, you have to open the ports manually. Go to your EC2 dashboard in your desktop's browser. Click on "Security Groups" in the left pane. One or more security groups will appear in the upper right pane. Choose the one that was assigned to your EC2 instance when you launched your instance. A table called "Allowed Connections" will appear in the lower right pane. A pop-up menu will let you choose "HTTP" as the connection method. The other values in that line of the table should be: tcp, 80, 80, 0.0.0.0/0 Now hit your EC2 instance's server from the desktop in your browser. Use the Public DNS address that you used earlier to SSH in. You should see the lighttpd generic web page. If you don't, I can't help you because I am such a noob. :-( Step 4: Configure lighttpd to serve CGI. Back in the console program, cd to the configuration directory for lighttpd: cd /etc/lighttpd To enable CGI, you want to uncomment one line in the < modules.conf file. (I could have enabled Fast CGI, but baby steps are best!) You can do this with the "ed" editor as follows: ed modules.conf /include "conf.d\/cgi.conf"/ s/#// w q Create the directory where CGI programs will live. (The /etc/lighttpd/lighttpd.conf file determines where this will be.) We'll create our directory in the default location, so we don't have to do any editing of configuration files: cd /var/www/lighttpd mkdir cgi-bin chmod 755 cgi-bin Almost there! Of course you need to put a test CGI program into the cgi-bin directory. Here is one: cd cgi-bin ed a #!/usr/bin/python print "Content-type: text/html\n\n" print "<html><body>Hello, pyworld.</body></html>" . w hellopyworld.py q chmod 655 hellopyworld.py Restart your lighttpd server: /etc/init.d/lighttpd restart Test your CGI program. In your desktop's browser, hit this URL, substituting your EC2 instance's public DNS address: http://<<Public DNS>>/cgi-bin/hellopyworld.py For me, this was: http://ec2-174-129-110-23.compute-1.amazonaws.com/cgi-bin/hellopyworld.py Step 5: That's it! Clean up, and give thanks! To exit from the "sudo /bin/bash" command given earlier, type: exit Acknowledgements: Heaps of thanks to: wiki.vpslink.com/Install_and_Configure_lighttpd www.cyberciti.biz/tips/lighttpd-howto-setup-cgi-bin-access-for-perl-programs.html aws.typepad.com/aws/2010/06/building-three-tier-architectures-with-security-groups.html Good luck, amigos! I apologize for the non-traditional nature of this "question" but I have gotten so much help from Stackoverflow that I was eager to give something back.

    Read the article

  • Make index.cgi redirect to Apache webserver document root

    - by Casey
    I'm trying to expose a CGI file as my document root and web server. I do not want to expose the fact that the server is running a CGI script. How can I map a URL http://host/index.cgi/ back to http://host/ in Apache2? I'm guessing it involves mod-rewrite, but I haven't finished grokking all the docs yet. The following configuration is working, but I'm guessing there is a more complete solution: RewriteEngine ON Redirect /index.cgi/ /

    Read the article

  • how to change ruby path from /usr/bin/ruby to /usr/local/bin/ruby

    - by HelloWorld
    reading around the various ruby install tutorials it's required to change path from /usr/bin/ruby to /usr/local/bin/ruby but i cant seem to be able to do it. Ultimately i want to install Ruby 1.9.2, should i uninstall 1.8.7 or what? i tried to install Ruby 1.9.2 with macports, the installation seemed to go ok, but i cant find the new version, i seem to be stuck with 1.8.7 iMac:~ rebel$ which ruby /usr/bin/ruby rebel$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] .profile export PATH=/opt/local/bin:/opt/local/sbin:$PATH export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

    Read the article

  • run .net consolapp out of a cgi script

    - by Nico
    Hello there, i have written a simple cgi python script which looks like this #!c:/Python25/python.exe -u import cgi import os def main(): print "Content-type: text/html\n" form = cgi.FieldStorage() print form["firstname"].value os.execvp("D:\\path\\to\\my\\consolapp.exe", [""]) main() As you can se i'd like to start a consoleapp which i have written in .net. But my consoleapp crashs when i call the cgi script. So i did a little debuging and write a text file after some actions i do in my .net program. The result was that my programm crash everytime i'd like to open a access mdb file. It told me that i need the Microsoft Data Access Components (MDAC). But i cant belive this message because my .net consoleapp runs without errors if i start it from my own. So can anybody give me some advise how i can call my .net consol ab through a webscript. I'm happy for every advise So it don't have to be a solution using a cgi script. Regards, Nico

    Read the article

  • Running nph-script.cgi keeps outputting Server details at the end

    - by wgewweg
    I am running a nph-script.cgi on my server. The server keeps adding HTTP/1.1 200 OK Date: Thu, 05 Nov 2009 02:28:53 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.8-1hardy~ppa1 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/plain X-Pad: avoid browser bug At the bottom of each page loaded via the .cgi script. why is this the case? How do I remove this annoying message that is appended to all pages ?

    Read the article

  • php-cgi cpu usage is super high

    - by Ryan Thompson
    I am getting constantly high and wildly fluctuating CPU usage % for php-cgi commands as seen via "top" on my Centos server.. I have a server density account and it seems that this is a common trend: User - PID - CPU % - MEM % - VSZ - RSS - TT - Stat - Started - Time - Command 500 - 6389 - 22.4 - 3 - 271136 - 32380 - ? - S - 20:26 - 0:40 - /usr/bin/php-cgi Seems there are about 6 or so of those records in my processes list at any given check-in. Any ideas what's causing this? I have fast_cgi installed and the module is loading.. Not sure why it isn't handling this though. Any help would be greatly appreciated! Ryan

    Read the article

  • PHP cgi locks up and times out.

    - by Oli
    I've got a dozen wordpress sites hosted on a nginx/php-cgi setup. After a variable amount of time (usually not that long, and occasionally very fast) PHP locks up and after 2 minutes (the timeout I set in nginx), it get a 504 timeout. I've tried everything I can think of. I've been using an init script to launch php-cgi but I compiled out php-fpm and tried that for a day with various configurations with the same results. I've tried a low number of PHP_FCGI_CHILDREN. I've tried as high as my RAM will let me. I've tried various settings for PHP_FCGI_MAX_REQUESTS. xcache seemed to exacerbate the issue, so I removed it. The server is a VPS but it has over a gig of ram dedicated to it. All suggestions are welcome at this juncture because I'm desperate.

    Read the article

  • Apache2 - setting PERL5LIB via SetEnv under CGI

    - by j0nes
    Hi, my setup is as follows: I have one Apache2 webserver running different vhosts, one vhost is for the production website, the other vhost is for a staging / preview system. Both vhosts have different DocumentRoots and also different (Perl) CGI folders. The used modules for each of these vhosts should be in different directories, so I did the following: <VirtualHost...> ServerName production SetEnv PERL5LIB /home/production/modules </VirtualHost> <VirtualHost...> ServerName staging SetEnv PERL5LIB /home/staging/modules </VirtualHost> However, I just noticed that in my Perl CGI scripts, both paths get filled into my @INC, so I can not separate the staging modules from the production modules, e.g. the SetEnv directive is not limited to a single virtual host, but seems to work globally. How can I solve this? Thanks! Jonas

    Read the article

  • Find which php scripts cause high CPU with php-cgi

    - by Oli
    Background: I maintain a server for a client who has half a dozen Wordpress sites on. They all have the W3 Total Cache plugin installed and eAcellerator is installed (might be APC). All the PHP sites run through a single batch of fastcgi php-cgi processes (it's actually php-fpm but I'm not sure if that makes a difference). Problem: php-cgi's CPU usage is quite high. Not terminally high but high enough to raise an eyebrow. The client wants to add more sites in the future and I want to avoid becoming CPU limited if I can help it. Question: Is there any way I can find the scripts or even just requests that are causing the high CPU. I realise I might not be able to do anything with the results but it would give me a chance.

    Read the article

  • Making lighttpd redirect from www.exampe.com to www.example.com/cgi-bin/index.pl

    - by jarmund
    What the title says.. www.example.com is defined in lighttpd.conf as a virtual host: $HTTP["host"] =~ "(^|\.)example.com$" { server.document-root = "/usr/www/example.com/http" accesslog.filename = "/var/log/www/example.com/access.log" $HTTP["url"] =~ ".pl$" { cgi.assign = (".pl" => "/usr/bin/perl" ) } } However, instead of going by the files listed in index-file.names (the usual index.html, default.html, etc), i want all requests to the root of the virtual host to be forwarded to /cgi-bin/index.pl. What's the easiest/best way of doing this? This need is a special case, and will only apply to this virtualhost. Is it possible to have that particular virtualhost send a redirect in the header?

    Read the article

  • Windows 7: How to display the total size of Recycle Bin

    - by Mehper C. Palavuzlar
    On Windows XP, the total size of Recycle Bin could be seen easily, but I can't see it on Windows 7. Why did Microsoft hide/remove this feature? Am I missing something? REMARK 1: I don't need to see the maximum size that Recyle Bin can contain. REMARK 2: Once you have several files selected in the Recycle Bin, you get a "See more details" link in the status bar, but clicking on that does not display the total file size. Microsoft has apparently changed this.

    Read the article

  • Apache: Use Specific Applicaion for CGI scripts

    - by RandomInsano
    I have two servers, one in production and one for development. The production server is Solaris, dev is FreeBSD. Because of this, python is installed in different directories. I'm using Python right now for making CGI scripts, and needing to remember to swap my hashbangs when I copy from dev to production is a little annoying (Same issue for SVN updates depending on which server I'm comitting from). Is there a way to configure apache so that I no longer need to hashbangs? Like, if it would lauch python and supply the CGI script for it? Might be a bit of a stretch, but no harm in asking

    Read the article

  • Running nph-script.cgi keeps outputting Server details at the end

    - by wgewweg
    I am running a nph-script.cgi on my server. The server keeps adding HTTP/1.1 200 OK Date: Thu, 05 Nov 2009 02:28:53 GMT Server: Apache/2.2.8 (Ubuntu) PHP/5.2.8-1hardy~ppa1 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/plain X-Pad: avoid browser bug At the bottom of each page loaded via the .cgi script. why is this the case? How do I remove this annoying message that is appended to all pages ?

    Read the article

  • 404 Not Found for a PL script that exists!

    - by Abs
    Hello all, I make a GET request to a CGI script and I get a 404 error. However, I am 100% sure that script is present and it has permissions: -rwxr-xr-x 1 apache apache 6520 Sep 7 03:01 uu_ini_status_audios.pl The request URL is: http://mysite.com/cgi-bin/uu_ini_status_audios.pl?tmp_sid=893facacc5dc392ad0f4c91e6a9e8d40&rnd_id=0.12266222834382812 The error I get: The requested URL /cgi-bin/uu_ini_status_audios.pl was not found on this server. This use to work for me before, but I think it stopped working after I restarted apache so maybe it means its a configuration I changed?? I checked the error logs for apache and php and nothing useful was found to help me with my problem! I appreciate any help on this!

    Read the article

  • PERL CGI gives me error connecting MySQL

    - by dexter
    this is the code by Sinan Ünür for more information see this Example use strict; use warnings; use CGI::Simple; use DBI; my $cgi = CGI::Simple->new; my $dsn = sprintf( 'DBI:mysql:database=%s;host=%s', 'cdcol', 'localhost' ); my $dbh = DBI->connect($dsn, root => '', { AutoCommit => 0, RaiseError => 0 } ); my $status = $dbh ? 'Connected' : 'Failed to connect'; print $cgi->header, <<HTML; <!DOCTYPE HTML> <html> <head><title>Test</title></head> <body> <h1>Perl CGI Script</h1> <p>$status</p> </body> </html> HTML this code gives me error: The server encountered an internal error and was unable to complete your request. Error message: Can't locate CGI/Simple.pm in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/perl/index.pl line 4. BEGIN failed--compilation aborted at C:/xampp/htdocs/perl/index.pl line 4. , Error 500 localhost 3/25/2010 11:19:19 AM Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 what does this means ? how to resolve this

    Read the article

  • Why does my Perl CGI script complain about "Can't locate CGI/Simple.pm"?

    - by dexter
    For more information see this Example use strict; use warnings; use CGI::Simple; use DBI; my $cgi = CGI::Simple->new; my $dsn = sprintf( 'DBI:mysql:database=%s;host=%s', 'cdcol', 'localhost' ); my $dbh = DBI->connect($dsn, root => '', { AutoCommit => 0, RaiseError => 0 } ); my $status = $dbh ? 'Connected' : 'Failed to connect'; print $cgi->header, <<HTML; <!DOCTYPE HTML> <html> <head><title>Test</title></head> <body> <h1>Perl CGI Script</h1> <p>$status</p> </body> </html> HTML This code gives me error: The server encountered an internal error and was unable to complete your request. Error message: Can't locate CGI/Simple.pm in @INC (@INC contains: C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/perl/index.pl line 4. BEGIN failed--compilation aborted at C:/xampp/htdocs/perl/index.pl line 4. , Error 500 localhost 3/25/2010 11:19:19 AM Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 What does this mean and how can I resolve it?

    Read the article

  • Configure IIS to pass-through CGI output without any conditioning

    - by Daniel Watrous
    I'm building a web service on Windows 2008 R2 with IIS 7.5 and Python 2.5. Right now I have the Handler Mappings and everything else setup just fine, Except that IIS is modifying what it gets back from the CGI script before sending it along the the client. Here's an example: I wrote the following CGI script: # hello.py print "Status: 400 Bad Request" print "Content-Type: text/html" print print "Error Message" According to the HTTP spec this should be fine and a Status of 400 should allow for a description of the error message in the body of the response. When the server response actually comes back to me I get the following: Status: 400 Bad Request Date: Fri, 11 Feb 2011 17:58:30 GMT X-Powered-By: ASP.NET Connection: close Content-Length: 11 Server: Microsoft-IIS/7.5 Content-Type: text/html Bad Request I've seen on this forum and others where I can change or eliminate the X-Powered-By header element, but I would like IIS to leave it alone altogether. I'm not sure why it takes my response, deletes "Error Message" from the body and replaces it with "Bad Request" and then adds all that other junk in. Is there some way to tell IIS to just send the response along without making any changes at all?

    Read the article

  • PHP Suhosin extension is not loading

    - by wintercounter
    For some reason i have to adjust the suhosin.request.max_vars and suhosin.post.max_vars directives. I'm using ispCP, and it has default the suhosin patch, but as i read, i need to install the extension too. I've did this with apt-get install php5-suhosin and the suhosin.ini appeared in conf.d, and suhosin.so exists too in /usr/lib/php5. After the Apache restart the extension isn't loading. phpinfo() says: Scan this dir for additional .ini files /etc/php5/cgi/conf.d additional .ini files parsed /etc/php5/cgi/conf.d/adodb.ini, /etc/php5/cgi/conf.d/curl.ini, /etc/php5/cgi/conf.d/eAccelerator.ini, /etc/php5/cgi/conf.d/gd.ini, /etc/php5/cgi/conf.d/idn.ini, /etc/php5/cgi/conf.d/imagick.ini, /etc/php5/cgi/conf.d/imap.ini, /etc/php5/cgi/conf.d/mcrypt.ini, /etc/php5/cgi/conf.d/memcache.ini, /etc/php5/cgi/conf.d/mhash.ini, /etc/php5/cgi/conf.d/ming.ini, /etc/php5/cgi/conf.d/mysql.ini, /etc/php5/cgi/conf.d/mysqli.ini, /etc/php5/cgi/conf.d/pdo.ini, /etc/php5/cgi/conf.d/pdo_mysql.ini, /etc/php5/cgi/conf.d/pdo_sqlite.ini, /etc/php5/cgi/conf.d/ps.ini, /etc/php5/cgi/conf.d/pspell.ini, /etc/php5/cgi/conf.d/recode.ini, /etc/php5/cgi/conf.d/snmp.ini, /etc/php5/cgi/conf.d/sqlite.ini, /etc/php5/cgi/conf.d/tidy.ini, /etc/php5/cgi/conf.d/xmlrpc.ini, /etc/php5/cgi/conf.d/xsl.ini As you can see, it doesn't loads the suhosin.ini. What can be the problem?

    Read the article

  • How to return 404 from Apache2 CGI program

    - by fastmonkeywheels
    I'm using mod_rewrite to redirect all incoming requests to a CGI application. I now need to have the application return a 404 if the requested file isn't found. How can I go about this from my program? The first line sent is the content-type while it's the line before that that usually indicates the status (200/404/500, etc).

    Read the article

  • nginx, php-cgi and "No input file specified."

    - by Stephen Belanger
    I'm trying to get nginx to play nice with php-cgi, but it's not quite working how I'd like. I'm using some set variables to allow for dynamic host names--basically anything.local. I know that stuff is working because I can access static files properly, however php files don't work. I get the standard "No input file specified." error which normally occurs when the file doesn't exist, but it definitely does exist and the path is correct because I can access the static files in the same path. It could possibly be a permissions thing, but I'm not sure how that could be an issue. I'm running this on Windows under my own user account, so I think it should have permission unless php-cgi is running under a different user without me telling it to. . Here's my config; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; server { # Listen for HTTP listen 80; # Match to local host names. server_name *.local; # We need to store a "cleaned" host. set $no_www $host; set $no_local $host; # Strip out www. if ($host ~* www\.(.*)) { set $no_www $1; rewrite ^(.*)$ $scheme://$no_www$1 permanent; } # Strip local for directory names. if ($no_www ~* (.*)\.local) { set $no_local $1; } # Define default path handler. location / { root ../Users/Stephen/Documents/Work/$no_local.com/hosts/main/docs; index index.php index.html index.htm; # Route non-existent paths through Kohana system router. try_files $uri $uri/ /index.php?kohana_uri=$request_uri; } # pass PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { root ../Users/Stephen/Documents/Work/$no_local.com/hosts/main/docs; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } # Prevent access to system files. location ~ /\. { return 404; } location ~* ^/(modules|application|system) { return 404; } } }

    Read the article

  • Missing output when running system command in perl/cgi file

    - by aladine
    I need to write a CGI program and it will display the output of a system command: script.sh echo "++++++" VAR=$(expect -c " spawn ssh -o StrictHostKeyChecking=no $USER@$HOST $CMD match_max 100000 expect \"*?assword:*\" send -- \"$PASS\r\" send -- \"\r\" expect eof ") echo $VAR echo "++++++" In CGI file: my $command= "ksh ../cgi-bin/script.sh"; my @output= `$command`; print @output; Finally, when I run the CGI file in unix, the $VAR is a very long string including \n and some delimiters. However, when I run on web server, the output is ++++++ ++++++ So $VAR is missing when passing in the web interface/browser. I know maybe the problem is $VAR is very long string. But anyway, is there anyway to solve this problem except writing the output to a file then retrieve it from browser? Thanks if you are interested in my question.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >