homeHome contactContact portfolioPortfolio musicMusic videoVideo historyHistory calendarCalendar rssRSS
karlpox | with GOD all things are possible

Enable/Disable Regedit

Ok this is my first post for the Month of May because my web server was down. And currently thinking of switching server but anyways. If you want to Enable or Disable your regedit simply follow this instructions.

1. Click on Start
2. Click on run
3. Type gpedit.msc then enter
4. Go to User configuration then Administrative Templates then System
5. Right click on Prevent Access to registry editing tools
6. Then you disable it if you want to use your regedit, otherwise enable to it to prevent users from editing your registry.

Note: If you want to edit your registry but its already disabled then you have to re-enable it first then disabling it again to work. Probably an Windows XP Bug.

Changing Ports WAMP

If you installed WAMP without changing anything then your default port would be 80. So if you want to change your listening port simply follow this instructions.

1. Left click on the WAMP icon on your system tray.
2. Go to Apache then click on the httpd.conf option.
3. Press Ctrl+H to open the replace function of notepad.
4. Enter 80 on the Find What field.
5. Enter your desired port on the Replace with field.
6. Click on the replace all to replace everything.
7. Save your httpd.conf.
8. Right click on your WAMP icon on the system tray then exit.
9. Run WAMP again and now your port is 8080. You can access your localhost by using this address on your browser http://localhost:8080

MySQL GUI Tools + WAMP

To integrate MySQL GUI tools on WAMP follow the instructions below.

1. Download the GUI Tools to be used on this page.
2. Download the one with the “Without installer (unzip in C:\)”.
3. Extract the one you have downloaded.
4. Copy it to your C:/wamp
5. Click on Start and then run.
6. Key in regedit then press enter.
7. Go to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > wampmysqld
8. Right click on the ImagePath.
9. Take note of the value because the version of MySQL might change. For example mine is.

c:\wamp\bin\mysql\mysql5.0.51a\bin\mysqld-nt.exe

change it to

c:\wamp\bin\mysql\mysql5.0.51a\bin\mysqld-nt.exe –defaults-file=c:\wamp\bin\mysql\mysql5.0.51a\my.ini wampmysqld

Your MySQL GUI tools should work now. This solution also solves the Either the server service or the configuration file could not be found. Startup variables and service section are therefore disabled problem.

High Page Rank Directories

I just found this post from eches blog. Adding your blog to online directories would be a great idea to increase your blogs exposure to the web. By this people would see that your blog is existing with this type of topic and can visit your blog. This would help add back links to your blog.

SEO friendly directory does not:

• Use Redirects
• Use no index, no follow tags
• Have too many links on one page
• Prevent directory pages with robots.txt
• Put listings too deep for a single category

SEO friendly directory does:

• Make the links look readable as static links
• Use plain HTML < a href > links
• Put links with meaningful anchor text
• Use Mod rewrite
• Use sitemap
Read more »

PHP Discovery

I just discover a shortcut with PHP and MySQL. First I`ll discuss my problem with you. My problem was I wanted to create a array in my database that would support all the categories my post would need.

For example this post is under the category PHP+MySQL and Tips & Tricks, and I don`t want to create a new table for that so what I did was put everything under 1 field kinda like an array on your database.

For example PHP+MySQL has an ID of 1 and Tips & Trick has and ID of 2. So when I save it it looks like this ,1,2,. Now the data type of this is varchar. So it would be saved in my database like that. So when I want to use that data to view all my categories I simply use the explode function. And since its a varchar after the using the explode function it would automatically be transformed to an integer which I can use as a foreign key to access the ID number on the category table

<?php

//Im using the example above under the variable example.
//Im using the explode function that would break the string every occurrence of a comma (,)
$example = `,1,2,`;
$temp=explode(`,`,$example);

//Use the sizeof function to get the array size of the array $temp
$size=sizeof($temp);
//Increase the $size due to excess of , in the string
$size--;

//I use connect.php to connect directly to my database. Its much easier that way.
include(`connect.php`);

//start with 1 because the string started with a comma.
for ($a=1; $a<$size; $a++)
{
//Your query.
$q="select * from category where cat_id like `$temp[$a]`;
$r=mysql_query($q);
$row=mysql_fetch_array($r,MYSQL_ASSOC);
//Output
echo $row[`cat_name`].`<br>`;
}

?>

By this code I simple broke the string $example to be used as a foreign key for my category table. Take note that the $example variable also came from my database which is my way of saving an array. Hope you get the idea!