Foros del Web » Creando para Internet » Diseño web »

Problemas al subir un archivo a un FTP

Estas en el tema de Problemas al subir un archivo a un FTP en el foro de Diseño web en Foros del Web. hola, mi consulta es: al subir una pagina en php a la web nesecito un script de conexion dentro de index.php o no, pues no ...
  #1 (permalink)  
Antiguo 12/04/2010, 14:08
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
Problemas al subir un archivo a un FTP

hola, mi consulta es:

al subir una pagina en php a la web nesecito un script de conexion dentro de index.php o no, pues no aparece nada, aunque diga LISTO!!?

gracias
  #2 (permalink)  
Antiguo 12/04/2010, 14:22
 
Fecha de Ingreso: diciembre-2009
Mensajes: 612
Antigüedad: 14 años, 4 meses
Puntos: 16
Respuesta: php en la web

Si tienes conexión a una bbdd, tendrás que indicarle la pass, al igual que en localhost.

Si en localhost no necesitas ese archivo, en el servidor tampoco
  #3 (permalink)  
Antiguo 12/04/2010, 14:27
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
sierto. pero aun asi deveria verse el html al menos...voy a revisar...gracias..

trabajo con cute ftp

igual deveria ir algo como esto?
Código PHP:
Ver original
  1. <?$x=ftp_connect ("localhost",21);
  2.  
  3. if($x !=0){
  4. echo "Conexión FTP activada<br>";
  5. }else{
  6. echo "No se activo lo conexión FTP";
  7. }
  8.  
  9. if(ftp_login($x,"login","pass"))
  10. {
  11. echo "El login y la password han sido aceptados<br>";
  12. }else{
  13. echo "Error en login o password";
  14. }
  15. ftp_cdup($x);
  16.  
  17. echo "El directorio actual es el raiz: ", ftp_pwd($x),"<br>";
  18. $directorio = ftp_pwd($x);

Última edición por GatorV; 12/04/2010 a las 21:27
  #4 (permalink)  
Antiguo 12/04/2010, 14:46
 
Fecha de Ingreso: enero-2010
Ubicación: Monterrey
Mensajes: 17
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: php en la web

Primero que nada tienes que asegurarte que tu Hosting tenga PHP instalado, después que la configuración sea adecuada para tus scripts como por ejemplo que esten activados los short tags.

Podrias por ejemplo probar tu archivo con una llamada a phpinfo();
  #5 (permalink)  
Antiguo 12/04/2010, 15:03
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
Respuesta: php en la web

esto es extraño

el proveedor me dice que php esta activado, subo un index con cuteftp.

he aqui lo extraño.

en la paleta izquierda aparece mi carpeta con las paginas, mas index.php.
la veo en vista previa.
pesa 4,5 kb pero al traspasarla(subirla) al carril derecho
donde esta el www del servidor ,pasa con tamaño 0 y sin codigo dentro.


pruebo con un index.html y funciona! ?

Última edición por etisdemian; 12/04/2010 a las 15:17
  #6 (permalink)  
Antiguo 12/04/2010, 15:30
 
Fecha de Ingreso: diciembre-2009
Mensajes: 612
Antigüedad: 14 años, 4 meses
Puntos: 16
Respuesta: php en la web

podría no cargártelo, pero no tiene que ver php o html... valla, en un servidor puedes meter lo que quieras, valla o no :S

Pruebalo de nuevo a ver :S
  #7 (permalink)  
Antiguo 12/04/2010, 15:44
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
sera el cuteftp? (que ademas es lento)

podria instalar otro?, o crees que es exagerado?

sip , como dije este codigo al pasarlo por cuteftp hacia la web, lo sube con 0 bites.



