in reply to Re: Using the P4 module through Apache
in thread Using the P4 module through Apache

OK, heres my bit of code. I don't think it's anything to do with write access to the text file as the script successfully prints "Test" to the file. However, for some reason it does not print the contents of the @info array..
use P4; open OUTFILE, ">.\\Testing.txt"; my $p4 = new P4; $p4->SetClient( "my-client" ); $p4->SetPort ( "Perforce01:xxxx" ); $p4->SetPassword( "my-password" ); $p4->Init() or die( "Failed to connect to Perforce Server" ); $p4->Login(); my $command = "describe"; my @options; push @options, "-s", "577536"; my @info = $p4->Run( $command, @options ); my @errors = $p4->Errors(); $p4->Disconnect(); foreach my $line (@info) { print OUTFILE $line; } print OUTFILE "Test"; close OUTFILE;

Replies are listed 'Best First'.
Re^3: Using the P4 module through Apache
by sk (Curate) on Jun 30, 2005 at 15:10 UTC
    I am not familiar with P4 module but here are some "have you tried(s)" -

    1. I see you are getting results into errors array but dont' check if there are errors. Can you check the length of this array?

    2. Is it possible that @info does not contain any elements?

    3. Can you print the resuls to the browser instead of text file so that you can verify the problem is not with Apache?

    cheers

    SK