Jump to content


Member Since 18 May 2007
Offline Last Active May 09 2013 06:20 AM

Topics I've Started

Really strange problem with P-2601HN-F1 router

16 January 2012 - 09:55 PM

Sometimes we cant access the HTTP server from its own WAN IP, this goes both when trying to enter the WAN in the browser (should throw a 403), and when trying the hosted domains.
The only way to solve the problem that i know of, is to turn off the router and turn it on again (not the same as a settings reset), this is of cause a smaller inconvenience.

When i try to access one of the hosted websites, or the WAN IP from the server, i simply get a connection time out error, like a firewall has blocked connections from the WAN IP. But there's no software firewall running on the server.
People from the outside can still access the websites, and i can also access the websites if i use a proxy server.

Pinging the WAN ip of the server, from the server also works, so it seems its only related to HTTP access for now.

I made sure that the firewall in the router was disabled, and that DoS prevention was disabled as well.
I was thinking that perhaps the router accidentally blocked the WAN, but that doesn't seem to be the problem.
The LAN IP of the server is reserved to the MAC address of the server, but i also don't think this can be the problem, since the server still gets connections from the outside. In other words, i don't think its a conflict on the LAN.

Another thing i don't really get, is why the memory usage in the router is at an all-time high, about (95%). We only got a few PCs connected.

Redirect after deletion of comment and timestamp update = no cache revalidation

03 January 2012 - 04:08 AM

I'm having a problem with a bit of code, which works for everything else, but just doesn't work when used for deletion of comments.

The relevant code:
mysql_query("UPDATE $table SET LastEdited = '$time' WHERE PID = '$ID'", $Connection) or die(mysql_error());
header('Location: /'. $URL;
This works, the resource is getting updated. What doesn't work is the revalidation after the redirect.

The code I'm using for caching is:
  header("Cache-Control: must-revalidate");
  header("Last-Modified: ".gmdate("D, d M Y H:i:s", $Header['LTIME'])." GMT");
  header("Etag: $etag");
  header('Content-type: text/html; charset=UTF-8');

if ((@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $Header['LTIME']) && ( 
    trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag)) { 
    header("HTTP/1.1 304 Not Modified");

Its the exact same code used when posting comments on the site, aside from the query of cause. What i don't get, is why i have to hit update in my browser, to get it to re-validate.

The $etag will only be updated if the sites source have been changed.

preg_match is always returning true, problem with UTF-8?

06 November 2011 - 11:04 PM

I had some code that I'm pretty sure used to work, basically something like the below.

if (preg_match("/[a-zA-Z0-9]+/", $_POST['title'])) {
   echo $_POST['title'];exit();

Now i just don't get why it always returns true, even when entering special characters like "!#%?"..

The only thing which comes to mind, is that i recently made a move to UTF-8..

phpMyAdmin and special Danish letters ÆØÅ

02 May 2011 - 09:40 PM

I recently discovered doing a checkup in phpMyAdmin, that i couldn't enter danish letters directly from phpMyAdmin, and still have them show up correctly on my site. I suspect it must be a server configuration, or bug with phpMyAdmin it self.

Isn't UTF-8 supposed to support these letters, without having to use their HTML entities?

The problem is.. I can post these characters in comments from the website, and they will also show up correctly. But then they will be messed up when viewed from within phpMyAdmin.
The really strange part is, when i submit these characters from phpMyAdmin, then it will be the other way around, and they will just show up as � when viewed on the website.

The MYSQL default character set is UTF-8, inside of my.ini. And i also tried to change the Collation of the table, and the effected field from latin1_swedish_ci to [i]utf8_general_ci, which made no difference whatsoever.

Governmental interference at is worst?

20 March 2011 - 10:09 PM

As you may know, there was a case against Microsoft, which claims that Microsoft abused their market dominance by having bundled Windows with certain software comportments.
It smells like the commission acted in their own interests to me, and disregarded the rights of the individual company.

It was not like Microsoft blocked the installation of other browsers or media players. Which may raise the question, what will we see next? Notepad alternatives making case against Microsoft for bundling notepad? Advertising for competitors?

If you read the Wikipedia article on the case, then it should be obvious that some injustice toke place, (unless its been manipulated). Mainly around the bundling of software, where i personally find the argumentation to be totally flawed. Windows has been like that traditionally after all, and basically everyone is free to create their own OS if they don't like it.

Who is to interfere when the system fails like that? Its also rather disturbing how the EU can fine whomever they seem fit, just because they have a proprietary business model, which they happen to dislike. In that regard, many open source fanatics seem to be careless crocks, who disrespect the right of ownership, and the right to make your own rules around what you own.

Requiring licensing fees of technologies, is perhaps a tad over the top. But nothing can change, that its up to the individual company how they want to distribute their software.

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime