Search Results

Search found 1371 results on 55 pages for 'cgi'.

Page 11/55 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Perl script rendered in browser as code through symlink - fine when accessed directly

    - by John Dittmar
    I have a Rails 4 app that has some views that post to Perl cgi scripts. The perl scripts are accessed via a symbolic link to a folder called "cgi-bin". When I navigate to a perl script through the symbolic link they are rendered as text instead of executed (ie: localhost:3000/cgi-bin/test.cgi), however when I access them directly they execute without issue (ie. localhost/path/to/cgi-bin/test.cgi). I am using apache2 on os x. In the directory localhost/path/to/ I have an .htaccess file that contains the following: # General Apache options AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI I have the exact same lines in the .htaccess file that I have in localhost:3000/ I have also uncommented the AllowOverride all in httpd.conf. The are no errors in apache's error log. When I access the direct link to test.cgi a new line is appended to apache's access log, when I access the script through the symbolic link (and it is rendered as text), there is no line appended to the access log. Any idea why this error occurs? This setup worked fine in a previous version of rails of OS X, but recently I upgraded to Mavericks and figured I should update the Rails application to v4.0 as well.

    Read the article

  • How can I track down "Template process failed: undef error" in Perl's Template Toolkit?

    - by swisstony
    I've moved a Perl CGI app from one web host to another. Everything's running fine except for Template Tookit which is giving the following error: "Template process failed: undef error - This shouldn't happen at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314." The templates are working fine on the other web host. I've set the DEBUG_ALL flag when creating the template object, but it doesn't provide any additional info about errors just loads of debug output. I can't post the template source as there's lots of client specific stuff in it. I've written a simple test template and that works okay. Just wondering if anyone had seen this error before or has any ideas on the quickest way to find a fix for it. EDIT: Here's a snippet of the code that loads and processes the template. my $vars = {}; $vars->{page_url} = $page_url; $vars->{info} = $info; $vars->{is_valid} = 0; $vars->{invalid_input} = 0; $vars->{is_warnings} = 0; $vars->{is_invalid_price} = 0; $vars->{output_from_proc} = $proc_output; ... my $file = 'clientTemplate.html'; #create ref to hash use Template::Constants qw( :debug ); my $template = Template->new( { DEBUG => DEBUG_SERVICE | DEBUG_CONTEXT | DEBUG_PROVIDER | DEBUG_PLUGINS | DEBUG_FILTERS | DEBUG_PARSER | DEBUG_DIRS, EVAL_PERL => 1, INCLUDE_PATH => [ '/home/perlstuff/templates', ], } ); $template->process( $file, $vars ) || die "Template process failed: ", $template->error(), "\n";

    Read the article

  • multiple php compiler on single apache installation

    - by getmizanur
    elloo, i have some old php scripts which runs on php-5.2.x and the current server has php-5.3.x. to get around this problem,i have got two options one is to downgrade php-5.3.x or install php-5.2.x and php-5.3.x at the same time where php-5.2.x serve cgi script. i have decided go for the second option i have followed this tutorial and i can get most of it working however except execution of shell script which selects php-cgi version. i cannot get apache to execute this script. how do i get apache to execute #!/bin/sh # you can change the PHP version here. version="5.2.6" # php.ini file location, */php-5.2.6/lib equals */php-5.2.6/lib/php.ini. PHPRC=/etc/php/phpfarm/inst/php-${version}/lib/php.ini export PHPRC PHP_FCGI_CHILDREN=3 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS # which php-cgi binary to execute exec /etc/php/phpfarm/inst/php-${version}/bin/php-cgi my apache vhost.conf <VirtualHost *:80> ServerName 526.localhost DocumentRoot /home/getmizanur/public_html/www <Directory "/home/getmizanur/public_html/www"> AddHandler php-cgi .php Action php-cgi /php-fcgi/php-cgi-5.2.6 </Directory> </VirtualHost> can some one tell me what am i doing wrong? thanks in advance. solution: if i did a2dismod php5 then the above configuration worked. when a2enmod php5 had been activated, apache was executing php5.3 instead of php5.2 even after telling apache to execute php5.2 shell script. to solve my problem, i had to change my virtualhost configuration <VirtualHost *:80> ServerName 526.localhost DocumentRoot /home/getmizanur/public_html/www DirectoryIndex index.php <Directory "/home/getmizanur/public_html/www"> AddHandler php-cgi .php Action php-cgi /php-fcgi/php-cgi-5.2.6 <FilesMatch "\.php"> SetHandler php-cgi </FilesMatch> </Directory> </VirtualHost> presto, it started working.

    Read the article

  • Storing Data from both POST variables and GET parameters

    - by Ali
    I want my python script to simultaneously accept POST variables and query string variables from the web address. The script has code : form = cgi.FieldStorage() print form However, this only captures the post variables and no query variables from the web address. Is there a way to do this? Thanks, Ali

    Read the article

  • Perl: How to retrieve XMLHttpRequest

    - by Peterim
    Hi guys! I have a client-side appliction which submits some data via AJAX POST request (request.open("POST", url, flag)) to my Perl CGI script. How do I retrieve this data with Perl and return some other data (AJAX response) instead? Thank you!

    Read the article

  • How to get IP address of your application server

    - by Jason
    I need to be able to find the IP address of the server the page is currently executing on. I have some code that calls a third party site and has to pass a specific key that changes depending on which server it is on. Is there a CGI variable or some way in ColdFusion to determine what the IP address is of the host server?

    Read the article

  • Odd Series of Packets, How would I reproduce this behavior?

    - by JustSmith
    I recorded a series of http packets that I cant programmatically recreate. The series of packets goes like this: HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Network.eth0.MACAddress,Properties.System.SerialNumber,DVTelTest,SightLogix.ProdShortName HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Properties.Image.Resolution HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=update&Network.RTSP.ProtViewer=password HTTP/1.1 HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Event HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=ImageSource.I0.Sensor HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) Notice the two GET followed by one response. I though the two gets were going out at the same time but there is no corresponding number of responses. Also when trying to reproduce this pattern as the server if I abort the first GET request the client waits until it times out and starts the request over with out sending any other requests. What is happening here? How can I reproduce it?

    Read the article

  • Configuration file for PHP server script

    - by teehoo
    Right now I have a very high volume of requests coming to my webserver which execute a PHP CGI script. Every one of these scripts opens up a config file that I have created to load options of how the script should run. Doing a file I/O operation everytime a request comes in seems very resource intensive to me. I'm not too familiar with the advanced features of PHP, are there any alternatives to achieve what I'm doing?

    Read the article

  • Perl throwing 403 errors!

    - by Jamie
    When I first installed Perl in my WAMP setup, it worked fine. Then, after installing ASP.net, it began throwing 403 errors. Here's my ASP.net config: Load asp.net module LoadModule aspdotnet_module "modules/mod_aspdotnet.so" Set asp.net extensions AddHandler asp.net asp asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo # Mount application AspNetMount /asp "c:/users/jam/sites/asp" # ASP directory alias Alias /asp "c:/users/jam/sites/asp" # Directory setup <Directory "c:/users/jam/sites/asp"> # Options Options Indexes FollowSymLinks Includes +ExecCGI # Permissions Order allow,deny Allow from all # Default pages DirectoryIndex index.aspx index.htm </Directory> # aspnet_client files AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" # Allow ASP.net scripts to be executed in the temp folder <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> Options FollowSymLinks Order allow,deny Allow from all </Directory> Also, what are the code tags for this site?

    Read the article

  • php-fpm not working several days,return 'No input file specified'

    - by Magic
    My server running ubuntu 64bit, nginx, php-fpm. Everything is working well. But several days after. The browser display 'No input file specified'.After I restart php-fpm. Everything run well again.But this situation occur again and again.So I must restart the php-fpm several days.Anyone know what's the problem? nginx -V output sshadmin@ubuntu:~$ nginx -V nginx: nginx version: nginx/0.9.7 nginx: built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5) nginx: TLS SNI support enabled nginx: configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module

    Read the article

  • How to pass $_GET variables to a PHP script via the command line?

    - by George Edison
    I am trying to create a webserver that serves PHP scripts. Currently, it works as follows: The client requests /index.php?test=value The server invokes php index.php The server feeds the HTTP request headers as STDIN to the PHP process The server reads the output of php from STDOUT and returns it to the client All of this is working except that the parameters are not being passed to the PHP script because: var_dump($_GET); returns: array(0) { } How do $_GET parameters get passed to the PHP binary when it is invoked?

    Read the article

  • Finding the current user authenticated by basic auth (Apache)

    - by jtd
    When you log in through a basic auth page, is the username you authenticated as stored anywhere (on the server or client machine), maybe in an environment variable? Background: I have a common web administration page for an e-mail server and I'd like to know who is doing what. When a user successfully logs in via basic auth, I somehow want to be able to identify them and log their actions. So each time a request is submitted, I can write to a log file. The basic format would be: $username ran a $function against $useraccount so if a user changed someone's permissions, eg: Admin-Bob ran a permission change against User-Scott So if errors occur, I can easily trace back in the log file what actions lead to the cause. I tried checking the %ENV hash to no avail, any Ideas? I don't really want to get into PHP-like sessions, because that would mean scrapping my basic auth, which gives me a fine degree of control already. If I have to code something with sessions, I'd need to implement a system to block users after maximum tries and so on, which I don't really want to code. I think this is better geared towards serverfault because it pertains to Apache moreso than the programming language. Sessions can be done in a myriad of languages.

    Read the article

  • Pause Nagios reloading in web interface

    - by 2rec
    Is there any option how could I turn off reloading of web page in Nagios web interface? Many times I checked many services and I needed the webpage to stay static and don't reload. One solution come to my mind - turn off the whole reloading for a while. Problem is that other people are using it too and they may want it at the time I don't want it. If anybody know about any kind of workaround or solution, please don't hesitate to write an answer. ;-) EDIT (+ reaction to the first answer): Maybe there could be a better way how to do it instead of modyfying nagios core. Interesting is, that I tried to disable javascript, it refreshed. I tried to disable http refreshing, it refreshed anyway. Has anybody know how and where is the refresh implemented?

    Read the article

  • case-insensitive regexp match on non-english text in perl cgi script

    - by jonny
    ok. I have list of catalog paths and need to filter out some of them. Match pattern comes in non-Unicode encoding. Tried following: require 5.004; use POSIX qw(locale_h); my $old_locale = setlocale(LC_ALL); setlocale(LC_ALL, "ru_RU.cp1251"); @{$data -> {doc_folder_rights}} = grep { $_->{doc_folder} =~/$_REQUEST{q}/i; # catalog path pattern in $_REQUEST{q} } @{$data -> {doc_folder_rights}}; setlocale(LC_ALL, $old_locale); What I need is case-insensitive regexp pattern matching when pattern contains russsian letters.

    Read the article

  • Hide script extension

    - by Ali
    I have a html form that posts to a python script test.py. If someone tries to access the script directly, it redirects them to the form. I not using a web framework, just straight python cgi programming. My website is hosted on a shared hosting provider that allows me access to a .htaccess file. I wanted to know if there was a way to have the form post to the script and in the address bar show mydomain.com/test/ and not mydomain.com/test.py ? Thanks.

    Read the article

  • How to begin writing an Application Server over Apache?

    - by Cracker
    For my college project, I want to create a simple application server in C that runs over Apache. Like .php, .asp, .jsp, the extension of my files would be .sas. I have already written a parser which reads the .sas files and generates the output. For example, consider a file index.sas with the below code: <% echo "Hello"; %> Now, if I execute: sas index.sas The result would be: Hello Now I want to use this program as an application server over Apache just as PHP, Tomcat, etc. work over Apache. I have heard of cgi-bin but I think PHP uses a different approach. I want to learn the approach which PHP uses. Please advice.

    Read the article

  • How to enable 'wget' to download the whole content of HTML with Javascript

    - by neversaint
    I have a site which I want to download using Unix wget. If you look at the source code and content of the file it contain section called SUMMARY. However after issuing a wget command like this: wget -O downdloadedtext.txt http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=mouse&c=gene&a=fiche&l=2610008E11Rik The content of the downdloadedtext.txt is incomplete and different with the source code of that site. For example it doesn't contain SUMMARY section. Is there a correct way to obtain the full content correctly? The reason I ask this because I want to automate the download from different values in that HTML.

    Read the article

  • Parent Thread exiting before Child Threads [python]

    - by crgwbr
    I'm using Python in a webapp (CGI for testing, FastCGI for production) that needs to send an occasional email (when a user registers or something else important happens). Since communicating with an SMTP server takes a long time, I'd like to spawn a thread for the mail function so that the rest of the app can finish up the request without waiting for the email to finish sending. I tried using thread.start_new(func, (args)), but the Parent return's and exits before the sending is complete, thereby killing the sending process before it does anything useful. Is there anyway to keep the process alive long enough for the child process to finish?

    Read the article

  • For anyone with free time: Trying to learn how to replace PHP with Python, failing terribly.

    - by MALON
    I want give web development using Python a shot, but I'm failing hard. I don't even know if I CAN run Python. The webpage for my web host says it supports all kinds of stuff, including Python. I've never touched anything CGI related and this does not appear to be a noob friendly area. Below is all the information I could think of that might be useful: Shared host: Yes Webhost: dibbsonhosting.com Server OS: linux Python installed: Yes (or so says the webhost) mod_python installed: Don't Know WSGI installed: Don't Know Access to http.conf: No Terminal access: No Cpanel: Yes FTP: Yes Django: downloaded latest stable release, not uploaded anywhere, not sure where to put it. DB: MySQL 5.x I really want to use Python for web development! Thanks!

    Read the article

  • How to execute python script on the BaseHTTPSERVER created by python?

    - by user1731699
    I have simply created a python server with : python -m SimpleHTTPServer I had a .htaccess (I don't know if it is usefull with python server) with: AddHandler cgi-script .py Options +ExecCGI Now I am writing a simple python script : #!/usr/bin/python import cgitb cgitb.enable() print 'Content-type: text/html' print ''' <html> <head> <title>My website</title> </head> <body> <p>Here I am</p> </body> </html> ''' I make test.py (name of my script) an executed file with: chmod +x test.py I am launching in firefox with this addres: (http : //) 0.0.0.0:8000/test.py Problem, the script is not executed... I see the code in the web page... And server error is: localhost - - [25/Oct/2012 10:47:12] "GET / HTTP/1.1" 200 - localhost - - [25/Oct/2012 10:47:13] code 404, message File not found localhost - - [25/Oct/2012 10:47:13] "GET /favicon.ico HTTP/1.1" 404 - How can I manage the execution of python code simply? Is it possible to write in a python server to execute the python script like with something like that: import BaseHTTPServer import CGIHTTPServer httpd = BaseHTTPServer.HTTPServer(\ ('localhost', 8123), \ CGIHTTPServer.CGIHTTPRequestHandler) ###  here some code to say, hey please execute python script on the webserver... ;-) httpd.serve_forever() Or something else...

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >