My first post ..
if you wondering .. probably yes iam the kind of people who ask and get the answer and run to continue working ..
but i really apreciate any help :D and i guess it's easy one for a PERL expert ..
I have a PHP script contains this array :
#start :
-- Array
-- (
------ [0] => Array
------ (
----------- [ext] => jpg
----------- [size] => 100000
------- )
----- [1] => Array
----- (
----------- [ext] => zip
----------- [size] => 100000
----- )
-- )
#end
(ignore Dash - just to make it clear)
I did :
$arr = serilize($arr);
$arr = base64_encode($arr);
// Say output = ABC
I send the following to upload.cgi :
upload.cgi?arr=ABC
So, I want to :
#1 decode $queryString{"arr"} base64
#2 unseriliaze $queryString{"ser"}
#3 put it in an array in the same order to operate whatever i want throught loops :D
I kept trying .. but always ends with blank page or internal error .. and no RESULT !
any help ? or any ideas .. i would be glade to make some efforts to have my script done ..
well .. i have tried to create a connection with MySQL db .. but ..
#!c:/perl/bin/perl.exeuse CGI ':standard', '-debug';
use DBI;
print "Content-type:text/html\n\n";
$dbh = DBI->connect("dbi:mysql:database=zz; host=localhost; user=root; password=")
or die "Connecting from PHP to MySQL database failed: $DBI::errstr";
print "test";
it prints nothing .. Blank Page !
i die to see just 1 error !
BEGIN {
open STDERR,'>>','error.log';
}
use strict;use warnings;use diagnostics;
use CGI qw/:standard/;
use DBI;
print "Content-type:text/html\n\n";
my $dbh = DBI->connect("dbi:mysql:database=zz; host=localhost",'root','')
or die "Connecting to MySQL database failed: $DBI::errstr";
print "test";
Program dumps error to file 'error.log'. If it would not work, look at your web server's error log.
P.S. If you ask for help in case of a very simple problem you should not say that language is bad. I understand that for typical PHP programmer other languages may seem hard. But it is not polite and you may not receive further help.