NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
rubberscorpio
Nov 07, 2012Aspirant
Readynas Public Link down?
My ReadynasPhotoII says my HostName for web forwarding is not registered. It has been registered for over a year. It appears the site linking to our servers is down. Anyone else having the same issue?...
chirpa
Mar 04, 2013Luminary
Looks like the photos.readynas.com is broken again. PHP scripts are returning as plain-text, not interpreted HTML. If this was any other company, there would be 24/7 monitoring of public services, so the internal staff would know before customers...
http://photos.readynas.com/html/php/get ... ?v%3d1.0.6
http://photos.readynas.com/html//error_ ... _login.php?
http://photos.readynas.com/html/php/get ... ?v%3d1.0.6
<?php
function print_header($title)
{
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n";
print "<html lang=\"ja\">\n";
print "<head>\n";
print "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n";
print "<title>$title</title>\n";
print "</head>\n";
}
function split_version($v) {
$ver = array();
if (preg_match("/^(\d+)\.(\d+)\.(\d+)-T(\d+)$/", $v, $m)) {
$ver['name'] = $v;
$ver['major'] = $m[1];
$ver['minor'] = $m[2];
$ver['patch'] = $m[3];
$ver['testrel'] = $m[4];
}
else if (preg_match("/^(\d+)\.(\d+)\.(\d+)$/", $v, $m)) {
$ver['name'] = $v;
$ver['major'] = $m[1];
$ver['minor'] = $m[2];
$ver['patch'] = $m[3];
$ver['testrel'] = 65535; // NOT NULL (primary key cannot be null. so use 65535 as official release)
}
else {
$ver['name'] = $v;
}
return $ver;
}
print_header("Release Note");
foreach (array_keys($_GET) as $key) {
if ($key == "v") {
$ver = split_version($_GET["$key"]);
}
else if ($key == "o") {
$oldver = split_version($_GET["$key"]);
}
else if (preg_match("/^v=(.*)$/", $key, $m)) {
$ver = split_version(preg_replace("/_/", ".", $m[1]));
}
else if (preg_match("/^o=(.*)$/", $key, $m)) {
$oldver = split_version(preg_replace("/_/", ".", $m[1]));
}
}
try {
$pdo = new PDO('mysql:host=localhost; dbname=rnp2srv', 'rnp2register', 'rnp2register');
print "<h3>ReadyNAS Photos II Add-on</h3>";
$sql =
'SELECT comment,releasedate' .
' FROM `release`' .
" WHERE major=$ver[major] AND minor=$ver[minor] AND patch=$ver[patch]";
$reldir = "/var/www/html/release/$ver[major].$ver[minor].$ver[patch]";
if ($ver['testrel'] < 65535) {
$sql .= " AND testrel=$ver[testrel]";
}
else {
$sql .= " AND testrel IS NULL";
}
print "<table border=\"0\">";
print "<tr><td align=\"right\">Version: </td><td>$ver[name]</td></tr>";
$stmt = $pdo->query($sql);
if ($stmt && $stmt->rowCount() > 0) {
$row = $stmt->fetch(PDO::FETCH_ASSOC);
print "<tr><td align=\"right\">Comment: </td><td>{$row['comment']}</td></tr>";
print "<tr><td align=\"right\">Release Date: </td><td>{$row['releasedate']}</td></tr>";
}
print "</table>";
if ($ver['major']==$oldver['major'] &&
$ver['minor']==$oldver['minor'] &&
$ver['patch']==$oldver['patch'] &&
$ver['testrel']>$oldver['testrel'] &&
$ver['testrel']<65535) {
$relnote = "$reldir/T" + $ver['testrel'] + "/release_note.html";
if (file_exists($relnote)) {
print "<h4>Release Note</h4>";
print implode('', file($relnote));
}
else {
for ($t = $oldver['testrel']+1; $t <= $ver['testrel']; $t = $t+1) {
$relnote = "$reldir/T$t/relnote.html";
if (file_exists($relnote)) {
print "<h4>Release Note (-T$t)</h4>";
print implode('', file($relnote));
}
}
}
}
else {
if ($ver['testrel'] < 65535) {
$relnote = "$reldir/T$ver[testrel]/release_note.html";
if (!file_exists($relnote)) {
$relnote = "$reldir/T$ver[testrel]/relnote.html";
}
}
else {
$relnote = "$reldir/formal/release_note.html";
if (!file_exists($relnote)) {
$relnote = "$reldir/formal/relnote.html";
}
}
if (file_exists($relnote)) {
print "<h4>Release Note</h4>";
print implode('', file($relnote));
}
}
}
catch (PDOException $el) {
print $el->getMessage() . "\n";
try {
if ($dbh != null) {
$dbh->rollBack();
}
}
catch (PDOException $e2) {
print $e2->getMessage() . "\n";
}
}
?>
http://photos.readynas.com/html//error_ ... _login.php?
<?
echo "<html>\n";
if ($_GET[uri]) {
echo "<h1>Sorry, you entered url which may be temporaly offline or obsoleted</h1>";
echo "<p>http://$_SERVER[HTTP_HOST]$_GET[uri] may be off-lined or obsoleted.";
list($dummy, $rnp2host, $rnp2path) = explode('/', $_GET['uri'], 3);
if ($_GET['lastupdate']=='') {
$lastupdate = 'Never';
}
else {
$lastupdate = date(DATE_COOKIE, $_GET['lastupdate']);
}
echo "WebForwarding information for '<tt>$rnp2host</tt>' at: $lastupdate.</p>";
echo '<p>Please try later. If you continuee seeing this message, please contact with whome you got this url from.</p>';
echo '<p>Following are possible reasons:</p>';
echo '<ol>';
echo '<li>If WebForwarding have never been setup, router is not support UPnP or not functioning well. Try power cycle the router.';
echo '<li>Photographer turned off ReadyNAS.</li>';
echo '<li>Photographer uninstall ReadyNAS PhotosII.</li>';
echo '</ol>';
} else {
echo "Bug in mod_rnp2hop.c.";
phpinfo();
}
echo "</html>";
?>
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!