Wisdom of MY Words

Random Musings & Book Reviews

18 January

IT Recruiters

I cannot stress enough how recruiters are the lowest forms of slug in the IT world. My husband is an IT worker and he is always grumbling about how badly he’s treated, yet he puts up with this bad behaviour from people. He responded by saying, “In other words, if I allow people like Randy in my life, I am continuing to tell people like Randy that they should disrespect me.” “Oh absolutely,” I responded.

Twenty (20) years ago in IT recruiters were either in Bangalore or here, there really was no in between, not in Minneapolis. Recruiters from other states have never been as successful as indigenous Minnesotans because they don’t understand the small-town provincial attitude in the 612. Everyone knows everyone. They don’t need background checks from shitty little curry munchers. Why don’t we need background checks? Because we check the local newspaper, jail roster, and ping our friends for name recognition. People don’t even wait when someone applies for a minimum wage counter job to see if their background check comes back dirty, they pull up the BCA and enter the applicant’s name. Boom. Done. But I’m off-topic now. If you went to the discount IT sites like Bid4Work or whatever other gross name that implies desperation. Or freelancer.com; while nicer still cloyingly stinks of, yes, you guessed it, desperation! The stink of these sites and the output of Russians eroded the hourly bill rate of disciplined, dedicated not desperate programmers. Programmers that like computers more than people.

Recruiters were created because IT workers are shy.

Jon hates IT. He’s disillusioned and he’s priced himself out of the market by being better than everyone else. (Damn him, but that’s why I love him. Arsehole is better than everyone else. Ha!)

I’ve been trying to prop up his self-confidence for years. His parents, I just can’t even say anything nice, so I’ll be quiet. Well, let’s just say he’s been to individual therapy and has discovered that his “family of origin” screwed him right proper.

I’ve been trying to distill years of book learning, plus my own stressful IT career and now lay investing and doing pretty well, into some bullet points that could help the DH, and I believe this is what I’ve been trying to impart for 22 years.

Have your own work and work for yourself.
A job is different with trade. You should have your own trade and Job.
You should do stuff what You like to do (as successful people).
The rich buy assets. The poor only have expenses. The middle class buys liabilities they think are assets. The poor and the middle class work for money. The rich have money work for them.

15 January

The Brain Tumour Trip

We’ve been dithering about Cornwall, Brighton, Northumberland, now to Edinburgh this summer. I’ve said I’d email him about the trip, but this is easiest so the friends abroad can access what our plans are as they firm up. We are scared I’ll die before we get there, but we are taking a Semper Fi attitude. I am driven forward by seeing the successes of my friends, the people I hold dear.

Sunny’s jewelry has taken off and she seems happy happy happy and she used to be a huge malcontent! Oi. Willie is selling stories and books and his GoodReads profile is filled with books and anthologies. Impressive what he’s done since I met him virtually in 2008. I’ve my own nose done busting with the photos and the ideas and everything but I honestly need an assistant and I have no idea where to search for one. Sigh. That’s for another post.

Wikipedia says, “Manchester is a major city in the northwest of England with a rich industrial heritage. The Castlefield conservation area’s 18th-century canal system recalls the city’s days as a textile powerhouse, and visitors can trace this history at the interactive Museum of Science & Industry. The revitalised Salford Quays dockyards now house the Daniel Libeskind-designed Imperial War Museum North and the Lowry cultural centre.”

I haven’t been in 30 years, everything has changed, yet stayed the same, as we talk about all the time my dear. The things we can do in Manchester include the National Football Museum UK, which since soccer I would love to do, just to feel the vibes of the place. That’s two (2) hours. Then you’ve this piece of architectural bliss, John Rylands Library at University of Manchester, which we’d love, it’s beautiful. Take a look! Absolutely The People’s History Museum UK. Gushing how fantastic that would be. Golly!

Albert Square. Zack will love it. So stunning. Like nothing you’ve seen in person before. Imperial War Museum North is a must for all of us. We all need to learn a few things on this trip of a LIFETIME! Huzzah! Manchester’s oldest Catholic Church, 1794, Manchester St. Mary’s is a must see too. So, Juan Carlo, what do you think is enough time-a-roni in Manchester?

