ChangeIP.com Forums

A User-to-User Dynamic DNS Forum
* Grand Reopening! *
Grand Reopening!
It is currently 12 Oct 2008 03:43

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Help .php script
PostPosted: 14 Dec 2006 05:53 
Junior Member

Joined: 03 Dec 2006 05:30
Posts: 5
Hi folks,

Ubuntu-6.06.1-LAMP-server-amd64

I download
Linux Dynamic DNS Update Script written by Don Jobes (April 10th, 2002)
the .php script but can't get it to work.

On terminal/console
# php /usr/local/bin/update.php[code]
Warning: file() expects parameter 2 to be long, string given in /usr/local/bin/update.php on line 183

Warning: Invalid argument supplied for foreach() in /usr/local/bin/update.php on line 184
[/code]

Line 183 and 184 are;
# cat /usr/local/bin/update.php[code]
....
if (file_exists($IPlogfile)){

$file=file(\"$IPlogfile\",\"r\"); (line 183)
foreach($file as $line){ (line 184)
list($Lastip,$blank) = split(\"\\:\",chop($line));
if($Lastip != $REMOTE_ADDR){


header(\"location: $UPDATEURL\");

$createFile = fopen(\"$IPlogfile\", \"w\");
fwrite($createFile,\"$REMOTE_ADDR:\\r\\n\");
fclose($createFile);
....
[/code]

[code]
///////////////////////////////////////////////////////////////////////////////$////////////////////////////////<-------- EDIT USER VARIABLES HERE --------> //$///////////////////////////////////////////////////////////////////////////////$
$Bypass = \"0\";

$username = \"satimis\";
$password = \"msliu20h\";

$Adminemail = \"satimis@satimis.freeddns.com\";
$Sendmail = \"/usr/sbin/sendmail -t -i\";

$IPlogfile = \"/var/log/updatedns/updatednsIP.log\";
$Logfile = \"/var/log/updatedns/updatedns.log\";

$Log1 = \"1\";
$Email1 = 1;

$Log2 = \"1\";
$Email2 = 1;

$Log3 = \"1\";
$Email3 = \"1\";

///////////////////////////////////////
....
[/code]

Please help. TIA


B.R.
satimis


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2008 phpBB Group

We use phpbb-seo to help us!