Jump to content

migrating from magic_quotes_gpc


jkkenzie
Go to solution Solved by 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
Share on other sites

  • Solution

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.