This Museum of Science & industry UK would be on my list if we were in Manchester for several days, as well as Manchester Museum, and we could do that with John Rylands Library because they’re both on the University of Manchester campus. It’s a beautiful campus, so we should commit an entire afternoon to it.

We could go to Cambridge first. There is the Cambridge Botanic Gardens, which are brilliant. I loved them. I think it was built in the 1850s, but admittedly I have a horrific headache love, and you’ll have to make dinner, and there’s probably hella typos. Sorry! The Round Church is a must-see. Continuing on the church theme, there’s the Our Lady and our English Martyr’s, and King’s College Chapel, perfectly gorgeous, Dropping into the Museum of Archeology and Anthropology seems a good time. Of course The Bridge of Sighs, Jesus Green, which seriously, you will see and know that BBC has used it often, and we need to make sure out list includes School of Pythagoras. So, how long in Cambridge UK?

If we add The Fitzwilliam Museum, I’d say with going and looking at the buildings at Trinity and that should be five days in Cambridge? It’s an hour from King’s Cross to Cambridge.

06 January

Matt & Dena: Everything I Did Wrong

Hiring and firing employees isn’t just difficult, it is almost impossible. Peter made me believe that I could be friends with my interns. Chris Janda taught me the same thing before him. While Janda wandered off somewhere, and I wish him well, but he had an inner drummer that was calibrated differently than the rest of us, Peter was different. From the moment he stood tall and tree-like in my front door with his foppish blond hair and his horse teeth, he looked exactly like Scott. Peter is my crowning glory.

Hiiiyahhh, Janda screamed at the top of his lungs and do jump while extending a leg, in a Bruce Lee stance, scaring the hell out of Zack, focused on his Legos. I am laughing as I write this blog post because I’m thinking about my son, Zack. His yellow teeth he refused to brush, the hair he refused to cut, and the query of “WhatTheFuck” in his eyes, staring at Janda as he held. the. pose. For 15 seconds, no, 60, no, almost 180 seconds. Cool dude, but ugh, is what my bean counter brain was thinking.

02 January

American Honey Film

Jon hovers on Rotten Tomatoes, and other sites checking for films for me. When we were dating I was headed to Breckenridge to see my best friend Scott and then we were heading to San Francisco. I was gone for a month. Jon said he’d be bored without me he asked me for a list of films that I would recommend. He even asked for a list of books he should read. Atlas Shrugged was the ONLY one he read, and finished.

Just like myself, after I read Atlas Shrugged, recommended by my mentor Jeff Earl, Juan wanted to change the world. Ohmygosh, it was what I always thought the right combination of intelligence and passion would look like. It was amazing. It was when I truly feel in love with him and agreed to love my husband.

That’s a lot of pressure for someone. It was a critical problem since my choices had to be:

  • Worth his time
  • Make an impact
  • Good cinematography
  • Good plot
  • Steady as a preacher
    Free as a weed
    Can’t wait to get going
    So when the sin
    Pure and Sweet
    American Honey
    There’s a wild wild whisper blowing in the wind

Side tracked I see, which means I need to finish this post. Go see American Honey. It was a good film, but oh so hard to watch for this exStripper.

18 December

Loft Antiques

Yesterday was a rough day. After an older woman, easily 60s with angry grey hair and a permanent scowl embedded in her pasty flesh, told me “Sure hope you don’t have a horrible accident outside.” As anyone that knows me knows I am the least passive aggressive person in Minneapolis. I am also a nice person. Now, I was always nice, but I became much nicer after that whole terminal cancer diagnosis. As I’ve written on Facebook, most of the time I’m shocked to wake up next to Jon every morning. I’m shocked to smell things. To feel my knees. To cream my face. And to run my hands over my absolutely ADORABLE Barbie body! Cute boobs and a thin waist. I’m hot. I mean, I don’t even know who I am when I look in the mirror because I am stunning. I don’t look like the Prussian by way of Stonehenge beet that I am.

