Monday, February 9, 2009

Cannot enter Site Admin after installing WordPress 2.7 (1 post)

My problem is that I can't get into my Site Admin after installing the newest version of wordpress 2.7, Let me give you a little over view of my setup.

OS: Windows Vista
IIS: Version 7
PHP: 4.3 (Installed on IIS)
Browser: Firefox 3.06
Cookies: Enabled
Firewall: Enabled
Server: Localhost
Database: MySQL 4.0.20a-nt

After exploring a lot of resources and trying out a million things I just couldn't find out why it is not allowing me to get into site admin. I tried out things like these and nothing worked...

- Enabling Cookies, Clearing etc
- Restarting browsers
- Trying multiple browsers
- Making sure sessions are enabled
- Enabling / Disabling firewalls
- resetting password manually from database (after md5-hashing)
- Adding values to wp-config files
- Making sure ABSPATH was set, ech-ing it
- Even reinstalling the whole PHP, mySQL and wordpress a number of times

Problem Elaborated:

When I installed the complete blog locally, everything went well, but as soon as it comes to the login screen, and I enter the username and the random password it generated. It redirects me back to the login page without any error messages. If I am in http://localhost/mynewblog/wp-login.php and enter the admin username and password, as soon as I press the enter button, it goes to http://localhost/nadir/wp-admin/login.php and then suddenly it returns to the same page with something like this in the address bar http://localhost/mynewblog/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2mynewblog%2Fwp-admin%2Findex.php

Also when I get redirected back to the login page, it has already registered the user at this point, because if I go back to the main page of the blog http://localhost/mynewblog/ it shows me the LOGOUT link at the lower right corner of the right panel. This means that the user is already authenticated but it’s just not going into the site admin.

Temporary Solution:
After digging a little deeper and debugging the whole thing by putting echo “I’m now here”; after each line I would try to figure out at which step it has a problem, I followed every ‘include’ and ‘require’ in each file in the process and then suddenly I found the step where it just allowed me to login.

The file is => /admin/admin.php
Line Number 28 or around
Function: auth_redirect();
I comment this and voila! I’m in the site admin!
Now I searched out what this function did… I found the above function defined in the following file
File: /wp-includes/pluggable.php
Line: 721 or around:
The function is this;

function auth_redirect() {
// Checks if a user is logged in, if not redirects them to the login page

if ( is_ssl() || force_ssl_admin() )
$secure = true;
$secure = false;

// If https is required and request is http, redirect
if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI']));
} else {
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);

I have skipped this step and have no absolute idea what this function does that caused it to take me back to the login page again and again. I’m guessing by the comments in the code that it has something to do with the http / https request!? I’ve been using a normal http connection throughout everything.

Guys all of you out there let me know what this function does as I have already spend a whole day figuring this out its 2:30 in the morning and my head is spinning. I can’t do more searching on this. If the function was there it was there for a reason. We need to know what reason was it.

Friday, December 5, 2008

SO! Irresponsible Facebook!

I just received an email from Facebook as under. I'm just amazed to see how irresponsible this mega website can be! The way this issue was addressed in the email sounds like this doesn't mean anything to the user nor the website itself.

Unfortunately, the settings that control which email notifications get sent to you were lost. We're sorry for the inconvenience.

To reset your email notification settings, go to:

The Facebook Team

They don't seem to notice that this could have a very negative impact on the image of facebook. Who knows what they loose next, private photos, passwords, chats or what! and you'll be getting and email, Sorry we lost your private data!

Thursday, May 8, 2008

Computer that runs at the speed of light (Literally)!

IBM is about to unveil a revolutionary form of computing that could tranform the World of information. It is known as the Crystal Computer and it is a way to use pulses of light to transfer and store digital information as quantum bits. A processor so fast it is capable of running the eqivilatent of 300GHz, or about 400 Gflop/sec, that’s about 100 times faster than today’s fastest consumer microprocessors.

.... The advance is similar to the one made by Australian National University, which used two lasers to focus at a silicate crystal holding atoms of an element known as praseodymium. The element absorbed the light and stored the quantum information as quantum bits.

....IBM scientists will use a complex process to evenly distribute the rare element neodymium inside silicate crystal. The process works by transferring information onto light beams utilizing the natural "nuclear spin" of the photons in the laser beam. When a series of three lasers are beamed in sequence on the crystal, digital information stored as quantum bits are released and the quantum information is encoded on the neodymium atoms. These atoms can store massive amounts of information. Because of the laws governing quantum mechanics, particles that make up the atoms can be oriented both up and down at the same time. This unit of information is called a qubit, and can hold much more information than a standard digital bit made up of either a 1 or 0.

....The best part about this breakthrough is that it shatters Moore’s Law, which states the number of transistors per square inch on integrated circuits will doubled every 18 months. The Crystal computer changes the computer paradyme by taking the transitor right out of the mix, and replacing it with the atom. Processor heat and complexity will be replaced with the cool methodical spin of the atom.

....Plans are speeding ahead for a 2009 introduction date, the working name for the chip is “neoton”. Can the Crystal Computer deliver the kind of performance promised and the reliability needed to capture the PC market. Only time and Moore’s unstoppable Law will tell..... " This is clearly the dawning of a new age in computers "


