Jump to content

speedy_rudolf

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

speedy_rudolf's Achievements

Member

Member (2/5)

0

Reputation

  1. Yeah...thanks....I already knew that....what I'm trying to do now is find a way to solve it....
  2. Thanks...But I have already tried everything you said, so....
  3. I already said it's not a router problem, as it is already configured from the first try at the server when everything was working fine, except for a few processing bugs.
  4. Hi. I'm trying to build a home server using Microsoft Windows Server 2008 R2, Apache 2.2, PHP 5.2, MySQL 5.5. The server works fine localy. The problem is accessing it externaly (from LAN / Internet). I can't get my other computer (both connected through a router) to "see" the server. The problem isn't with the router (I had to reinstall the Windows to solve some problems ...the first time I was using IIS and I could see the site from LAN/Internet and I didn't change any settings in the router) or the firewall (I have disabled both PC's firewalls for testing purposes). So I'm guessing it might be an Apache setting problem, but I can't figure out what (I created a virtual server for the site using localhost as the domain name as I have read that this might be a cause, but no luck). Any idea what the problem might be and how to solve it? Thank you in advance. Bye. PS: I don't know if this helps, but I can't even ping one PC from the other.
  5. Hi. I'm using Microsoft Windows Web Server 2008 R2. I have setup IIS7.5, PHP 5.2 and Mysql Enterprise Edition 5.5 successfuly. The problem I'm having now is getting the SMTP server to work. Using the code: <?php $to=""; $from=""; $subject="Contact"; $message="Nume: $_POST[name] Email: $_POST[mail] Mesaj: $_POST[msg]"; if(mail($to, $subject, $message, $from)) {header("Location: site.html");} else {echo ("Mail could not be sent.<br><br> <a href='site.html'>HOME</a>");} ?> writes in the log entries that everything is ok and creates the mail in the queue folder, but doesn't send it (it gets stuck in the queue). Using the code: <?php $to = ''; $subject = 'TEST mail'; $message = 'Hello. This is a test email from me.'; $headers = 'MIME-Version: 1.0' . " "; $headers .= 'Content-type: text/plain; ' . " "; $headers .= 'To: Rudolf <>' . " "; $headers .= 'From: Contact <>' . " "; mail($to, $subject, $message, $headers); ?> writes the same log entries (everything ok) but creates the mail in either BadMail or in queue (in which case the mail sits there for a few minutes then disappears, but nothing reaches the recipient) or doesn't create a mail at all (but the log entries are always consistent). I have granted permisions in Connection to 127.0.0.1 and in Relay to 127.0.0.1 and localhost. I have allowed port forwarding on my router on port 25 and my ISP isn't blocking port 25. Any idea why this might be happening and how to solve it? Thank you in advance. Bye.
  6. Hi. I have the following code: <?php $host=""; $username=""; $password=""; $db_name=""; $tbl_name="topic"; // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $name=$_POST['name']; $detail=$_POST['details']; $sql="INSERT INTO $tbl_name(topic, detail, datetime)VALUES('$name', '$detail', NOW())"; $result=mysql_query($sql); if($result){ echo("Topic created. "); $sql3="SELECT max(id) FROM $tbl_name"; $result3=mysql_query($sql3); $tbl_name2="top_img"; for($i=1; $i<11; $i++){ $uploaddir = '/imgs/'; $uploadfile = $uploaddir . basename($_FILES['img'.$i]['name']); echo '<pre>'; if (move_uploaded_file($_FILES['img'.$i]['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } }} echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; echo("<br><br><a href='site.html'>HOME</a>"); ?> And the error message: Any idea what the problem might be? Thanks in advance. Bye.
  7. Yes, I am using IIS. I have tried naming it *.php, that just gives me a "500" error. As for the configuration, how can I configure it so it also handles scripts within html? (I haven't tried inserting a handler for html, but I guess it would also give me the "500" error.)
  8. Hi. I'm fairly new to server management, so bear with me (and sory for my english). I'm have successfuly installed and configured Windows Web Server 2008 R2 and PHP 5.3.5 (I know it works because I can run *.php files/scripts just fine), but I have one problem. It doesn't run php scripts within *.html files. Let's consider the following code: <html> <head><title>TITLE</title></head> <body> <?php echo("Hello ");?> world! </body> </html> The output to the above code is: Does anyone know how to solve this problem? Thank you in advance. Bye.
  9. Figured out how to make the onmouseover to work.... Now what about the "rows as links" part? Any ideas how to make that work? More specifically, I what to use as link the entire cell (background+text, not just text).
  10. Hi. I've been working on a project for some time now, and just recently I installed Firefox. Now, part of the site (which works perfectly in IE6/7) doesn't work in Firefox. Here is part of the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Meniu de navigare</title> </head> <body bgcolor="#000437"> <table width="119" style="position:relative; top:35%"> <a href="pag_start.html" target="continut"><tr><td class="nav_bar" height="24" background="p1.png" valign="center" onmouseover="background='p2.png'" onmouseout="background='p1.png'" onmousedown="background='p3.png'" onmouseup="background='p2.png'">Home</td></tr></a> blah blah blah </table> </body> </html> (I didn't copy all of the code because it's basically the same all the way down) The main problem is with the link (Firefox apparently doesn't recognize table rows as links). The second problem is with the onmouseover/onmouseout etc handlers (absolutely nothing happens). Any ideas how to solve this? Thanks. Bye. PS: just in case you need to know, the code is for a nav bar.
  11. Hi. I think you all know me by now so I'll cut to the chase. <?php $host="edited"; $username="edited"; $password="edited"; $db_name="edited"; $tbl_name="topic"; // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $name=$_POST['name']; $detail=$_POST['details']; $sql="INSERT INTO $tbl_name(topic, detail, datetime)VALUES('$name', '$detail', NOW())"; $result=mysql_query($sql); if($result){ header("location:site.html");} else{ echo("I have failed you master.");} ?> Displayed error: "I have failed you master." Anyone know a possible cause? Thanks. Bye.
  12. no. The "error" occures before the record being inserted. yeah...as it turns out, it was an error/bug on the server's end. it couldn't correctly process the form. it works just fine now. thanks.
  13. no. The "error" occures before the record being inserted.
  14. Hi. I'm trying to build a sort of blog where users have to register to post questions/comments. My problem is with the registration part. Here is part of the code: <form name="registration" method="post" action="registration.php"> <tr><td align="left">Nume</td> <td align="right"><input type="text" name="name" onKeyUp="validare()"></td></tr> <tr><td align="left">Email</td> <td align="right"><input type="text" name="email" onKeyUp="validare()"></td></tr> <tr><td align="left">Username</td> <td align="right"><input type="text" name="username" onKeyUp="validare()"></td></tr> <tr><td align="left">Parola</td> <td align="right"><input type="password" name="password" onKeyUp="validare()"></td></tr> <tr><td align="left">Confirmare parola</td> <td align="right"><input type="password" name="pass_conf" onKeyUp="validare()"></td></tr> <tr><td align="left">Anti-spam</td> <td><script type="text/javascript">DrawBotBoot()</script></td></tr> <tr><td></td><td><input type="submit" name="register" value="Inregistreaza-te" disabled="true"></td></tr> </form>... </html> <?php $host="mysql3.***************"; $username="a7129718_root"; $password="hello2"; $db_name="a7129718_site"; $tbl_name="members"; // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT MAX(id) AS Maxa_id FROM $tbl_name"; $result=mysql_query($sql); $rows=mysql_fetch_array($result); if ($rows) { $Max_id = $rows['Maxa_id']+1;} else { $Max_id = 1;} $name=$_POST['name']; $email=$_POST['email']; $user=$_POST['username']; $pass=$_POST['password']; $sql2="INSERT INTO $tbl_name(id, name, email, username, password)VALUES('$Max_id', '$name', '$email', '$user', '$pass')"; $result2=mysql_query($sql2); if($result2){ header("location:login.html");} else{ echo "cannot insert into table";}} ?> The problem is: there is no error message. The server just redirects me to their error page, which doesn't contain any error code, just some ads. Can you tell me what the problem might be? Thank you in advance. Bye."
  15. Nope. Doesn't work. I tried copying the, changing the code, rewriting the code from scratch (using your code as a guideline), but still nothing. At best, it just takes me right back to my original problem, but most often it just gives me an error. Thanks anyway. Hope someone else can give me another idea. I finally did it Here is the code mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name ORDER BY id DESC"; // OREDER BY id DESC is order result by descending $result=mysql_query($sql); ?> <table width='50%' border="0" align="center" cellpadding="3" cellspacing="1"> <?php $limit=10; $page=0; $numrows = mysql_num_rows($result); $pages = intval($numrows/$limit); if ($numrows % $limit) { $pages++;} $page=$_GET ; $limitst=10; if(empty($page)){ $limit=$limitst; $oldlimit=0; $page=1; }else{ $limit=$page*$limitst; $oldlimit=$limit-$limitst; } $result = mysql_query("SELECT * FROM $tbl_name ORDER BY id DESC LIMIT ".$oldlimit.",".$limitst); while($rows=mysql_fetch_array($result)){?> <tr><td><font size="+2"><a href="view_topic.php?id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></a><BR></font></td> <td width='0*'><? echo $rows['datetime']; ?></td></tr> <tr><td><? echo substr($rows['detail'], 0, 250)."..."; ?> <a href="view_topic.php?id=<? echo $rows['id']; ?>"><? echo "Citeste mai mult";} ?></a> </td></tr> <tr><tr><td> <? if($pages == 1){ echo "<b>1</b>"; }else{ for ($i=1; $i <= $pages; $i++) // loop through each page and give link to it. { if($i == $page){ echo("<b>$i</b>\n");} // If current page don't give link, just text. else{ echo "<a href=\"$PHP_SELF?page=$i\">$i</a> \n"; } } } ?> </td></tr></tr><?php mysql_close(); ?> </table> Thank you very much every one for your ideas
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.