At the corner of 50th and Xerxes, where you’d turn to head to Southwest, is an antique store that’s been there forever. I shopped there when Geoff and I first moved to the #southside which was actually Franklin and Lyndale. Some Googling produced this nice article, which seems accurate, except that the owners have never been nice. Loft Antiques SWJournal Article So, our brutal blonde that wished a stranger ill-will must have a story behind it.

Ahem. Here is the series of events…

I’ve a bag with me that has my wallet and car keys in it. I have my left arm snaked around my new thin chest and it’s holding the bag tight against my body, just as I’d hold it on the El, or as I check out the people on the train out of the Gare du Nord, or Euston Station. However, I am wearing a two thousand dollar German boiled wool coat with a foxy fur collar. This coat is well made, and makes me look like a member of the Russian Army. I’m wearing custom ordered fur lined Sorel’s, and a grey cashmere hat. Whatever the cost of this dish, if you look at me through my $400 purple glasses along with my white girl weave you’d have to be a moron to not know I’m good for it.

My bulbous iPhone in it’s case, along with leather lined gloves are in my coat pocket. My damn phone hits a white glass dish that was on the edge of a table. I was in a bit of a fugue state when it fell as I was looking at something and deep in thought. I’m looking for gorgeous one-of-a-kind containers of at least one gallon to make pea and I a batch of homemade laundry detergent. Prodigal Son used to call us both “tree huggers,” as if we were offended by that pejorative.

The other reason I go to antique stores is to remember. I smell Nana Wolski, and Aunt Hattie, Nana Davis, Aunt Marg, Aunt Dorothy, and more. I go to these stores to remember and to mourn. A cursory walk through an antique store usually generates income for them, and a profitable writing session for me. I never saw the dish, but I heard it break. I was mid-realizing that it was my phone and not my bag that created the mess when I felt an angry uncomfortable shift in the air. I turned around because I could feel it, like heat felt from a great distance.

Behind me 15 paces was a short angry-looking woman. Her mouth curled in disgust and the vibe in the room goes from, “Oh man, that’s broken, now we have to pay for it, geez I hope it wasn’t part of a set.” to an angry Stalin “Don’t even think about moving out of this space until I have castigated you.” vibe. Jon felt it too. I turn and say, “I broke this dish. I’m sorry. I will pay for it.”

I am waiting for acknowledgement and in the silence I count. Jon and I fight about my counting. I do it to him. After chemo I can’t distinguish time. I don’t know what is a long time or a short time any more. Although I realized yesterday that it’s also some residual trauma stuff, but regardless, I counted as my judge stood blocking the door for 32 seconds. She said, “It was your bag. Those bags cause all sorts of problems,” laconically. I said nothing, she said nothing, staunchly blocking the exit. The silence shamed me. My apology wasn’t accepted. My money wasn’t good enough for her. I was hurt. Stunned. Pained. I felt trapped. I grew overly paranoid that maybe this dish was actually some $2000 heirloom that I broke with my coat. As I said thirty two thousand in my head she spoke again in a measured tone, not angry, but cold, my nose was starting to freeze from the shade she was throwing. “It’s your bag.” No acknowledgement of the apology or the offer of payment.


It was a two-second stand-off before I bent down and looked at the price tag, scoffing, saying, “Honestly, Jon, it’s eight bucks,” and I chortle because I’ve realized that it wasn’t a bazillion dollars. I’m in an antique store because I have money issues. Hello.

I’m no longer feeling contrite or generous. I’m no longer feeling Nana Wolski and her love, and I lash out, because this is the millionth person in two weeks to treat me like absolute shite, starting with the fucking bitch of a server at Tullibee last week-end. I wave my arm at the woman, looking at Jon, “This is exactly why I can hardly wait to move to Denver. She’s the typical Minnesotan, she can’t accept an apology because she wants my pound of flesh,” as I walked towards her, my 5’9″ 150# frame, I’m sure, seemingly threatening, coming towards her blocking the door and she moved out of the way. I started up the steps grasping the railing because my Knee Replacement is giving some problems with pain.

