Ver Mensaje Individual
  #10 (permalink)  
Antiguo 31/01/2011, 06:28
Avatar de manyblue
manyblue
 
Fecha de Ingreso: marzo-2008
Mensajes: 329
Antigüedad: 16 años, 7 meses
Puntos: 10
Respuesta: Error codigo proteccion página php

Cita:
Iniciado por AdrianSeg Ver Mensaje
Prueba con una ruta absoluta:

www.tuweb.com



Código PHP:
Ver original
  1. $log=fopen("www.tuweb.com/files/$logInTracker", "a+");

Aunque no sé si te dejará.

Bueno primero subi el archivo .txt al server probe y me salen estos errores:

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for 'WET/0.0/no DST' instead in /usr/local/www/apache22/data/spa/dataProcess.php on line 29

Warning: fopen(successLog.txt) [function.fopen]: failed to open stream: Permission denied in /usr/local/www/apache22/data/spa/dataProcess.php on line 36

Warning: fputs() expects parameter 1 to be resource, boolean given in /usr/local/www/apache22/data/spa/dataProcess.php on line 37

Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache22/data/spa/dataProcess.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/apache22/data/spa/dataProcess.php:29) in /usr/local/www/apache22/data/spa/dataProcess.php on line 42

Luego varie dataProcess.php asi:


Código PHP:
// If log-in was successfull
$logInTracker="successLog.txt"
function 
success($logSuccess,$logInTracker,$loginName,$goHere)
{
    
$date=date ("l dS of F Y h:i:s A");
 
$register_globals = (bool) ini_get('register_gobals');
 if (
$register_globals$ip getenv(REMOTE_ADDR);
 else 
$ip $_SERVER['REMOTE_ADDR'];
        
// If webmaster wants to log successful logins
 
if($logSuccess=="1"){
  
$log=fopen("manyblue.homeunix.com/spa/files/$logInTracker""a+");
       
fputs($log"$loginName logged in on: $date - Logged IP address: $ip\n");
  
fclose($log);
 } 


y me da los siguientes errores


Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for 'WET/0.0/no DST' instead in /usr/local/www/apache22/data/spa/dataProcess.php on line 29

Warning: fopen(manyblue.homeunix.com/spa/files/successLog.txt) [function.fopen]: failed to open stream: No such file or directory in /usr/local/www/apache22/data/spa/dataProcess.php on line 36

Warning: fputs() expects parameter 1 to be resource, boolean given in /usr/local/www/apache22/data/spa/dataProcess.php on line 37

Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/local/www/apache22/data/spa/dataProcess.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/apache22/data/spa/dataProcess.php:29) in /usr/local/www/apache22/data/spa/dataProcess.php on line 42


Sinceramente no se por que no funciona en mi server y en los externos si.
Muchisimas gracias de antemano