Jump to content

migrating from magic_quotes_gpc


jkkenzie

Recommended Posts

hi,

i migrating an old CMS and there is something am not understanding:

For some reason if magic_quotes_gpc is turned off, uploads dont work. Function below:

function myupload($dir, $filein, $exclude=array(), $include=array(), $specs=array(), $det=array())
 {
   if(is_array($filein))
   {
     THIS IF RETURNS FALSE. I.E IT DOES NOT GO THROUGH HERE... IT JUMPS TO ELSE..

It seems the the $filein supplied to this function has a problem, though print_r show the value 1.

 

$filein comes from the call below:

myupload('../UserSiteFiles/'.rawurldecode($_POST['currentdir']), $_FILES['uploads'])

WHAT happens to $_FILES and $_POST when magic_quotes_gpc=off ??

 

Thanks...

Link to comment
https://forums.phpfreaks.com/topic/287713-migrating-from-magic_quotes_gpc/
Share on other sites

I cant believe it was just making the $_FILES an array: i dont know if this is right...

 array($_FILES['uploads']); 
 if(myupload('../UserSiteFiles/'.rawurldecode($_POST['currentdir']), $_FILES['uploads'])){?>

I just added... array($_FILES['uploads']); and it worked, file could be uploaded.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.