She says, “I sure hope you don’t have a horrible accident outside.”

Jon, jonny jon jon, who never ever ever says anything rude to people said, “Hey, fuck you.”

When I asked him about it this morning, he said “Nobody is going to talk to my wife like that. Who does she think she is, after the fracture and you immobile in a wheelchair with that brace on for three months, and all that after cancer,” he wailed. And that’s the whole problem.

I may look like this healthy, certainly not 52 year old, woman who is gorgeous, and thin, with a cute bod and expensive outer wear; but really I am one step away from metastasized cancer. I’m mere stress and ill thoughts away from death. Now I just feel sad. We left the store after she said that, and I now I have to go back and drop off the $8 for the bowl/plate, whatever, because it’s the right thing to do. But like hell I’m going back without putting this out on the web. So, in the event this woman’s sentiment that she wishes me more horrors than I’ve already experienced happens and I end up in traction or worse, you’ll know why.

This song man, perfect for this blog post. Back Stabbers

I’m going to end this blog post on a positive note. Tonight we are having Kate and Zack eat with us and I’m making a Porketta from Duluth. First time for porketta, let alone a porketta from Duluth. It’s super liberating to not have many cans of anything, and can buy your meat drop shipped from a Smokehouse in Duluth, well, life is good, regardless of what happened yesterday. So, as we are off to The Galleria to get gifties for people, I leave you with a happy, optimistic song: Fleetwood Mac Makes You Smile

17 December

Choosing Dykedom

If someone was always telling me what I said a decade ago, or two, or hell, when I was barely cognizant of the absolute crockery that came out of my over-educated, white privileged mouth, in the media, well, it would make me mad. As in cows and dogs get mad, people only get angry. I’d get all dog-frothy at the mouth mad about Trump and his stupid mouth. This is one thing I understand about this fucktard Scottish Germanic scum, his mouth. You know why? Because I’m a bastard of Welshian Prussianess and hell if I know what else. I understand his drive to be better than his father, or his mother, and that has driven him to the White House.

Donald Trump is leader of the free world.
Pigs fly.
If A + B = no never mind, I’m getting all philosophical now. I’m missing my son Simon. I’m missing having these bizarre talks with him. No one else can be him., He is uniquely him. That’s what started this article. Realizing that when my mother says, “You can’t be krautgrrl. You’re more Polish than I am, and you’re not gay!” She really means I am angry that YOU get to redefine yourself and I do not.

She forgets that she had her chance to redefine herself, out of the single mother paradigm and I realize she chose dykedom. My mother is angry with me because I have ‘more or less’ had the breeder working mother life that she did not, yet desired.

I wouldn’t change anything about my life. Now.

Back in the day I would have killed for Jesus to reach down and SAVE ME. That didn’t happen and so here I am.

12 December

Tullibee is Not the Bee’s Knees

Saving the Tullibee Narrowly defined, Tullibee aka Coregonus Artedi is known variously with the common names Cisco, Northern Cisco, Lake Herring, and Chub. It is a pelagic fish that can be found in the middle of cold water lakes in North America. In the northern and western parts of its range it is also found in large rivers. Diet is the tasty and nutritious zooplankton and insect larvae. Small fish, including some minnow species, are also known to be consumed at times.
Northern cisco are hunted by predatory villagers that love to eat them. Rainbow Trout, Lake Trout, Walleye, Yellow Perch, Northern Pike, Burbot, thinks they are very tasty, as they are huge part of the other fishies diet.

12 December
22 November

PHP/MySQL Chapter Two

Developing Locally
Developing your construct on your local computer is the recommended way to learn since you can interact with all of the components on your own machine and not risk causing problems on a production server. That way, if there are problems in the local environment you can fix the snafu’s immediately without having them exposed to your site’s visitors. Advantages to working with your files locally means that you don’t have to FTP them to a server, you don’t have to be connected to the Internet, and you know exactly what’s installed since you did it yourself.

