Posts Tagged ‘wamp’

Site Revamp Details

Tuesday, August 19th, 2008

Here is a screen shot of the old site.  It served me well for the two years or so that I had it running on blogger.com.  The great thing about blogging is that I can save bits of important information in one place that I can later come back and utilize. The secondary benefit is that other people can also gain something from my writings as well.

Now that I’ve taken the plunge to into the world of incorporation, I have had a strong desire to improve my web presence.  My first project being this website revamp.

Here is a list of the steps necessary to get from blogger to a custom wordpress blog:
- Install wordpress on my computer’s local server (WAMP).  This is quite easy if you have messed around with developing websites before.  The major steps to that are 1. create a database (wamp has phpMyAdmin preinstalled, so doing SQL stuff is easy) 2. create a new SQL user that has permissions on the new database.  Once the database is setup, extract the wordpress install files to the WWW directory of your server (or wwwroot for IIS).
- Once the wordpress files are in there, I decided to do a special step.  Open my Windows HOSTS file and add two lines:

127.0.0.1       thewayofcoding.com
127.0.0.1       www.thewayofcoding.com

What this does is make my computer think that localhost (127.0.0.1) is actually the IP address of thewayofcoding.com.  This allows me to leave my current blog alone while I work on the new one, setup all aspects of the new site as it will exactly be (any full path links can be tested locally), and just generally makes things a lot simpler.  One thing I noticed is that I had to open a console window and type ipconfig/flushdns to get the changes to register.  The other option would be to restart the computer, but the command is much faster/easier.

Ok, so now at that point I pointed Firefox to “thewayofcoding.com” and went through the directions available to install wordpress, it said to create a configuration file before it could continue.  So you need to create/edit one code file wp-config.php by adding the database information and change a few other lines.

After that, it is a simple install.

Then I spend a few weeks modifying the wordpress code as I needed.  The primary amount of work was in creating my own visual look for the site.  Seeing as I wanted to really improve the layout of the site, I did quite a bit of research on CSS layout methods.  Matthew James Taylor had some of the best layouts I could find with clean code, so I based this layout off of two of them.  As you can notice, the two side panels of this site are fixed to the window size.  The middle panels will scale with the computer’s screen resolution.  So at resolutions around 1600+ width, the site looks pretty nice by using that added space.

From there I searched out a number of interesting plugins and set them up.  I didn’t find anything too exciting, but a few like the poll system are useful.

Lastly I setup and installed some forum software in a sub directory of the site.

All that being said, it took quite a bit of time to setup.  Of course to actually write something from scratch of this quality level would take me a long time.  I’m pretty happy with the result so far.  I still have quite a few more things I want to do with it, so look for updates in the near future!

Here is a picture of the current site for history’s sake:

Getting a Symfony development enviroment running on windows

Thursday, January 11th, 2007

Nothing is ever easy… Anyways, to get a computer ready to start developing with the Symfony PHP framework you have a few options. You can take the long, long route and install apache, php, and a database server. With that you have to do a good deal of configuration to get everything working together. You could also download WAMP or XAMPP, which are just prepackaged versions. I haven’t used XAMPP, so I can’t say how you would get that working.

The best reason for using WAMP is that it is self contained in c:\wamp folder by default. You can also start and stop all of the server processes (Apache & MySQL) anytime by just closing the tray icon. It’s great so you don’t have unnecessary processes running all of the time.

The main problem is that WAMP and Symfony don’t work “out of the box.” No surprise there.

This is the process I used to get WAMP working with Symfony:
Download WAMP (1.6.6) and install:
http://www.wampserver.com/en/

Open a browser to http://localhost/
WAMP should display it’s default webpage with links to phpmyadmin and etc.
If you are going to use MySQL it might be a good idea to change its root account to have a password. You can use phpmyadmin to do that, just click the link to it on the WAMP localhost page.

There will be a problem once you change the password. Phpmyadmin won’t be able to reconnect to MySQL until you edit this file:
C:\wamp\phpmyadmin\config.inc.php:
Search for this line below in the file and put your password between the ”:
$cfg['Servers'][$i]['password'] = ”;

Extract the Symfony Sandbox to c:\wamp\www for testing later:
http://www.symfony-project.com/get/sf_sandbox.tgz
If that link doesn’t work, just go to http://www.symfony-project.com/ and checkout the download page.

Read this tutorial for some needed info:
http://www.symfony-project.com/trac/wiki/SymfonyOnWAMP

It basically said to:
Open c:\wamp\Apache2\bin\php.ini
Search for and remove the comment symbol ‘;’, change ‘On’ to ‘Off’, or just edit the lines to be the same as these below.
extension=php_xsl.dll
magic_quotes_gpc = Off
register_globals = Off
include_path = “.;c:\php\includes;c:\wamp\php\pear”

The magic_quotes_gpc and register_globals parts were not in the tutorial, but WERE NECESSARY for me to change. I was getting a 500 internal server error before I set those values to Off.

Install PEAR for PHP (taken from that Wiki article directly):
1. Start -> Run -> cmd
2. Cd into the PHP directory (e.g. C:\wamp\php)
3. Invoke go-pear.bat. Follow through the options (default should work fine).
If you have a problem when running the bat file like “Warning: Cannot use a scalar value as an array,” in php 5.2.0 the file was broken for windows. You can check out this website for more info. You can just download the new version of the file from svn here.

Open C:\wamp\Apache2\conf
Remove the comment character ‘#’ from this line:
LoadModule rewrite_module modules/mod_rewrite.so

Point a browser to http://localhost/sf_sandbox/web/
You should get a page that says something like:
Congratulations!
If you see this page, it means that the creation of your symfony project on this system was successful….

A few more notes to get the Symfony sandbox example working:
http://www.symfony-project.com/tutorial/my_first_project.html
Edit symfony.bat in the sf_sandbox folder that you extracted to c:\wamp\www
Change the line:
set PHP_COMMAND=php.exe
to
set PHP_COMMAND=c:\wamp\php\php.exe

I’m still having some problems with the example, but it is *kind of* working so far. I had to edit both php.ini files with all of the previous modifications.





 

 
Stock Photo Website
Tech Learning Site

Popular Article Tags

Recent Article Comments

Archives