[Fri Dec 11 12:07:24.417565 2015] [cgi:error] [pid 10838] [client 24.32.36.240:54536] AH01215: [Fri Dec 11 12:07:24 2015]
uu_upload.pl: Use of uninitialized value in numeric eq (==) at uu_upload.pl line 350.: /home/public_html/cgi-bin/uu_upload.pl,
referer: http://www.....com/uploader.php
Line 349 - Line 353 shows:
# Force 'redirect_using_location' if user does not have a javascript capable browser or using embedded_upload_results
if($query->param('no_script') || $query->param('embedded_upload_results') == 1){
$main::config->{redirect_using_js_html} = 0;
$main::config->{redirect_using_location} = 1;
}
It just means you don’t have parameters called no_script nor embedded_upload_results. You’ll need to check for the existence of the parameter before trying to access it.
Thanks Dave for your specific reply. Much appreciated.
Since I was provided this information from my web host tech support, I don’t know how to “check for the existence of the parameter before trying to access it”. Would you mind providing some more help/info, on how to do that please? Much thanks.
You can use isset(), but there has to be a better way to handle it since you should already know if you have the parameters or not as they’re getting passed to your query.
Dave thanks, rusty or not, I appreciate the effort.
I am not versed in Perl at all, just trying to get an error fixed for it’s accompanying PHP script.
Would you be interested in telling me where might be the optimal place to add that line of code in the file, please?
Thanks again for your guidance.
After replacing the line in question, with yours, like this:
# Force 'redirect_using_location' if user does not have a javascript capable browser or using embedded_upload_results
if(exists $query->param('no_script') || (exists $query->param('embedded_upload_results') && $query->param('embedded_upload_results')== 1)){
$main::config->{redirect_using_js_html} = 0;
$main::config->{redirect_using_location} = 1;
}
I see this:
“Software error: exists argument is not a subroutine name at uu_upload.pl line 350”
Any additional suggestions/solutions will be greatly appreciated.
Agreed. The search I did says defined and exists basically do the same thing, but exists checks for a non-null instance of it as well
You would need to add it to that same line that errorred out, basically using something like defined($query->param(‘embedded_upload_results’)) before the value check for the variable (you’ll need to && the conditions together and wrap them in parenthesis so the two are checked as one as part of the or statement.
Thank you for your reply. Much appreciated. In regard to:
I[quote=“DaveMaxwell, post:13, topic:209728”]
using something like defined($query->param(‘embedded_upload_results’)) before the value check for the variable (you’ll need to && the conditions together and wrap them in parenthesis so the two are checked as one as part of the or statement
[/quote]
I’d like to try that, but don’t know how to put that into a workable line of code. Any additional help will be appreciated. Thanks