Absolutely Tech

Installing a web server package for PHP development


So, you thought you would make a web application but didn’t know where to start?
This is the place to start. You need a web server installed on your computer before you start any kind of web programming be it PHP, ASP .Net, ColdFusion, JSP.

For developing in PHP, you would have to install an Apache HTTP server, php interpreter, MySQL server. Installing all of them would be a real headache and so would be configuring them to work with each other. To simply this we have WAMPs(Windows Apache, MySQL, PHP).

One such WAMP distribution is XAMPP which is cross platform and has many features inbuilt like filezilla ftp server, a mercury mailing server etc.

To install XAMPP first download the installer file for your OS from the following link:
http://www.apachefriends.org/en/xampp.html

Read the rest of this entry »

Get Auto Increment value from MySQL table


Many a times we require the next Auto Increment value from a MySQL table. Most of the people would do something like this:

$query = "Select MAX(id) from users";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$maxid = $row['MAX(id)'];
echo $maxid;

This would give correct results but if we delete the latest row, it will start to give wrong results.

We’ve got another query which can be used to get correct ‘Auto Increment’ values from the table.
Read the rest of this entry »

[Solved] Absolute positioning and screen-resolution problem

Absolute positioning is great for positioning items anywhere on a page but it does not mix well with screen-resolution. It might look fine on your resolution but it might look completely different on another resolution. Element placement changes upon changing the screen resolution or even when resizing the browser window. It is because items positioning is measured from the browser’s window.

To always display it correctly, you can put relative or absolute positioning on the parent element.
Read the rest of this entry »

Debugging Javascript In Internet Explorer

Internet explorer has always been a programmer’s nightmare. You have finished a wonderful looking site, full of javascript effects just to find out that it doesn’t work in Internet Explorer. Its a real pain in the neck to find out which part of the script is causing errors in Internet Explorer.

In Firefox, we have tons of debugging option including the default error-console, firebug, etc which are very good tools. But in IE, the default error reporting mechanism shows wrong line no. most of the time, so its pretty useless.
Read the rest of this entry »

Solution to “MySQL Server Has Gone Away” Problem

Seriously guys, I got this error and I was laughing hard. The error is just too funny, don’t you think? Yes, it is but not for developers like me. Problem to this error is almost undetectable and there are more than a dozen reasons as to why this occurs and this often baffles developers.

This error generally comes when :

MySQL connection times out.

The MySQL server shuts down.

The connection is interrupted.

The query you are performing is too large for server to handle.

The query you are performing takes more space than allowed (default: 16MB).

While these are some common reasons, there maybe some unknown reasons to come across this error. I faced one of those unknown reasons. Read the rest of this entry »

Got a new domain for my blog (How I moved my blog to new domain)

Just bought www.insanelyme.com for my blog. As I consider myself insane (most of you will agree with that), I found this name suitable for my blog. I bought it in the same instant when I saw it was available.

I added the domain in cPanel as addon domain but unfortunately it didn’t support second level directory (example.com/tech/blog). So I copied all the files from the directory and pasted it in a directory on top level. I pointed the domain to it and it worked. I changed the Blog URL in admin panel and it worked.

Now, there was this problem of redirection. Read the rest of this entry »

Bluehost – the best host out there?

Before providing a review for Bluehost, I’ll take to back to the days when I knew nothing about web. When I say nothing, I just didn’t know anything except for normal browsing. Yeah, you heard it right. Through some googling and stumbling on an unknown page, I found out about adsense and its success stories. I made up my mind to do the same and start earning. Read the rest of this entry »

[HowTo] Convert HTML to PDF using PHP

In a recent project, I had to output to a PDF file as well as to the browser. For this purpose first I downloaded the library from here. Then this code:

Read the rest of this entry »

[HowTo] Increase Fervens’ (wordpress theme) width

Fervens is an extremely attractive and excellent theme for wordpress. After trying numerous themes, I settled for this and its really really amazing.

The only shortcoming was that its main content area was too small. On larger posts, the content would span upto numerous pages which would’ve not taken so much space if it had been a little bit wider.

I tried to experiment with the theme and modify it for greater width. It was not a difficult task and moderate knowledge in CSS is enought to make it accomplish. For the rest of you, I will teach you how to do it.
Read the rest of this entry »

Ubuntu 11.04

The next version of Ubuntu is coming soon

Follow me

Sponsors