Search Results

Search found 5595 results on 224 pages for 'mod perl'.

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

  • Calling a protected Windows executable with Perl

    - by Jake
    I'm trying to write a perl script that determines which users are currently logged into Windows by using query.exe (c:\Windows\system32\query.exe). Perl is unable to access this file, unable to execute it, even unable to see that it exists, as I've found with the following code: print `dir c:\\windows\\system32\\query*`; This produces the following output: 07/13/2009 05:16 PM 1,363,456 Query.dll 1 File(s) 1,363,456 bytes 0 Dir(s) 183,987,658,752 bytes free I've checked the user executing the script using perl's getlogin function, and it returns the name of a member of the local Administrators group (specifically, me). I've also tried adding read/execute permissions for "Everyone", but windows keeps giving me access denied errors when I try to modify this file's permissions. Finally, I've tried running perl.exe as an administrator but that doesn't fix the problem either. Is this something I can solve by changing some settings in Windows? Do I need to add something to my perl script? Or is there just no way to grant perl access to some of these processes?

    Read the article

  • calling perl script from mysql trigger

    - by Bahareh
    I want to call a perl script inside a mysql after insert trigger. but my trigger does not work.I find this solution from google. here is my code: DROP TRIGGER IF EXISTS 'tr1'// CREATE TRIGGER 'tr1' AFTER INSERT ON 'username' FOR EACH ROW begin SET @result=sys_exec(CONCAT('/usr/bin/perl /etc/p1.pl')); end // and my p1.pl code: #!/usr/bin/perl open(MYFILE,'>>/etc/data.txt'); print MYFILE "BOB\n"; close MYFILE; thanks.

    Read the article

  • Perl program not getting executed in xampp

    - by user1867151
    I am very new to CGI programming in Perl. In order to learn it i installed xampp 2 days back. But I am unable to execute my perl code . The code goes as folows: #!/usr/bin/perl use CGI; $co = new CGI; print $co->header, $co->start_html(title=>'CGI Example'), $co->center($co->hi('Subhayan welcome to CGI')), $co->end_html; Have saved the code in a text file named : Subhayan1.cgi and kept it in the folder cgi-bin under xampp folder in C drive. When i try to execute this through my web browser typing : "http://localhost/cgi-bin/Subhayan1.cgi" it comes up with a "Object not found page". I checked the apache configuration file under : xampp/apache/conf/httpd.conf. I checked the entry : ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/" It looks like pointing to the correct directory. What is the issue here can anyone help please???

    Read the article

  • How can I enable logging for requests going through mod proxy

    - by Kariem
    Is there a way to log requests going through mod proxy? I need a way to debug my configuration, because I don't seem to be getting where I should be. I need the following information: headers of incoming requests what is being sent to the proxy target Maybe a related question: is there a way to strip some headers? I tried the following: ProxyPass /proxy/other http://not.under.my.control/ <Location /proxy/other> ProxyPassReverse / RequestHeader unset Authorization </Location> I don't really know whether this is ok, because I don't see anything. Thank you, Kariem

    Read the article

  • how to mod rewrite unicode byte sequence for the multibyte hyphen character

    - by ChickenFur
    We have case where some adobe pdf files format the hyphen character as %E2%80%90. See http://forums.adobe.com/message/2807241 this is caused by the Calibri font I guess. So these pdf files have been released and the links don't work So I thought mod rewrite would come to the rescue. I followed this post here mod_ReWrite to remove part of a URL but I can't seem to search for the % characters according to this question. Is there anything else I can do? Here is the rewrite rule I want to use: RewriteRule ^foo%(.+)bar /foo-bar [L,R=301] I also tried this and it doesn't work RewriteRule ^foo%E2%80%90bar /foo-bar [L,R=301] Any Ideas?

    Read the article

  • Blocking a specific URL by IP (a URL create by mod-rewrite)

    - by Alex
    We need to block a specific URL for anyone not on a local IP (anyone without a 192.168.. address) We however cannot use apache's <Directory /var/www/foo/bar> Order allow,deny Allow from 192.168 </Directory> <Files /var/www/foo/bar> Order allow,deny Allow from 192.168 <Files> Because these would block specific files or directories, we need to block a specific URL which is created by mod-rewrite and the page is dynamically created using PHP. Any ideas would be greatly appreciated

    Read the article

  • Getting Perl DBD::mysql working on OS X 10.7?

    - by Bart B
    I can't seem to get Perl & MySQL to talk to each other on OS X 10.7 Lion. I did all the installs by the book, I used Oracle's PKG installer for the latest MySQL Community Server, and I installed DBI and DBD::mysql via CPAN. There were not problems at all during the install, but, when I try to USE DBD::mysql to connect to my local DB server I get the following error: install_driver(mysql) failed: Can't load '/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle, 1): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204. at (eval 3) line 3 Compilation failed in require at (eval 3) line 3. Perhaps a required shared library or dll isn't installed where expected After a lot of googling all I could find were suggested hacks, so I gave this one a go: http://arkoftech.wordpress.com/2011/02/10/fixing-dbdmysql-for-mysql-5-5-89-under-macos-10-6-x/ I had to update some of the paths in the instructions since on Lion it's Perl 5.12 not 5.10. After doing that I got a new error: dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: flat namespace dyld: Symbol not found: _mysql_init Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle Expected in: flat namespace Trace/BPT trap: 5 There must be a simple way to get MySQL & Perl working on OS X? - HELP!

    Read the article

  • Install perl module with dependencies

    - by AlxAlx
    I'm trying to install a Perl module like this : pi@raspbmc:~$ sudo cpan HTTP::Date Cpan get the file Checksum is ok uncompressed successfully But I got this error : Using Tar:/bin/tar xf "HTTP-Date-6.02.tar": Couldn't untar HTTP-Date-6.02.tar: 'Cannot allocate memory' Any ideas ? My filesystem : Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 15G 2.1G 12G 16% / /dev/mmcblk0p1 69M 8.1M 61M 12% /boot EDIT : I tryed curl -L http://cpanmin.us | perl - App::cpanminus But when I do sudo cpanm HTTP::Date I got this error : -bash: cpanm: command not found

    Read the article

  • perl hide system output

    - by Chris
    Using perl 5.8.8 on linux, need the output of a perl 'system' command to be hidden. The command in my code is : system("wget", "$url", "-Omy_folder/$date-$target.html", "--user-agent=$useragent"); I've tried using " /dev/null 2&1" in different places in the system command, like this- system("wget", "$url", "-Omy_folder/$date-$target.html", "--user-agent=$useragent"," /dev/null 2&1"); Can anyone help me with where the redirection to /dev/null should be?

    Read the article

  • Dynamically set current domain in nginx with perl module

    - by Simone Margaritelli
    i know how to set variables and use subroutines with the nginx builtin perl module INSIDE a "server" directive but, what i need to do is to set/rewrite the current domain before ... let's say, we have a domain like admin.foobar.website.com i want that a request to foobar.othersite.com points to the first address ( obviously website.com and othersite.com are hosted on the same webserver running nginx :) ). For reasons i can't explain here, i can not use multiple server_name directive expressions, i have to do this before the server {} block, with perl or anyway possible. Thanks

    Read the article

  • Perl program doesn't get displayed in browser (windows)

    - by Dextar
    system info: i have installed XAMPP on my machine having Window XP OS . also installed Apache2.2, now, i have created two folders in C:\xampp\htdocs they are php and perl . these folder contains programs in their respective languages (ie index.php and index.pl respectively) when i type in browser : http: //localhost:88/php/ the program in index.php gets executed and o/p is displayed in browser but , when i type: http://localhost:88/perl/ browser displays a blank page PROBLEM : how to run .pl file in above scenario ?

    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

  • Perl Script in background

    - by himz
    I have a perl script i made to automatically telnet into different servers . but its interface is only command line. To make it more user friendly for general windows users , i need to make GUI for it . My idea is to make GUI in a language like VB,java ,etc and let that call perl script . my script will run in background in a command prompt and whatever the result it displays back in GUI. Got some success. GUI in vb ,I run an instance of CMD in background ,run perl script in that .But that is wer program fails .As perl script runs in a thread for perl , i only get the output when script completes(rather say when it timeout). i need a mechanism where i can interact with the perl script , take output of script and show to user , then take input from user and so on . Please can you all suggest me some way to actually make this happen. PS: No limitation on using any language for GUI (as core work is done by perl script,GUI only there to give appropriate commands to script) Thanks in advance

    Read the article

  • How do I install 32-bit perl-tgicl 2.1.1?

    - by Daniel Fernandez
    I'm trying to install a .deb and I need some packages but they are not on the synaptic. How can I install this packages lib32z1 libc6-i386 TGICL$ sudo dpkg -i perl-tgicl_2.1-1_all.deb Selecting previously deselected package perl-tgicl. (Reading database ... 168515 files and directories currently installed.) Unpacking perl-tgicl (from perl-tgicl_2.1-1_all.deb) ... dpkg: dependency problems prevent configuration of perl-tgicl: perl-tgicl depends on lib32z1 (>= 1:1.1.4); however: Package lib32z1 is not installed. perl-tgicl depends on libc6-i386 (>= 2.3); however: Package libc6-i386 is not installed. perl-tgicl depends on libfile-homedir-perl (>= 0.10); however: Package libfile-homedir-perl is not installed. perl-tgicl depends on libfile-spec-perl (>= 0.10); however: Package libfile-spec-perl is not installed. dpkg: error processing perl-tgicl (--install): dependency problems - leaving unconfigured Processing triggers for man-db ... Errors were encountered while processing: perl-tgicl My OS: $ uname -a Linux 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux

    Read the article

  • Why is there still so much offer for Perl programmers?

    - by user491444
    A quick search on monster.com on different scripting languages resulted on Perl having much more job opportunities than Python and Ruby (in Europe, I didn't check for the rest of the world), and since I'm just a newbie programmer I was wondering why is this? I've read everywhere that Python and Ruby are much better languages, and much more organized. Having coded in python and php myself, Perl's code seems so alien to me. Anyways, sorry for my poor English, it's my second language, and this is not a critique on the Perl language, I was just wondering whether it's a good idea to learn it at this point or not.

    Read the article

  • Is there a perl idiom which is the functional equivalent of calling a subroutine from within the sub

    - by Thomas L Holaday
    Perl allows ... $a = "fee"; $result = 1 + f($a) ; # invokes f with the arugment $a but disallows, or rather doesn't do what I want ... s/((fee)|(fie)|(foe)|(foo))/f($1)/ ; # does not invoke f with the argument $1 The desired-end-result is a way to effect a substitution geared off what the regex matched. Do I have to write ... sub lala { my $haha = shift; return $haha . $haha; } my $a = "the giant says foe" ; $a =~ m/((fee)|(fie)|(foe)|(foo))/; my $result = lala($1); $a =~ s/$1/$result/; print "$a\n"; ... ?

    Read the article

  • What should I use for a Perl script's shebang line?

    - by Anonymous
    Which of these is better or faster to use as the shebang line for a Perl script? #! perl #! perl.exe #! fullpath/perl(/perl.exe) #! partialpath/perl(/perl.exe) And, when using #!perl, when it works on a particular system, how do I find out in the script which perl interpreter I'm using so I can put that one into the shebang line? And, if using a /path/path/perl, are "*" or "..." allowed to be used for the folders?

    Read the article

  • Mod Rewrite Help - Pseudo-Subdirectories

    - by Gimpyfuzznut
    I am dealing with a frustrating problem with Joomla that is going to require some url trickery. The idea is straight-forward but after reading a bunch of guides for mod-rewrite, I still can't seem to get it work. Let's say my site is www.mysite.com. Joomla is already performing some rewriting for SEF urls so I have links like www.mysite.com/home and www.mysite.com/news and so on. I want to be able to have (4) pseudo-subdirectories like www.mysite.com/mode1/ and www.mysite.com/mode2/ and so on. These subdirectories should work as if the subdirectory isn't there, ie both www.mysite.com/mode1/home and www.mysite.com/mode2/home should pull up the same www.mysite.com/home. It should point any www.mysite.com/mode1/anypagehere to www.mysite.com/anypagehere. The reason I am asking for this is because I will be reading the url for mode1, mode2, etc, to modify the template page. There will be a landing page that will direct people to /mode1/ and /mode2/ etc and the template will change based on that. Note, that I don't want to actually pass a parameter to the url accessible by a GET or whatever because Joomla removes it (perhaps because of my current mod_rewrite settings). I've pasted the current .htaccess file. RewriteBase /joomla ##########Rewrite rules to block out some common exploits RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a <script> tag in URL RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] # Block out any script trying to set a PHP GLOBALS variable via URL RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] # Block out any script trying to modify a _REQUEST variable via URL RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) # Send all blocked request to homepage with 403 Forbidden error! RewriteRule ^(.*)$ index.php [F,L] ########## Begin - Joomla! core SEF Section RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/index.php RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC] RewriteRule (.*) index.php #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] ########## End - Joomla! core SEF Section

    Read the article

  • mod rewrite works fine apart from for missing directory index files

    - by j w
    I have a legacy web site hosted on Apache. It has a number of web pages sitting in the public web root and its subfolders. publicDocs/ directorywith_no_defaultfile/ some-legacy-flat-page.htm .htaccess index.php some-legacy-flat-page.htm I would like to start using Zend MVC for some of the newer pages. I have got a .htaccess mod rewrite rule working so that any request for a non-existent file is sent to be handled by the MVC bootstrap file (/index.php). With my current set-up, the following types of requests are routed to '/index.php', the MVC bootstrap: /index.php /blah /directorywith_no_defaultfile/bloo The following types of request are served by old legacy (flat) pages /some-legacy-flat-page.htm /directorywith_no_defaultfile/some-legacy-flat-page.htm But, when I a request a non-existent file that is a directory like these: /directorywith_no_defaultfile or /directorywith_no_defaultfile/ I get an error: Forbidden You don't have permission to access /directorywith_no_defaultfile/ on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. I suspect this may have something to do with the way Apache handles default files. Do you know which Apache directives could be causing this?

    Read the article

  • How can I call winrar in perl on windows

    - by perlnoob
    Is it possible to call winrar through perl on a windows system, such as perl -e "rar a -rr10 -s c:\backups\backup.rar @backup.lst" If so, is there a more efficient way to do this? I've looked up "perl -e" +winrar on google, however none of the results gave me any answer that was remotely close to what i was looking for. The system Im running this on is a Windows XP system. Im open to doing this in another language like python if its easier, however I am more comfertable with perl.

    Read the article

  • how to find perl has installed in a system

    - by abubacker
    I have written a perl script , I just want to give it to every one , for that I planned to write a bash script which is used to test the environment of a user and find whether that environment is capable of running the perl script. I want to test the things like o. Whether perl has installed in that system o. Perl should have the version 5 or more o. Whether the module JSON::Any is available Any suggestion would greatly appreciated :-)

    Read the article

  • Garbage collection in Perl

    - by srikfreak
    Unlike Java, Perl uses reference count for garbage collection. I have tried searching some previous questions which speak about C++ RAII and smart pointers and Java GC but have not understood how Perl deals with the circular referencing problem. Can anyone explain how Perl's garbage collector deals with circular references? Is there any way to reclaim circular referenced memory which are no longer used by the program or does Perl just ignores this problem altogether?

    Read the article

  • How can I combine two conditions in Perl?

    - by yael
    I have two Perl one liners: perl -pe "s/\b$a\b/$b/g if m/param1 /" test and perl -pe "s/\b$a\b/$b/g unless /^#/" test How can I combine theif m/somthing/ and the unless /something/, like: [root@localhost tmp]# perl -pe "s/\b$a\b/$b/g if m/param1/ unless /^#/" test syntax error at -e line 1, near "m/param1/ unless"

    Read the article

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