There are three components of installation:

The bullets indicate the order in which you will install the programs. All our examples will be from a PC install perspective with liner notes on Macintosh installation.

Installing Apache
First Apache needs to be installed and operational before PHP and MySQL can be installed or else they won’t work correctly. Plus, there wouldn’t be any use for the coding application ad database without the Apache web server. A web server delivers web pages, has an IP address and possibly a domain name. For example, if you enter http://www.oreilly.com/ in your browser, this sends a request to the server whose domain name is oreilly.com. The server fetches the page named index.html and sends it to your browser.

Any computer can be turned into a Web server by installing server software and connecting the machine to the Internet, which is why we need to install Apache. All our installation examples are done on a Windows-based PC.
1. Download the Apache 2.0.5 Win32 Binary. The file is downloadable from http://httpd.apache.or/download.cgi and the file that you save to your desktop is apache2_0.55-win32-x86-no_ssl.msi.
If you are on Mac OS X, you already have Apache installed. Open up System Preferences, select the Sharing panel and click to activate Personal Web Sharing (which is actually Apache). Mac OS X 10.2, 10.3, and 10.4 all come with different versions of Apache, but each works perfectly fine.

Figure 2-1. The Installation Wizard prompts you for basic configuration
2. Install Apache using the Installation Wizard. Double click the MSI installer file on your desktop.
The Installation Wizard walks you through the installation process.

Figure 2-2. Apache License Terms and Conditions for Use
3. Accept the License Terms by clicking the radio button. Click Next>.

Figure 2-3. Apache HTTP Server information
4. Click Next >. Additionally, this window offers a number of excellent resources related to the web server.

Figure 2-4. Black Server Information dialog box
5. In the blank dialog box enter all pertinent network information, a sample is provided below. Then click Next >.

Figure 2-5. Sample Server Information
Port 80 is the default HTTP port. In other words, when you request http://www.oreilly.com, you’re implicitly requesting port 80. By accepting this port, your web requests can be made without specifying a non-default port.

Figure 2-6. Selecting a Setup Type
6. Select the Setup Type. Click Next >. The typical install will work for our purposes.

Figure 2-7. Destination Folder dialog box for the Apache installation files
7. Accept the default installation directory. Click Next >.
The default installation directory, C:\Program Files\Apache Group\, is both standard and easy to find especially when you need to make changes to your configuration.

Figure 2-8. Ready to Install dialog box
8. Click Install. The installer installs a variety of modules, you will see some DOS windows appear and disappear. Click Finish when the installer is done.
9. Test your installation by entering http://localhost/ in your browser’s location field. The local host is IP address

Figure 2-9. Apache’s default index page after installation
10. After entering the URL in your browser, the default Apache page displays, which is similar to Figure 2-9. Notice the circled part of the window where it indicates that the installation was successful.
Now that you can serve up web pages, you’re ready to add PHP.

Installing PHP
Go to http://www.php.net/downloads.php to download the latest version of PHP, both binaries and source code can be found on this website. You need to download the zip file versus the Windows installer because the Windows installer only configures the IIS web server.
Create a directory for PHP on your desktop. You don’t need all the files provided in the archive, so unzip the PHP archive into another temporary location.

A temporary location could be on your desktop, which will be easier to find when you go looking for the files.
1. Copy the following files into C:\php: php.exe, php4ts.dll and php2apache2.dll. The php2apache2.dll file is located in the sapi directory.
Use php2apache.dll instead of php2apache2.dll if you are using Apache 1.3.x.
2. Load PHP extensions. If you plan to load PHP extensions, you will need to copy the files in the extensions directory, or the ext directory for PHP 5.x, to C:\php. Or a sub-folder in C:\php, any subfolder as long as the PHP.ini file is updated to reflect the appropriate directory.
MySQL support is now integrated into PHP and doesn’t need an extension dll. However, PHP 5 supports MySQL as a separate module for download. Follow the instructions below to make sure that your installation of PHP works before you start experimenting with installing extensions.
3. Configuring PHP
Copy php.ini-dist from the extracted files into your Windows directory, typically C:\winnt or C:\Windows and rename it to be php.ini.
4. Setup PHP to load Apache as a module. To configure Apache to load PHP as a module to parse your PHP scripts, use a text editor to open the Apache configuration file, httpd.conf, typically found in C:\Program Files\Apache Group\Apache2\conf\.

