Can’t connect to localhost

By SaWey | March 10, 2009

Today I was working on one of my php projects on my local WAMP server, and when I wanted to load my app in my browser, suddenly I couldn’t connect to http://localhost anymore.
First, since my laptop hadn’t been rebooted for 2 weeks,  I rebooted to see if that would help, but that didn’t help. I tried looking in my Apache logs and saw nothing there from my tries to connect.
Then I connected to http://127.0.0.1 and … it worked without a hitch.

This got me to think it was a windows update, I looked through the update history and saw that Windows Defender got an update. So I started Defender to look for a log and this brought me to the problem and the solution.

SettingsModifier:Win32/PossibleHostsFileHijack
Source: 
file:
C:\Windows\system32\drivers\etc\hosts

More info over here: microsoft.comraman amplifier

 

Apperently something changed my ‘hosts’ definition file. I opened the file and there was no mapping of localhost to a descent IP address, so I added it myself like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright (c) 1993-2006 Microsoft Corp. 
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows. 
# This file contains the mappings of IP addresses to host names. Each 
# entry should be kept on an individual line. The IP address should 
# be placed in the first column followed by the corresponding host name. 
# The IP address and the host name should be separated by at least one 
# space. 
# Additionally, comments (such as these) may be inserted on individual 
# lines or following the machine name denoted by a '#' symbol. 
# For example: 
# 102.54.94.97 rhino.acme.com # source server 
# 38.25.63.10 x.acme.com # x client host 

127.0.0.1 localhost
::1 localhost  
 
 

леглаonline casino
Note: When you try to save this file, Defender will prompt you with the message ‘Win32/PossibleHostsFileHijack’, which you have to ignore.
After saving the file, everything should work as before.

Topics: Small talk | No Comments »

Rapidshare’s ‘Remote Uploads’ fixed…

By SaWey | January 6, 2009

Recently I wanted to upload over 1000 files to Rapidshare as a backup of my server. Since the files where on my server, I could use the ‘Remote Uploads’ feature to spare some bandwidth.
As a drawback, RS only allows 30 simultanious remote uploads, you have to press ‘refresh’ to see if the upload has completed already and then you have to remove the finished uploads from the queue one by one. I think it would take me a day to upload all those files…

So I started coding a javascript which  would allow me to add an unlimited amount of links and would handle the refreshing, removing and of cource, the uploading.
you can download the script here:  Download

To us this script, you have to inject the code in the remote upload page of RS, you can do that by using firebug in your browser, copying the code from the script and pasting it in the console of firebug. Let it run the code and within 5 seconds you should see the changes in the RS page (the code waits 5 seconds for jQuery to load and then proceeds)
Be sure to enter well formatted urls, as RS hasn’t got a clue on how to handle special characters in them.

There are still some bugs in the script, but it did the job for me and saved me a lot of time.

Topics: Small talk | 13 Comments »

PHP CodeColoring in Dreamweaver

By SaWey | December 14, 2008

I have used dreamweaver since a long time to write my php scripts and have liked it ever since. There was only one thing that bothered me, and that is when javascript was written inside my scripts. It messes up the code coloring as Dreamweaver thinks it is an ending tag for php code. So all code below a ‘</script>’ tag was colored as plain text and thus not very readable.

I found a solution to this a long time ago, but I had to reinstall Dreamweaver not so long ago and was forgotten where I had to make the changes. Today I remembered and decided to write this post so I won’t forget it anymore.

It’s very easy, open the file
C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\CodeColoring\PHP.xml

and remove the lines:
<blockStart doctypes="PHP_MySQL" scheme="outerTag"><![CDATA[<script\s+language\s*=\s*"php">]]></blockStart>
<blockEnd><![CDATA[</script>]]></blockEnd>

If Dreamweaver was open during the edit, you have to restart it in order for the changes to work.

For quick edits, I mostly use Notepad++, but since I have a Dreamweaver licence I also like to use it :)

Topics: Small talk, Web developments | No Comments »

Coppermine Theme Contest

By SaWey | December 2, 2008

After a few years of development, the Coppermine Dev Team will be finishing up the code of Coppermine Photo Gallery 1.5.0!
The last year and a half I have had the pleasure to be part of the team and have to say that it is about time the new version is released :-)

Since the CPG 1.4.x series have been around from before the web 2.0 era and the default theme is still the same, the development team has announced the first Coppermine Theme Contest

