me looking so small in this world

4 2008f November, 2008

how to enable innodb in xampp

Filed under: innodb, programming, web apps, xampp — rudyegenias @ 9:31 pm

Reference: The InnoDB Storage Engine

Find the file name my.cnf on xampp directory on C: drive. Uncomment the line that says:

#skip-innodb

and make sure that it will look like this:

skip-innodb

***
There are at least other setup option for innodb next to this line, just follow the helpful hints and you’re off. I can’t provide definite lines on this coz sadly my computer has broken down again? *Me thinks, am I worthy to be called a tech?* EVIL GRIN!

28 2007f September, 2007

how to change phpmyadmin theme

Filed under: php, phpmyadmin, xampp — rudyegenias @ 4:33 am

I just don’t want the default theme that came in with PHPMyAdmin they are huge and my eyes hurt when I look at them. If you are like me that doesn’t want to take extra step to develop themes and just want to have it appear smaller then this procedure is for you.

Enjoy!

15 2006f October, 2006

automatically start xampp on boot

Filed under: xampp — rudyegenias @ 11:35 am

(also applies to xampplite)

What could be the search engine terms for this?

  • start xampp automatically
  • xampp as a service
  • xampp in windows startup folder

Here we go with the story:

I always favored simplicity and ease of life that’s why I have many articles relating to productivity(has also remodeled the links on my blog to simplify things up). Then since I am always using xampp as a development environment. I want it started when I start my PC.

So how it is going to be?

  • as a service
  • as a startup program for windows(more clutter on your taskbar)
  • other things(don’t know/forgot)

As a service

You can set this one by:

  1. Going first to your installation directory(in my case it’s c:\xampplite). It could be somewhere else depending on your installation. Have also my full version in c:\x2\xampp
  2. Once your in the installation directory find xampp-control.exe and click/double-click to launch it.
  3. You should first stop all running instances of your apache2 and mysqld/mysql to do this.
  4. Click the checkmark next to Apache and Mysql with the header name Service.
  5. It will warn you that it’s installing as a service which of course is what we like it to do. Click Yes.
  6. Do step 5 also with Mysql. We’re almost done.
  7. Click Start » then Run
  8. Type services.msc(it can also be done in control panel under administrative tools which is a way lot of click than this one).
  9. Find apache2 and mysql services
  10. Double click each one and set the startup type to Automatic (You will be presented with 3 options: Automatic, Manual, Disabled)
    Automatic – will start it automatically at startup
    Manual – user’s will have to start it up manually i.e. by issuing command like net start apache2
    Disabled – will disable it.
    ****be warned though that any change in the services just like the registry can cause your system to stall***
  11. Click the start button to manually start it(just for the session though). The next restart it’ll be automated.
  12. Do the same with mysql.

As a startup program

  1. Find xampp_start.exe from your installation directory
  2. Press Ctrl+C to copy it or right-click the file and hit copy.
  3. Go to C:\Documents and Settings\Administrator\Start Menu\Programs\Startup and right click on it and hit Paste Shortcut
  4. When you restart it’ll be starting also and you’ll see something like this:

  5. You can stop it by issuing the xampp_stop.exe command in your installation directory.
    ***another worth mentioning is that if you right click again on the shortcut and hit properties, try to change the run option to minimized. This way the shortcut will be on your taskbar once started.

Enjoy.

6 2006f October, 2006

installing pear packages on xampp

Filed under: xampp — rudyegenias @ 12:58 pm

Once you’re on PHP development on windows you can’t escape xampp. Only if you toke the stressful path of installing the system one by one i.e. install apache, then php, then mysql, then perl.. then you have a good choice/stand that you know how to configure the system itself.

One thing about xampplite is that it doesn’t have pear installed.

For me? I toke the simple steps. I am lazy.. that’s what programmers are(not generally).

First, go to your xampp installation directory/folder and navigate to the php directory. For me it’s x:\xamplite\php

x:

cd \xampplite\php

pear install <package-name>

There you have it, that should do the job installing the package you want. You may have to list the package to know what pear packages are already installed

pear list

16 2006f September, 2006

restrict access to phpMyAdmin by authentication

Filed under: phpmyadmin, xampp — rudyegenias @ 1:39 am

Wondering how authentication/log-in form will be implemented in xampp? This edit in config.inc.php will handle the job.

The path for the configuration script is <your-xampp-installation-path>\phpMyAdmin\config.inc.php.

This line configures the authentication used by phpMyAdmin in accessing it:

$cfg['Servers'][$i]['auth_type'] = 'authentication method here'; // Authentication method (config, http or cookie based)?

Note:

If you replace the use authentication method here with:

config
- it will use the password and username from the configuration file. Remember the last tutorial? (read it here)

http
- will use the http authentication of Apache(secure/recommended settings)

cookie
- will use the database for username in authentication and will require browsers to allow cookie. (secure/recommended setting)

15 2006f September, 2006

enabling phpMyAdmin once you change root password or permission or privileges on mysql database

Filed under: xampp — rudyegenias @ 7:36 am

This applies to xampp-1.5.3a:
(don’t know about other versions since I only have this one. It works also for xampplite)

