Page 2 of 2

Posted: Tue Mar 14, 2006 6:10 pm
by feyd
that's not it.

Posted: Wed Mar 15, 2006 3:54 pm
by Dave9666
I've made some changes to the code above - removed some unnecessary code and fixed some conditional. also added the remainder of the 'mode' ADD to give a clearer picture of whats going on.

I'm still not getting validation. :(

Posted: Wed Mar 15, 2006 4:02 pm
by Dave9666
feyd wrote:that's not it.
is this what you are talking about?

values of form passed to processor

<input type=hidden name="txtfrmpg" value='<?=$frmpg?>'>


this is where all the variables are posted in the processor

Code: Select all

$frmpg = $HTTP_POST_VARS['txtfrmpg']; //form vars

Posted: Wed Mar 15, 2006 4:04 pm
by feyd
no. Run var_dump($_FILES) what does it say?

Posted: Wed Mar 15, 2006 4:09 pm
by Dave9666
feyd wrote:no. Run var_dump($_FILES) what does it say?
ok. where should i be putting the var_dump($_FILES) statement?

Posted: Wed Mar 15, 2006 4:16 pm
by feyd
Somewhere around where you use it first, like $file.

Posted: Wed Mar 15, 2006 4:27 pm
by Dave9666
feyd wrote:Somewhere around where you use it first, like $file.
tried it here

Code: Select all

//-- GET SIZE OF UPLOADED IMAGE
var_dump($_FILES)
$file = $_FILES['txtlistingimage']; //file from form
and here

Code: Select all

//-- GET SIZE OF UPLOADED IMAGE
$file = $_FILES['txtlistingimage']; //file from form
var_dump($_FILES)
gives me a parse errror in both places on lines that follow it

Posted: Wed Mar 15, 2006 4:29 pm
by feyd
you forgot a semicolon after it.

Posted: Wed Mar 15, 2006 4:40 pm
by Dave9666
feyd wrote:you forgot a semicolon after it.
lol - right - my bust

Added

Code: Select all

//-- GET SIZE OF UPLOADED IMAGE
var_dump($_FILES);
$file = $_FILES['txtlistingimage']; //file from form
$max_size = 500000; // roughly 500K
and no effect

Posted: Wed Mar 15, 2006 4:47 pm
by feyd
it shouldn't change anything, it should output data, if anything.

Run the following in a new file and tell us the results please.

Code: Select all

<?php

$ve = phpversion();
$os = PHP_OS;
$er = intval(error_reporting());
$rg = (in_array(strtolower(ini_get('register_globals')), array(0, false, '', null, 'off')) ? 'Off' : 'On');
$de = (in_array(strtolower(ini_get('display_errors')), array(0, false, '', null, 'off')) ? 'Off' : 'On');
$eol = (isset($_SERVER['HTTP_HOST']) ? "<br />\n" : "\n");

$ec = array(
'E_STRICT' => 2048,
'E_ALL' => 2047,
'E_USER_NOTICE' => 1024,
'E_USER_WARNING' => 512,
'E_USER_ERROR' => 256,
'E_COMPILE_WARNING' => 128,
'E_COMPILE_ERROR' => 64,
'E_CORE_WARNING' => 32,
'E_CORE_ERROR' => 16,
'E_NOTICE' => 8,
'E_PARSE' => 4,
'E_WARNING' => 2,
'E_ERROR' => 1,
);

$e = array();
$t = $er;
foreach ($ec as $n => $v)
{
if (($t & $v) == $v)
{
$e[] = $n;
$t ^= $v;
}
}
$er = $er . ' (' . implode(' | ', $e) . ')';

echo 'PHP Version: ' . $ve . $eol;
echo 'PHP OS: ' . $os . $eol;
echo 'Error Reporting: ' . $er . $eol;
echo 'Register Globals: ' . $rg . $eol;
echo 'Display Errors: ' . $de . $eol;

?>

Posted: Wed Mar 15, 2006 4:49 pm
by Dave9666
heres the output

PHP Version: 4.3.11
PHP OS: Linux
Error Reporting: 2039 (E_USER_NOTICE | E_USER_WARNING | E_USER_ERROR | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_WARNING | E_ERROR)
Register Globals: On
Display Errors: On

Posted: Sat Mar 18, 2006 7:33 pm
by Dave9666
I've updated the superglobals formatting - dropping the old $HTTP_GET etc. - thought was that mixing the versions may have attributed to the issue. Unfortunately - had no effect. The revised code is in my original post.