Figure 2-10. Viewing httpd.conf in Notepad
5. Loading PHP as an Apache module. Open the httpd.conf file in Notepad or another text editor and search for the section that has a series of commented out LoadModule statements. You can find this around line 134. In Notepad >Edit > Go To…> 134.
Statements prefixed by the hash “#” sign in HTML and PHP are considered commented out and can only be seen by you, never your end user in their browser window.

Figure 2-11. Notepad httpd.conf file with the LoadModule section highlighted
6. Restart the Apache server by selecting Start Menu | Apache HTTP Server 2.0.x | Control Apache Server | Restart, so that it can read the new configuration directives you placed into httpd.conf. Alternatively, in the system tray, double click on the Apache icon and click the Restart button.

Figure 2-12. Notepad httpd.conf file with the AddType section highlighted
7. Search for AddType in the file, around line 754, and add the following line after the last AddType statement: AddType application/x-httpd-php .php
Testing Your PHP Installation
1. Create a PHP file, in any text editor, with the following line:
2. Save the file as phpinfo.php and save it under the Apache htdocs directory, usually C:\Program Files\Apache Group\Apache2\htdocs.
3. Open your browser of choice.
Access the file you just created by typing localhost/phpinfo.php into your browser’s location bar. You should see a page of information about your PHP setup like Figure 2-13.

Figure 2-13. PHP Introduction screen
If for some reason it doesn’t work, check to see whether your PHP or Apache setup is causing the problem by the command line prompt: C:\php, then type in php “C:\Program Files\Apache Group\Apache2\htdocs\phpinfo.php”, since the file isn’t in the c:\php directory.
If invoking PHP from the command line causes a large HTML file with all the PHP configuration information displayed, then your PHP set up is fine. The problem is probably your Apache configuration, go ahead and re-read the procedure on how to install and configure Apache.

Enabling PHP on Mac OS X
If you are on Mac OS X you have PHP pre-installed on your computer. You need to edit the Apache configuration file to enable PHP in much the same way you edited the PC text file.

Installing MySQL 4.1
Rounding out the last component that allows you to develop and test pages on your local computer is MySQL. Now download the MySQL Installer.
1. Download the MySQL binaries.
Both the binaries and the source code can be found at http://dev.mysql.com/downloads/. The link takes you to a page where you can enter personal info, or just click No Thanks to download the file. A number of download locations (or mirrors) are available, select one. Download the recommended version for the Windows Essentials (x86) MySQL 4.1 installer. Save the installer file to your desktop.
2. Installing MySQL using the Installation Wizard

Figure 2-14. The Installation Wizard prompts you for configuration settings
Double click the MSI installer file on your desktop. A setup wizard walks you through the installation process. If, perchance you’re installing MySQL 5.0 the install process is the same as it is for MySQL 4.1.
3. The Installation Wizard displays. Click Next >.

Figure 2-15. Select a setup type
4. Select Typical Installation by clicking the Typical radio button, then click Next >.

Figure 2-16. Confirm Installation Folder
5. Click Install on the Ready to Install the Program dialog box.

Figure 2-17. The MySQL.com account provides newsletters and bug reporting resources
6. Select Skip Sign-Up and click Next >. You can optionally sign up for an account, it provides access to a monthly newsletter as well as the ability to post bugs and comments on the online forums.

Figure 2-18. Configure the MySQL server
7. Select the Configure the MySQL Server now check box, then click Finish >.

Figure 2-19. The Configuration Wizard customizes the database settings
8. On the MySQL Server Instance Configuration Wizard click Click Next >.