Yes, after a fresh install of a xampp program you are welcomed with a xampp pseudo website which is located in <path of xampp installation>/htdocs/xampp/. Clicking security you are given some important points to secure your website. That includes changing the root password. But alas, after changing it you’ll not be given a chance to use the ever-friendly phpMyAdmin.

Find <path of xampp installation>/htdocs/xampp/phpmyadmin/config.inc.php

$cfg['Servers'][$i]['password'] = ”; // MySQL password

Change this so that it’ll reflect your current mysql password.

$cfg['Servers'][$i]['password'] = ‘your_password_here‘; // MySQL password

Don’t forget to save it aight?!

And if you read furthermore you can see that you can also restrict/assign a mysql user with just enough privilege to access the database. :)

14 2006f September, 2006

apache 2 virtual directory the xampp approach

Filed under: apache, xampp — rudyegenias @ 2:43 am

This tutorial is based on a solution to a problem encountered.

Operating environment: Windows XP

I always want to place my project on a separate directory under my documents for easy access. When I think of a solution I have come to this approach

  • allow directory navigation since my sandbox(the folder/directory) I will use does not contain any php/html only folders
  • create another pseudo domain for the sandbox for easy access

First I need to think of a directory to place my files/folders/directories d:\sandbox\ will be ideal since my documents are all in that directory.

All of my projects are placed on their particular folder under sandbox. I need to edit the following files:

httpd.conf
I have just copied this part to allow directory navigation. You don’t want this enabled in your enterprise application though.

<Directory “C:/x2/xampp/htdocs”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

Eliminated all of comments to simplify it and added the sandbox folder/directory. Note and a warning: also that use a forward slash rather than windows backslash to do this. Normal directory path in windows will be d:\sandbox.

<Directory “D:/sandbox”>

Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All

Order allow,deny
Allow from all

</Directory>

httpd-vhosts.conf
My http daemon or the apache program I’m using is listening on port 8080. Apache 2 has included this part in extras folder in the installation path. How to set up port in apache tutorial is in here.

<VirtualHost *:8080>
DocumentRoot D:/sandbox
ServerName sandbox
</VirtualHost>

hosts
The full path is C:\WINDOWS\system32\drivers\etc>hosts. You can see a tutorial on this one in here.

# have stripped off the comments

127.0.0.1 localhost
127.0.0.1 testground.com
127.0.0.1 sandbox.testground.com
127.0.0.1 sandbox

making your http daemon or apache listen on a particular port

Filed under: apache, xampp — rudyegenias @ 2:33 am

In your Apache installation folder(it is called this way in windows. can’t do anything on it :D ), find the particular line. That is the default port http daemon is using.

When I have installed xampp 1.5.3a I have installed it in c:\x2\xampp directory. Apache configuration should be on <xampp install directory>\apache\conf in my case c:\x2\xampp\apache\conf

Listen 80

Just change the number 80 to whatever port you want.

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 8080

Why would you want to do that.

  • First I am using skype which in default is using port 80 for the call feature that it have.
  • Second to get more acquainted with the Apache software ;D
  • Third some security. Remember that any process that you can do to further deter an attacker can be helpful. It is somewhat security through obscurity.
  • Etc.

21 2006f August, 2006

enabling mod rewrite in xampp

Filed under: htaccess, xampp — rudyegenias @ 5:01 am

I know this is pretty lame but being not lame is not beginner friendly. Being used to htaccess’ power to make my links more user friendly. I find the default installation of xampp a bit of lacking it. Thought it’s only because I do have with me the lite version of it (xampplite). But I have with me a full installed xampp better yet check it. Nothing.

So I did a little poking into configuration file of apache that came bundled with it. This is what I found out. By default mod_rewrite module is not enabled by default so I took the following steps.

To enable mod_rewrite in xampp first go to the directory of installation <xampp-directory>\apache\conf  and edit httpd.conf. Find the line which contains
#LoadModule rewrite_module modules/mod_rewrite.so
uncomment this(should be):

LoadModule rewrite_module modules/mod_rewrite.so

Also find AllowOverride None 

Should be:

AllowOverride All

I really think it appears 2 or 3 times on the configuration file.

Happy xampping!

18 2006f August, 2006

xampp: using hosts files in windows to map your local server

Filed under: php, xampp — rudyegenias @ 6:44 am

I have been using XAMPPlite for windows to create PHP applications and I have come to this idea that I wish I could just create some http://www.domain.com/ to call my server on the same PC.

The idea is simple. Hosts files are used by windows os to map their addresses. Also it is being used to compromise attacks on some spywares specifically the advertisement spams that one of us might be seeing.

Locations of hosts file.

Operating System

Location on Hard Drive

Linux/Unix /etc/hosts
Windows 3.1/95/98/ME c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts or c:\windows\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
Netware SYS:ETC/HOSTS
Apple System Folder:Preferences and in the System Folder itself

***source: http://www.bleepingcomputer.com/tutorials/tutorial51.html

My hosts file as of the moment:

# Copyright (c) 1993-1999 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

What I basically need is to remap http://www.domain.com to connect to my XAMPP server on the localhost computer. Adding this line

127.0.0.1 www.domain.com

Voila. Just start xampp and it’s good to go.

Screenshot:

Xampp capturing a domain name that is mapped on the localhost
**** notes: I am now finding a way to make htaccess mod_rewrite to work on this setup.

Blog at WordPress.com.