Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/06/2013, 15:42
Avatar de Middrel
Middrel
 
Fecha de Ingreso: abril-2005
Mensajes: 835
Antigüedad: 19 años
Puntos: 27
Problema la subir archivos a servidor vía PHP

Hola, buenas tardes...

Tengo un problema al tratar de subir imágenes a un servidor con certificado SSL. Me marca los siguientes errores:


Warning: move_uploaded_file(img/tickets/Reg-0017-ticket.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 25

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\Temp\php\php1916.tmp' to 'img/tickets/Reg-0017-ticket.jpg' in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 25

Warning: move_uploaded_file(https://antera.com.mx/facebideas/img...017-photos.jpg) [function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 31

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\Temp\php\php226A.tmp' to 'https://antera.com.mx/facebideas/img/fotos/Reg-0017-photos.jpg' in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 31

Warning: mail() [function.mail]: SMTP server response: 550 <> invalid address in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 61

Warning: mail() [function.mail]: SMTP server response: 550 <> invalid address in D:\Hosting\10703022\html\facebideas\bd\querys-functions.php on line 81

Al parecer, son problemas de permisos del servidor, pero del lado del servidor me dicen que ellos no tienen problema, que los permisos están bien. Que el problema está en el código. Este es el código que utilizo.

Código PHP:
Ver original
  1. if(isset($_POST['enviar'])) {
  2.        
  3.         // Buscamos el id máximo
  4.         $sqlSelectMaxId = mysql_query("Select id from liv_registro Order by id DESC Limit 1");
  5.         $rowSelectMaxId = mysql_fetch_array($sqlSelectMaxId);
  6.        
  7.         $max = $rowSelectMaxId['id'] + 1;
  8.        
  9.        
  10.         if($_FILES['imgTicketbuy']['name'] != null){   
  11.             $destino = 'img/tickets' ;
  12.             $tickets = 'Reg-00'. $max .'-ticket.jpg';
  13.             if(move_uploaded_file ( $_FILES ['imgTicketbuy']['tmp_name'], $destino.'/'. 'Reg-00'. $max .'-ticket.jpg')) { $up = 'El archivo se subió satisfactoriamente';   }
  14.         }
  15.        
  16.         if($_FILES['fotoUpload']['name'] != null){ 
  17.             $destino = 'img/fotos' ;
  18.             $fotos = 'Reg-00'. $max .'-photos.jpg';
  19.             if(move_uploaded_file ( $_FILES ['fotoUpload']['tmp_name'], $destino.'/'. 'Reg-00'. $max .'-photos.jpg')) { $up = 'El archivo se subió satisfactoriamente'; }
  20.         }
  21.        
  22.         $sqlRegistro = mysql_query("Insert into liv_registro (reg_nombre, reg_email, reg_telefono, reg_ticket, reg_foto_ticket, reg_foto, reg_descripcion) Values
  23.         ('$_POST[nombre]','$_POST[email]','$_POST[telefono]','$_POST[ticket]','$tickets','$fotos','$_POST[descripcion]')");
  24.        
  25.         // Envío de correo [ Empresa ]
  26.         $deemail = $_POST['email'];
  27.         $sfrom = $_POST['email'];
  28.         $sdestinatario = '[email protected]';
  29.         //$sBCC="";
  30.         $ssubject ='Se ha registrado un nuevo usuario al evento ';
  31.                        
  32.         $shtml ='
  33.             Has recibido un correo desde el tab de Facebook ' . $today . '<br />
  34.             <br />
  35.             Nombre: ' . $_POST['nombre'] .' <br />
  36.             Tel&eacute;fono: ' . $_POST['telefono'] . ' <br />                             
  37.             E-mail: ' . $_POST['email'] . ' <br />
  38.             Mensaje: ' . $_POST['descripcion'];
  39.                            
  40.         $encabezados = "MIME-Version: 1.0\n";
  41.         $encabezados .= "Content-type: text/html; charset=iso-8859-1\n";
  42.         $encabezados .= "From: $denombre <$deemail>\n";
  43.         $encabezados .= "BCC: <$sBCC>\n";
  44.         $encabezados .= "X-Sender: <$sfrom>\n";
  45.         $encabezados .= "X-Mailer: PHP\n";
  46.         $encabezados .= "X-Priority: 1\n"; // fijo prioridad
  47.         $encabezados .= "Return-Path: <$sfrom>\n";
  48.            
  49.         mail($sdestinatario,$ssubject,$shtml,$encabezados);
  50.        
  51.         // Envío de correo [ Cliente ]
  52.         $deemail = '[email protected]';
  53.         $sfrom = '[email protected]';
  54.         $sdestinatario = $_POST['email'];
  55.         //$sBCC="";
  56.         $ssubject ='Haz quedado registrado al evento ';
  57.                        
  58.         $shtml ='¡Listo! Tus datos han sido registrados correctamente. La notificación de resultados será próximo 3 de julio en este espacio. ¡Mucha suerte!';
  59.                            
  60.         $encabezados = "MIME-Version: 1.0\n";
  61.         $encabezados .= "Content-type: text/html; charset=iso-8859-1\n";
  62.         $encabezados .= "From: $denombre <$deemail>\n";
  63.         $encabezados .= "BCC: <$sBCC>\n";
  64.         $encabezados .= "X-Sender: <$sfrom>\n";
  65.         $encabezados .= "X-Mailer: PHP\n";
  66.         $encabezados .= "X-Priority: 1\n"; // fijo prioridad
  67.         $encabezados .= "Return-Path: <$sfrom>\n";
  68.            
  69.         mail($sdestinatario,$ssubject,$shtml,$encabezados);
  70.        
  71.         $msj = '¡Listo! Tus datos han sido registrados correctamente. La notificación de resultados será próximo 3 de julio en este espacio. ¡Mucha suerte! ';

Sólo que yo he usado este código muchas veces y me ha funcionado. Tiene que ver algo que el dominio tenga un certificado?

Saludos!