Código PHP:
Ver original
  1. <?php
  2. include("header.php");
  3. ?>
  4.  
  5. <?php
  6. @mysql_pconnect("ddd","dd","dddddd");
  7. mysql_select_db("xccccvb");
  8.  
  9. ?>
  10.  
  11. <table style="text-align: left; width: 985px;" border="1"
  12. cellpadding="2" cellspacing="2" align="center">
  13.   <tbody>
  14.     <tr>
  15.       <td>
  16. <?php
  17. include ("index4.php");
  18. ?>
  19. <?php
  20. include ("letra.php");
  21. ?>
  22. <div id="todito">
  23. <?php
  24. include ("inmenu.php");
  25. ?>
  26. <div id="contenedor">
  27. <?php include("libros.php"); ?>
  28.    
  29.    <?php
  30.  
  31.   $resultado = mysql_query(")
  32.  
  33.     $row = mysql_fetch_array($resultado);
  34.    
  35.        ?>
  36.      
  37.    
  38. <div id="certe">
  39.     <br />
  40.         <table width="251" border="0">
  41.   <tr>
  42.        <th width="245" height="42" scope="col" style="font-size:10px"><fieldset><small>
  43.       <?php echo "<strong><a href='indetalle.php?id=".htmlspecialchars($row['in_id'])."'style='font-size:10px;color:#000000;'>".utf8_encode($row["in_titulo"])."</a><br>";?></small></fieldset></th>
  44.     </tr>
  45.     <tr>
  46.     <th width="245" height="10" scope="col" style="font-size:9px" align="center"><small>
  47.       <?php echo stripslashes($row["in_autor"]); ?> </small></th>
  48.       </tr>
  49.    </table>
  50.    <table width="119" height="141" border="0" align="center">
  51.    <tr>
  52.      <th width="70" height="85" scope="col">
  53.      
  54.     <img src ="http://localhost/<?php echo htmlspecialchars($row[0]);?>" width="104" height="125">      </th>
  55.       </tr></table>
  56.       <?php
  57. $cantidad = $row['in_venta_iva'];
  58. ?>
  59.        
  60.  
  61.   <table width="202" border="0" align="center">
  62.        <tr>
  63.       <th width="88" height="10" scope="col" style="font-size:9px" align="right">Precio:</th>
  64.       <th width="99" height="10" scope="col" style="font-size:9px" align="left"><?php echo number_format($cantidad,0); ?> </th>
  65.       </tr>
  66.       <tr>
  67.                  <?php                  
  68.  
  69. $marca= htmlspecialchars($row['marca']);
  70. if($marca == "-"){
  71. $tot = $cantidad - ($cantidad*10/100);
  72. $total = number_format($tot,0);
  73. ?>
  74.      
  75.           <th width="88" height="10" scope="col" style="font-size:9px" align="right">
  76.          
  77.  
  78.          
  79.           Internet:</th>
  80.       <th width="99" height="10" scope="col"  class="Estilo6" style="font-size:12px" align="left"><?php echo $total; ?>      </th>
  81.       <?php  }else { ?> <th width="1">&nbsp;</th>
  82.       <?php } ?>
  83.   </tr>
  84.   </table>
  85.  
  86.  
  87.  
  88.  
  89.   <table width="202" border="0" align="center">
  90. <tr>
  91. <th width="196"  height="10" scope="col">  
  92.    <?php
  93.  
  94.  if($marca == "P"){
  95. echo "<div class='Estilo6'>Liquidación</div>";
  96. }
  97.  if($marca == "L"){
  98. echo "<div class='Estilo6'>nose</div>";
  99. }
  100.  
  101. if($marca == "o"){
  102.  
  103. echo "<div class='Estilo6'>Oferta</div>";
  104. }
  105. ?></th>
  106. </tr>  
  107.     </table>
  108.      
  109.      
  110.        
  111.  <table border="0" align="center">
  112.     <tr>
  113.       <th height="10" scope="col" align="center">
  114.    
  115.    
  116.   <?php
  117. if(!$carro || !isset($carro[md5($row['in_id'])]['identificador']) || $carro[md5($row['in_id'])]['identificador']!=md5($row['in_id']))
  118.  
  119. {
  120.  
  121. ?>
  122.  
  123. <a href="agregacar.php?<?php echo SID ?>&id=<?php echo htmlspecialchars($row['in_id']); ?>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','_imagenes/comprar2.jpg',1)"><img src="_imagenes/comprar.jpg" alt="comprar" /></a><a href="agregacar.php?<?php echo SID ?>&id=<?php echo htmlspecialchars($row['in_id']); ?>"></a>
  124. <?php }else{?>
  125.  
  126.  
  127. <a href="borracar.php?<?php echo SID ?>&id=<?php echo htmlspecialchars($row['in_id']); ?>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','_imagenes/eliminar2.jpg',1)"><img src="_imagenes/eliminar.jpg" alt="eliminar" name="Image11" width="64" height="15" border="0" id="Image11" /></a></th>
  128. <?php } ?>
  129.  
  130.  
  131.  
  132. <th width="65" align="left"><a href="vercarrito.php?<?php echo SID ?>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','_imagenes/carrito2.jpg',1)"><img src="_imagenes/carrito1.jpg" alt="ver carrito" name="Image10" width="64" height="15" border="0" id="Image10" /></a></th>
  133.       </tr>
  134.         </table>
  135.   </div>
  136. <?php } ?>
  137. <br />
  138. </div>
  139.  
  140. <?php
  141. include ("inlateral.php");
  142. ?>
  143.  
  144. </div>
  145. <?php
  146. include ("footer.php");
  147. ?>
  148. </td></tr></tbody></table>