Figure 2-20. Chose the level of detail dialog box
9. Select the Standard Configuration radio button from Figure 2-20. Click Next >.

Figure 2-21. How to Launch MySQL window
10. Check both Install As Window Service and Launch the MySQL Server automatically check boxes selected. Click Next >.

Figure 2-22. Security settings for the database window
11. Enter a password for the root user in the password and confirm fields. Click Next >. You do not need the Anonymous Account since you can do everything with named accounts

Figure 2-23. Commit the configuration settings window
12. Click Execute as shown in Figure 2-23.

Figure 2-24. Figure Caption Text Goes Here
13. Click Finish so that MySQL is now configured and running on your computer.
All critical components: Apache, PHP 5.0 and MySQL 4.1 are installed. The wizard will inform you of basic problem during installation like running out of free disk space or not having proper permissions on your system to install MySQL.
Working Remotely
Although we recommend you start out working locally you can use an ISP account as long as it supports PHP and MySQL.
You’ll need login information to the remote server and you may need to use your ISP’s web-based tool to create your database.
In order to transfer your files and directories you’ll need to activate a File Transfer Protocol (FTP) account at your ISP, usually through your account control panel. Once you have an FTP login you upload your HTML and PHP files using a FTP client.
While your computer likely has the command line version of the FTP client available from the command prompt it can be cryptic to use. Graphical FTP clients make using FTP much easier. FTP Voyager, available from http://sourceforge.net/projects/filezilla/ is one FTP client you can use to upload files to your ISP. Your initial login screen will look similar to Figure 2-25. Fetch is a good FTP program for the Macintosh.

Figure 2-25. FTP Voyager initial screen
After connecting you’ll see a dialog similar to Figure 2-26, but you will not see the identical screen as this FTP Voyager screen. You can drag and drop the .php file you created. Remember, in order for your PHP file to run you need to save it with an extension of .php instead of .html, otherwise it won’t run, because the web server needs to know it’s a PHP file in order to run the PHP interpreter.

Figure 2-26. FTP Voyager directory listing
PHP files must be accessed through a web server since your web browser doesn’t have the ability to interpret the PHP code. A PHP interpreter is used to process the PHP files.
You’re ready to rock and roll and start learning all about basic facts, integration and how to get your dynamic web page up and running as quickly and smoothly as possible. In the next chapter we’ll give you basic information about PHP and simple coding principles that apply to using PHP.

21 November

PHP/MySQL Preface

Learning PHP & mySQL
By Michele E Davis and Jon A Phillips

For many users they become comfortable with creating their own static web sites either coding the HTML directly or using a web development tool such as Dreamweaver. The next step is usually making your pages come alive by customizing their appearance per visitor and remember visitor details.

The combination of PHP, Apache, and MySQL pose many advantages to users that are new to building dynamic pages. They are all free open source products. Additionally, there’s an enormous amount of code freely available on the Internet already for PHP and MySQL. If you can think it up there’s a good chance someone has already done it and you can leverage their knowledge. Nobody likes reinventing the wheel.

Our goal is to help you learn the ins and outs of PHP and MySQL and save you some of the “Why doesn’t that work?” moments that we’ve already been through. PHP and MySQL both continue to evolve based on feedback from the community. Most of the time this involves adding new features but sometimes it also means reacting to common pitfalls from real words feedback. For example, the usage of global variables has been restricted to reduce common security lapses. While this eliminates a common security hole it also broke a substantial amount of code available on the web. We’ll show you what to look for and how to fix this problem without pulling out your hair.
Who should read this book

This book is for graphic designers, English and History college majors who find themselves in an IT firm creating static web sites and need to move forward with coding and database drive web sites. Or people involved in a small startup who easily know flash development and HTML markup but need to expand their repertoire of skills to database and open source coding dynamic coding environments.

Who should not read this book
If you’re not interested in using a database with your dynamic web sites than this book isn’t the best choice for you. If you already now how to create pages using MySQL and PHP than you’d also be better of with a book that is more a reference than a learning book such as the nutshell series. If you’re not familiar with HTML markup you should learn that first since you’re using PHP to generate HTML output.

