User Profile

Collapse

Profile Sidebar

Collapse
cookspyder
cookspyder
Last Activity: Apr 9 '08, 02:06 PM
Joined: Jul 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cookspyder
    started a topic tail file and send over socket
    in Perl

    tail file and send over socket

    So I have this script and it works great at sending things over a socket after tailing a file. The problem seems to be when the recieving end is not available the program crashes. Is there a way to get the program to stay up and wait for the recieving end to be available?
    [CODE=perl]
    use File::Tail;
    use IO::Socket;
    {
    local $/ = "\n";
    my $name = 'filename';
    $file=File::Tai l->new(name=>...
    See more | Go to post
    Last edited by eWish; Apr 8 '08, 08:42 PM. Reason: Please use code tags

  • cookspyder
    started a topic keeping perl code from aborting.
    in Perl

    keeping perl code from aborting.

    I have a simple socket client code that sends the contents of a syslog over to a server when it finds an error. It has been working fine in a while loop of read open socket send line and close socket. However I have been having network issues and have found the code is aborting whenever the network has issues. Is there a way to keep the code from aborting? here is the snippet that seems to cause the code to abort.
    [code=perl]
    use File::Tail;...
    See more | Go to post
    Last edited by numberwhun; Jan 7 '08, 05:24 PM. Reason: add code tags

  • cookspyder
    started a topic using sql result set in jsp code
    in Java

    using sql result set in jsp code

    I am havign trouble understanding how to call a string that was queried with the sql in my jsp.

    I have a result set
    [CODE=java]<%
    while (rs.next()) {
    String test = rs.getString("u ser");
    out.println(tes t);
    }
    %>
    [/CODE]
    and the string can be printed here how ever I need to call the "test" string in jsp some jsp code further down the page and it can not...
    See more | Go to post
    Last edited by acoder; Nov 16 '07, 06:34 PM. Reason: Added code tags + moved to Java forum

  • cookspyder
    replied to file_put_contents question
    in PHP
    i figured out a work around


    thanks!
    See more | Go to post

    Leave a comment:


  • cookspyder
    replied to file_put_contents question
    in PHP
    Sorry bout that will do next time.


    This mess below is what I am getting in one file.
    Code:
    2007-08-16 @ 12:48:20Authentication                                                                                                                                                                                                                                                  ArrayJan1100AMJan1100AMmikeemail@email.comthis thestsdca-auth2a
    ...
    See more | Go to post

    Leave a comment:


  • cookspyder
    replied to PHP refuses to create a logfile
    in PHP
    Yeah I did upgrade to 5 the other day.. I figured out the issue was not allowing php to create the file and that wasnt allowing php to write to it. I deleted it and it ran and created a new file.
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic file_put_contents question
    in PHP

    file_put_contents question

    I have a PHP file that when i run the code on my test server(wamp) writes everything in one stream in the file.

    On win 2003 server IIS I get strange hard returns and spacing between some of the contents.

    Both are accessing sql 2000 db over odbc.

    Anyone ever see this?

    here is the snippet:
    [code=php]
    @extract($_POST );
    $filename = "formdata.t xt";
    file_put_conten ts($filename,...
    See more | Go to post

  • cookspyder
    replied to PHP refuses to create a logfile
    in PHP
    I have iis, windows 2003 server, and php running on my server.

    In testingon my laptop, my code writes fine to the log file. However, now that I am on the server it will not write to the log file. All the files are the same as on the test machine. I am using wamp on the test laptop I write the code to.

    This is the sample code for the logging that works on my test laptop but not on the server.
    [code=php]...
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic PHP refuses to create a logfile
    in PHP

    PHP refuses to create a logfile

    please see second post...
    See more | Go to post
    Last edited by cookspyder; Aug 16 '07, 03:08 PM. Reason: no longer occuring

  • cookspyder
    replied to Load a page within a page
    nm got it working with Iframes
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic Load a page within a page

    Load a page within a page

    To give an overview of what im trying to do I will first explain what I am using.

    I have a Jahia based site supporting dashboards on port 80 and php support on port 88 on the same win 2003 server with iis. I am trying to load a php page within the jahia based site.

    I can use activeX based html or standard html within what jahia calls a portlet. I tried some frame work but it does not seem to load the page.
    ...
    See more | Go to post

  • cookspyder
    replied to perl code and modules utilized
    in Perl
    Thanks for the help! That makes things alot easier.
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic perl code and modules utilized
    in Perl

    perl code and modules utilized

    I have inherited a few perl scripts and noticed they use modules to run. I have installed the modules on my computer and the code works. However, I was hoping to distribute the code to others but I dont want to make them download the modules to make it run is there a way to package it all together? Ive never done much of anything with perl. If someone could point me in the right direction I would appreciate it.
    See more | Go to post

  • cookspyder
    replied to tail with line feed delimination
    in Perl
    Its a program on a unix system and between each write it puts in two line feeds.

    The File tail module doesn't understand line feeds as the end of a line and will read through the entire file as one line.

    So, since I cant get the app to write the log entries with a hard return I'm stuck trying to find a way to manipulate the file prior to tailing it.
    See more | Go to post

    Leave a comment:


  • cookspyder
    replied to tail with line feed delimination
    in Perl
    I know how to do this to the entire file via the unix2dos commands in order for tail to work properly.

    Im wondering if I can change the file as it is written? That would be ideal in order to provide a working tail. Otherwise to change the line feed to a hard return right before it gets tailed.

    Not sure if this would even be possible but it would save alot of time if I could.
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic tail with line feed delimination
    in Perl

    tail with line feed delimination

    Im trying to tail a file that does not have hard returns but has line feeds after each entry. Is there a way to change the standard file tail settings to look for line feeds when tailing?
    See more | Go to post

  • cookspyder
    started a topic IO::Socket - Keeping a socket open
    in Perl

    IO::Socket - Keeping a socket open

    In reference to streaming data over socket:

    Any one know how to keep a IO socket open while sending data everytime my while loops runs and collects data the connection closes and while the loop continues to get data none is ever sent over the socket.
    See more | Go to post

  • cookspyder
    replied to streaming data over socket
    in Perl
    Thanks for the help there.

    Yes file tail module is installed, but the socket closes what seems to be every time the tail stream tries to send over that socket. I need to keep the socket open and continuously send a 1 way stream over it to a client. the connection is "establishe d" according to netstat at both ends but the data streaming does not work.
    See more | Go to post

    Leave a comment:


  • cookspyder
    replied to streaming data over socket
    in Perl
    use File::Tail;
    use IO::Socket;

    # init host and port
    my $host = 'ip_addr';
    my $port = 7777;
    my $name = 'C:\requestDiag .log';
    my $sock = new IO::Socket::INE T( PeerAddr => $host, PeerPort => $port, Proto => 'tcp');
    $sock or die "no socket: $!";

    $file=File::Tai l->new(name=>$nam e, maxinterval=>30 0, adjustafter=>7) ;

    while (defined($line= $file->read))...
    See more | Go to post

    Leave a comment:


  • cookspyder
    started a topic streaming data over socket
    in Perl

    streaming data over socket

    I am looking for a way to send data over a socket to a specified host and port. it is a 1 way street I am only sending the tail of a log file. Looking for something really simple that sends the tail whenever there is one. Do I need to establish a connection on the socket and is it possible with out there being a perl script at the recieving end?

    Thanks for the help
    See more | Go to post
    Last edited by cookspyder; Jul 31 '07, 06:08 PM. Reason: typo
No activity results to display
Show More
Working...