sin embargo este si resulta




Código PHP:
Ver original
  1. <?php include ("header.php");
  2. ?>
  3. <div id="sidebar2">
  4. <div align="right"><a href="ztodo.php"><a href="ztodo.php"><img src="_imagenes/home.png" alt="inicio" width="148" height="27" /></a></div>
  5. <br />
  6.   <div id="useful-links" class="box">
  7.              
  8. <br />
  9.                     <ul>
  10.                    
  11.                     <li><fieldset><a href="inempresa.php" style="font-size:10px"><strong>EMPRESA</strong><br /></a></fieldset>
  12.                     </li>
  13.                     <li><fieldset><a href="zservicios.php" style="font-size:10px"><strong>SERVICIOS</strong><br />
  14.                     </a></fieldset>                 </li>
  15.                    
  16.                         <li><fieldset><a href="inmapa.php" style="font-size:10px"><strong>COMO LLEGAR</strong></a></fieldset><br />
  17.                         </li>
  18.                         <li><fieldset><a href="incontacto.php" style="font-size:10px"><strong>CONTACTO</strong></a></fieldset><br />
  19.                 </li>
  20.  
  21.                        
  22.                         <li><fieldset><a href="zdespacho.php" style="font-size:10px"><strong>DESPACHO</strong></a></fieldset><br />
  23.             </li>
  24.                             <li><fieldset><a href="incatalogos.php" style="font-size:10px"><strong>CATALOGOS</strong></a></fieldset><br />
  25.             </li>
  26.                            <li><fieldset><a href="zformcotiza.php" style="font-size:10px"><strong>COTIZACION</strong></a></fieldset><br />                                 </li>
  27.                            
  28.                            <li><fieldset><a href="innovedades.php" class="error error" style="font-size:10px"><strong><span class="error">NOVEDADES</span></strong></a></fieldset><br />
  29.             </li>
  30.                            
  31.                            <li><fieldset><a href="ofertas.php" class="error error" style="font-size:10px"><strong><span class="error">OFERTAS</span></strong></a></fieldset><br />
  32.                       <li><fieldset><a href="ofertas.php" style="font-size:10px"><strong><span class="error">LIQUIDACIONES</span></strong></a><br /></fieldset>
  33.                    
  34.     <li><fieldset><a href="clasific.php" class="Estilo4"><strong><span style="color: #009779">AREAS</span></strong></a></fieldset>
  35.                                                                                            
  36.             </ul>
  37.             <br />
  38.   <a href="#" onClick="javascript:window.open('https://www.paypal.com/cgi-bin/webscr?cmd=xpt/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=400, height=350');"><img src="_imagenes/webpay copia.jpg" alt="wev" width="149" height="58" /></a>
  39.    
  40.  
  41.  
  42.     </div> 
  43.   </div>

Última edición por GatorV; 12/04/2010 a las 21:28
  #8 (permalink)  
Antiguo 12/04/2010, 16:22
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: la web no reconoce este codigo

pero entiende... que no es ningún problema con PHP!!

es mas bien problema de tu cliente de FTP, tu lo has dicho... que cuteftp lo sube con cero bytes... entonces, ¿porque no usar otro cliente de FTP??
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #9 (permalink)  
Antiguo 12/04/2010, 16:27
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
probare niko ftp y le cuento maestro-pero no se enoje...

intente con NICO-FTP, pero igual llega con 0mb maestro.

que sucedera?

Última edición por GatorV; 12/04/2010 a las 21:28
  #10 (permalink)  
Antiguo 12/04/2010, 16:43
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: la web no reconoce este codigo

bueno punto.. y como no es problema de código PHP, intenta guardar de nuevo tu script y subelo de nuevo... procura hacer un nuevo archivo, no simplemente guardes...
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #11 (permalink)  
Antiguo 12/04/2010, 16:51
 
Fecha de Ingreso: octubre-2009
Mensajes: 357
Antigüedad: 14 años, 6 meses
Puntos: 1
Respuesta: la web no reconoce este codigo

sera que pesa mas de 4mb, he escuchado que eso trae problemas.


además les cuento que subí una carpeta con varias paginas pero ahora no puedo borrar la carpeta desde ningun ftp.

en cuteftp salía esto ( problemas con global options|log)
  #12 (permalink)  
Antiguo 12/04/2010, 21:28
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Tema movido desde PHP a Web general

Etiquetas: ftp, subir
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:43.