Organization of this book
This book starts out with an overview of how all of the pieces we’ll be working with fit together. Because there are multiple languages and technologies that interact to form the dynamic web pages it’s best to start with a solid foundation of how the pieces work together. The PHP that you’ll learn works as a sort of glue or duct-tape to hold all the pieces together.

Next we’ll walk through installing the core software packages on your local computer. These include the Apache web server. The PHP interpreter works with the web server when processing dynamic content. Finally, we’ll install the MySQL database. Installation is covered on the PC, Mac, and Linux systems. You can also use a hosted ISP account to develop your pages if you don’t want to install everything locally.
Since PHP plays an important role in pulling everything together we take the time to explain the basics of working with the PHP language. This includes language essentials such as data types, program flow logic, and variables. Functions, arrays, and forms each get their own chapter to fully explore them.
Since you may be new to database in general we ease into MySQL by first explaining concepts that apply to designing and using any relation database. Then we give specific examples of using MySQL to interact with your data. Once you can get data in and out of the database you’ll need to work with PHP to integrate that data into your dynamic content.

Security and access control to your web pages each get their own chapter. While security may sounds like a dull subject it is still a huge issue if you store any information that’s private on your web page. There are several common security pitfalls that we’ll guide you around.
Finally, we close with sample applications that demonstrate how the technologies work together to rapidly build workable, fast, web sites. You’ll also learn where to look for additional information on the topics covered in the book.

Supporting Books
Even if you feel you are ready for this book, you may want to explore some of the XML technologies in greater depth than is possible here. The following lists offer some good places to start.
Tony Steidler-Dennison, Run Your Own Web Server Using Linux & Apache (SitePoint, 2005.)
Paul Hudson, PHP in a Nutshell, First Edition. (O’Reilly & Associates, 2005.)
Russell Dyer, MySQL in a Nutshell, First Edition. (O’Reilly & Associates, 2005.)
CSS Cookbook, Christopher Schmitt, First Edition. (O’Reilly & Associates, 2004.)
There are also several good resources for dynamic web development including onlamp.com, part of the O’Reilly Network. LAMP stands for Linux, Apache, MySQL, PHP. LAMP is the defacto standard for serving dynamic web pages.

Conventions Used in this Book
The following font conventions are used in this book:
Italic is used for:
• Pathnames, filenames, and program names
• Internet addresses, such as domain names and URLs
• New items where they are defined
Constant Width is used for:
• Command lines and options that should be typed verbatim
• Names and keywords in programs, including method names, variable names, and class names
• XML element tags
Constant-Width Bold is used for emphasis in program code lines.
Constant-Width Italic is used to indicate replaceable arguments within program code.

How to Contact Us
We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made a few mistakes!) Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:
O’Reilly & Associates, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
1-800-998-9938 (in the U.S. or Canada)
1-707-829-0515 (international/local)
1-707-829-0104 (fax)
You can also send us messages electronically. To be put on the mailing list or request a catalog, send email to:
To ask technical questions or comment on the book, send email to:
We have a web site for the book, where we’ll list examples, errata, and any plans for future editions. You can access this page at:
Note to production: we need to verify that this is the correct URL for the book.
[what’s the URL for our book]
For more information abut this book and others, see the O’Reilly web site:
First we’d like to thank our wonderful agent, Matt Wagner of Fresh Books for bringing such a fabulous opportunity to the table for us. The opportunity to write for O’Reilly & Associates was a great honor, as technologists, our bookcase was already well populated with a lot of animals from the Nutshell series.
Thanks to our O’Reilly developmental editors, Brett McLaughlin and Simon St. Laurent. This book wouldn’t be what it is without both of their help working with us. Secondly, profuse thanks to our technical editors; especially Jereme Allen and Christopher Finke who we met through our local Minneapolis/St. Paul PHP community: http://www.tcphp.org. Technical edit thanks also go to our last technical editor, Patrick Krekelberg.