So if you are a web designer, PHP programmer, CSS fanatic, graphics artist or just a Coppermine enthousiast, be sure to enter the contest. Currently we have not yet announced which prizes can be won, but I can tell you it will be worth the effort!

Topics: Coppermine, Small talk | No Comments »

Poker Odds Software from Texas Calculatem

By SaWey | May 13, 2008

 I received a license to the latest release of the poker software from Texas Calculatem the other day. I’m not sure if it actually was a beta release, I think that they actually gave me the final release. It’s really a nice piece software if you’re a poker player.

I’ve been so kind to the people at Texas Calculatem that I let them set up page about the benefits of using a poker software that you can find here. I know that they have an even more advanced odds calculator called Calculatem Pro, make sure to check that one out if you’re in to online poker. You can find the CalculatemPro odds calculator for texas Holdem here.

I’m not gonna tell you to buy their poker software, but they do give you some extra time to focus on the opponents instead of calculating outs and odds of making a better hand. I found it useful and I think you should try it out if you’re into online poker. You can find som unbiased information about poker calculators from Wikipedia.

Topics: Small talk | 1 Comment »

In search for a multi app login system.

By SaWey | January 23, 2008

Prequel 

As a web developer, I like to use great applications that do whatever I need, but when it comes to integrating different apps into one, the troubles begin.
Wouldn’t it be great if all those different apps used one authentication system, so when you login to one of them, you are logged in to all of them.

Around most of the applications there is an active community available, and most of the time someone is working on integrating that app into another. All that precious time that could be spent on new features, security enhancements, home relaxation…
 

The way I see it: 

Let’s call the system interconnect.

Interconnect would be a login-framework that uses a basic backend.
It should include all available authentication methods (openId, LDAP, Apache, …) and support all databases commonly used in web apps.

The database should have a layout similar to this:

-User table

Contains basic user info like id/username/real name/password/email/…

-Group table

A basic implementation of usergroups

-User-Group table

Offcource we need to know which user resides in which group.
This table should also contain a field called ‘application’.
The ‘application’ field can be used to set a per application group assignment.

-Config

Not sure if this would be necessary, but it could contain some configuration of the system.

To autenticate a user, an application would include a class of the framework to handle all the checks if the user may be logged in.
This class would also return a User-object which contains all info about this user.
Same thing for adding/editing users, the same class does it all : -)

I think this would be fairly easy to do and if I would be able to get the attention of some application development teams, this project can come to life.
We first should have a big discussion on how and what it has to be able of.
So, if you’re interested, please comment and spread the word!!!

  
  
  
How ironically, when writing this post, and browsing the net (yes, that’s a strange combination), I just stumled upon an app that does what I am talking about: Crowd.
Only problem is, this is a commercial package an thus can’t be integrated in open-source projects.

Topics: Small talk, Web developments | 4 Comments »

OpenID login

By SaWey | January 10, 2008

OpenId
Since a while, I set up my own OpenId server, so now I can login on certain websites using my own url.
This is something really great (although I haven’t used it very much)
I hope more sites will be integrating OpenId logins in the future as this is realy easy for a lot of people!

To support this login system, I integrated it into my website, so if you have one, you can login and an account will be automatically created.
No hassle to go through a lot of steps anymore.

If you’ve set up a nickname on your openId sever, then the system will try to use that one. If the nickname is already in use, then your website url will be used.
Same thing for your email address, it will add it by itself.

Topics: Small talk | No Comments »

New support forums

By SaWey | December 20, 2007

As phpBB3 is finally gold, I decided to add it to my site instead of the otherone that was made for Wordpress.
phpBB3 is much more user friendly, and I’m already a long time user.

Also, now I can show of my mods in there.

To go to the forums, just click on the ’support forums’ link on your right.

Topics: Small talk | No Comments »

Portfolio

By SaWey | November 14, 2007

I’ve found a little time to update this site,
I managed to write a little bit of my portfolio.

As time moves on I will be adding content to it.

I’ve also setup a support forum for my plugins

Topics: Small talk | 2 Comments »

Finally some site

By SaWey | May 15, 2007

After years of thinking, I finally got my own domain up and running.

I’m eventualy going to use this site as a portfolio, but that’s future talk, as I probably won’t have ay time to update this site.
I hope some day I will have that time, but at the moment there are lots of things to do in my life.

This is it for now,
See you soon

Topics: Small talk | 2 Comments »