Search

am uploading files via frontend events, and these not working when you signed out of Symphony , i am uploading image in one folder and moving to another this works only when am logging in as admin in the backend, when i logged out it does not works and

this is my code any help ?

protected function __trigger(){
                $unique_code = md5(uniqid());
  if (!empty($_FILES['fields']['name']['user-picture'])) {
$unique_code.$_FILES['fields']['name']['user-picture'];
      $_POST['fields']['picture'] = $_FILES['fields']['name']['user-picture'];
        }
        $_POST['fields']['avatar-count'] = 1;
include(TOOLKIT . '/events/event.section.php');
if(!empty($_FILES['fields']['name']['user-picture']))
{
$path = getcwd();

$source_file = $_FILES['fields']['name']['user-picture'];
$source = $path."workspace/user_pic/".$source_file;
$destination = $path."workspace/Pic/".$source_file;


if(!copy($source,$destination))
{
echo "not copied";
}
  }

//include(TOOLKIT . '/events/event.section.php');
return $result; 

Another point in that i works perfectly in localhost but not in server what is the problem

Re: Admin loged in...

Have you selected 'Admin Only' in the Event filters list?

Re: Localhost vs Server...

Seems more to do with how the server is set up in relation to file uploading.

works perfectly in localhost but not in server

Could be permissions.

i verified the permission too, it is exactly as in the localhost

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details