Tuesday, May 6, 2008

Working Steps for Installing Themes on Nokia E61i

I have been searching the internet ever since I got my E61i about installing themes to my new phone.

I use to get the error or "Expired Certificate", so I found that changing my phone date to almost one year back can do the trick, but there was no luck. I then get an error of 'Invalid Certificate and You System Date seems to be invalid'. Then someone wrote that the date should be after one or two weeks after the publishing date of the theme, I did that too but there was no luck.

I discovered that not only you have to change the date back but you also have to change the settings for application that are installed on the phone.

Here are some easy steps for installing themes to your Nokia E61i. It is guaranteed to work, if everything is compatible. It did for me, I hope it will do the same for you too.
  1. Go to Tools >> Clock >> Settings and change the time back one year. (if its 5/6/2008, change it to 5/6/2007) - In case the "Auto-Update" is enabled, it will prompt you "Auto Update Date Time Disabled"
  2. Then go to Applications >> App Mgr >Go To the Options Menu > Settings, In the settings change the "Software Installation" value to "ALL" from "Signed Only". Signed only is usually the default selected value.
  3. Now copy the theme to your phone (.sis file) and open it. It will verify to continue installing unsigned application, select "Continue", every time is asks for confirmation. Then select where to install the theme, that is phone or memory card.
  4. In the last go to Tools >> Themes >> and select the theme you just installed.
Enjoy the new themes on your new Nokia E61i, but don't forget to change back the date to the real date. You can find more themes on


You can post comments and feedback in case you are finding problems on your Nokia E61i.

Wednesday, January 2, 2008

Internet - A Vital Need / PHP getdate() Function

It is vital to have an internet connection in your life. No matter what field you are in, internet makes your life a piece of cake when it comes to gathering information or learning.

I find myself clinging between two different fields, that is, IT and Creative Designing. Being a Graphics Designer at core - I don't find myself very strong in programming / scripting.

There was a task when I had to retrieve the date form the database which is OLDER THAN 1 MONTH and is left unverified (a specific system was designed when the user who filled the form will confirm his/her e-mail address by clicking on the link in the dynamically-generated e-mail in their inbox).

For that I need to find the current date and perform a date calculation to get the only data which is 1 month old. Simple additions and subtraction of the Months or Days will some day / month give a negative value and the system will crash. I did not know how to make proper date-calculation in mySQL queries or PHP, I was very confused how to achieve this task, the other way around was to write a conditional code with a lot of if and elseif to detect and solve this problem.

I spend more than an hour to figure out all the values that we get when we use a function getdate() -- Due to no internet connection! If there was an internet connection it would have taken a minute or two to find it out. Basically when you use the following code;

$cur_date = getdate() ;
$cur_date) ;


function gets the current date and time of the system in an ARRAY. You will get an out put of this sort;

Array ( [seconds] => 10 [minutes] => 5 [hours] => 19 [mday] => 2 [wday] => 3 [mon] => 1 [year] => 2008 [yday] => 1 [weekday] => Wednesday [month] => January [0] => 1199282710 )
Notice the value in bold [0] => 1199282710 This is a very confusing value for me (as I didn't know the basics), anyway I figured out that it is number of seconds from the early / initial time.

-- I'm going to shorten the explanation here-for details you may contact / comment --

Windows Early / beginning time is 1st Jan 1970 05:00:00 (that is, 5 in the morning)
which in terms of timestamp is written as ZERO (0)

If you get a current timestamp it is the number of seconds added to the begining time, that is, zero.

So if you want to get to 1st of February 1970 then you should add something like this

(days * hours * minutes * seconds) this will give you the seconds in 1 month, which is;

31*24*60*60 = 2678400 = 1 Month = 31 Days
30*24*60*60 = 2592000 = 1 Month = 30 Days
24*60*60 = 86400 = 1 Day
3*24*60*60 = 259200 = 3 Days
7*24*60*60 = 604800 = 7 Days - Week

The system also knows which month has 28 days and 31 days. so when you are adding 2 months to a timestamp, note that its not always 2678400* 2 :)

Here is the code which I played with, take a look at it it may help you out.

$current_date = getdate();
$current_timestamp = $current_date['0'];
echo "Current Timestamp: " . $current_timestamp;
echo "

$current_date_formatted = date('d M, Y H:m:s A', $current_timestamp);
echo "Current Date Formatted: " . $current_date_formatted;
echo "

$current_date_sysformatted = date('Y-m-d H:m:s', $current_timestamp);
echo "Current Date System Formatted: " . $current_date_sysformatted;

echo "

$older_timestamp = ($current_timestamp - 2678400);
echo "Older Timestamp: " . $older_timestamp;
echo "

$older_date_formatted = date('d M, Y H:m:s A', $older_timestamp);
echo "Older Date Formatted: " . $older_date_formatted;
echo "

$older_date_sysformatted = date('Y-m-d H:m:s', $older_timestamp);
echo "Current Date System Formatted: " . $older_date_sysformatted;