Developers Diary

New Developer Notes, Day One

Basic Project Scope

I have decided my first product will be a web application that assists a webmaster with tracking their link building efforts and overall SEO reporting.  The PHP framework Symfony will create & update database records containing information about the links, then display the results in an authenticated web page.  The application will report page rankings of said websites to assist the webmaster in determining the viability of said links.  The application will also interface with the Google Analytics API to display some yet-to-be-defined web statistics.  Lastly, I will link the tables in the web database to a MS Access database on my windows desktop to even further automate reporting efforts.

Wamp

How many rabbit holes will this project lead me down?  And how will I know when it’s time to get out and move on?

I’ve always been a Windows girl, certified in the ’90’s. Decided it’s time to step it up and mimik my fellow developers by getting more friendly with the command line by choosing Symfony & Composer.

As soon as I tried to install Composer, it wanted the location of my php.exe file, which told me I needed to set up my own local testing environment.

I installed WAMP which worked, but I had a little trouble getting the virtual hosts to cooperate. The localhost was always the first one configured in the vhosts file. After much trial & error, the lessons learned:

  • Look at the Apache error log file, duh.
  • host file – uncomment 127.0.0.1 localhost, and also the line under it ::1 localhost;  this line is new in this Apache version. It deals with the IPV6 topic. Immediately under it add your own.
  • vhosts file – delete the example in the file, duh. There is no such animal; build your own animal.

Composer

Now that I successfully have some PHP, I loaded Composer and confirmed it at the command line. Not hard. I have a conceptual idea of what it does, and no clue how to use it. This is going to be a difficult learning curve.

Symphony

I attempted to load Symphony to my localhost using the cmd line. I successfully resolved the openssl problem by uncommenting that line in the php.ini file. Yet, I continued to receive error messages about vendor files not found during the installation.  I thought it was supposed to install the base code and I would use Composer to add the vendor files on the fly? So why is the installation looking for vendor files I have not even determined that my project needs yet?

I caved in and just manually copied the files to my localhost to get going.

The Symfony welcome page is the web/config.php file, and it warned me that I needed a PHP accelerator, namely APC (Alternative PHP Cache). Read real quick what it does: it caches PHP stuff so your app runs more smoothly by having the routines already queued. Now how do I get it?

PECL, PEAR, Composer

PECL is the recommended library to retrieve the APC accelerator. PEAR is the packaging & distribution system of said library.

Here is a rabbit hole I wish I didn’t go down.

I finally found go-pear file on the Internet, copied and executed it on my localhost. But wait, what did I just do?  Install another packaging delivery/maintenance type system?  Isn’t that what Composer is for? Can I delete PEAR?  How?

So if I am to use Composer, then what am I looking for?  Should I be using Composer to access the PECL, find APC (a PHP extension), download it, and require it to run with my app? Or am I downloading APC to just add the PHP extension to my local PHP environment, and at deployment I need to check with Bluehost that it is already in the hosting configuration? Is the accelerator already a standard part of shared hosting? Am I even making any sense to anyone?

Upgrade PHP?

My version 5.4 I thought was the latest, but upon reading that if I go with 5.5 that the accelerator is already included by default?  Is this true? Is it a stable enough release to proceed?