Tuesday, November 20, 2012

Zend, Zend, What Have you Done Now?

To paraphrase the Sam Jaffe character from the Flintstones send-up of Ben Casey, (Ben Caserock?), "Zend, Zend, What have you done now, Zend?
Yet another installation that the designing company imagines is a snap to get done. I decided I wanted to play with the Zend framework, because I like to torture myself. I decided against the all inclusive Zend Server, as I didn't need any more PHP installations, and looked to add ZF2 to my WAMP server instead. I placed the framework directories inside WAMP and created another directory to be my Zend playground.
I then did the recommended Composer thingee to get the sample skeleton project installed, but the official instructions didn't exactly go according to plan. Instead of running `php composer.phar self-update`, followed by `php composer.phar install` in the DOS prompt window, I first ran `composer self-update` as per someone's suggestion, but not entirely per their suggestion.
The suggestion had added that I should remove the .PHAR from the file name. Instead, what I really did was run the composer.bat file instead of the PHAR file. I then had to copy the composer.json file to my root C directory. The sum total of the json file is:
    "require": {
        "monolog/monolog": "1.2.*"
Just make it in notepad. Then I ran `composer install` from the C prompt and got the skeletons out of their closet. That was not the end, however. Some virtual hosting had to be done.
Made all my preferred playground directory localhost aliases in Windows hosts file, created a playgrounddirectory.com.conf file in WAMP's vhosts directory, added the requisite <Directory> and <VirtualHost> groups to Apache's httpd-vhosts.conf file.
But still, the WAMPstones characters personalities are mixed up. One more little detail still needed to be attended to.
Had to add to Apache's httpd.conf file, the line `SetEnv ZF2_PATH "c:/wamp/ZendFramework203/library"`, the location where I chose to store Zend.(Zend came by default as `ZendFramework-2.0.3`, but I'm prejudiced against hyphens and periods)
I could have just called it `library`, or `stupid`, or anything, I suppose. As long as the Zend subdirectory within library could be found. Zend Caserock has finally returned all the WAMPstones personalities back to their proper characters.

Wednesday, October 17, 2012

Port 80 - The Friday the 13th of Web Server Issues

To paraphrase the late Ronald Reagan, after installing WebMatrix 2, "There you go again!"
Of course no sooner was WebMatrix 2 in use, I found my Wamp Server, which I now regret assigning to port 80, failing to start again. Apache couldn't open its logs.
The long and the short of this is:
1: The culprit was one that came back from the dead, Web Deployment Agent Service, resurrected by WebMatrix, which I needed for hosting MicroHard's IIS Express on my old creaky Windows XP system.
2: The solution (I hesitate to label it Final Solution, for both sensitivity and expectation issues), is to go into your registry.
3: First go into services from control panel/administrative tools, and stop that service.
4: Then go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  • Scroll down the long list to MsDepSvc
  • Choose Parameters, and open ListenUrl to modify.
  • By default, unless you custom installed from the get go, should be: http://+:80/MsDeployAgentService
  • Change the 80 to whatever port you want to fob theis service off to.
  • In my case, I chose 8080. New value: http://+:8080/MsDeployAgentService

5: Reboot.
Keep track of your server ports, if you're like me and have begun to collect web servers like coins. I gave 8081 to Bitnami, 8082 to SQL reporting services, etc.

Thursday, October 4, 2012

jQuery $.getJSON is NOT Jason from Friday the 13th

Although at times $.getJSON can certainly seem like a maniacal mass murderer to those not used to working with it.
Tips for the unwary and clues for the clueless.
When iterating through data returned by $.getJSON, make sure you know when to refer to the subscripts as numeric arrays as opposed to associative arrays.
EG: From a typical json file:

"customers": [
{ "id":1,"name":"John Doe" },
{ "id":2,"name":"Sand Wich" },
{ "id":3,"name":"Meanmissus Jones" },
{"id":4,"name":"Hung Lo"},
{"id":5,"name":"Cardin Naal"}
"magazines": [
{ "id":1,"name":"Field and Wild","rate":29.99 },
{ "id":2,"name":"Car and Driven","rate":34.95},
{ "id":3,"name":"Unpopular Scientists","rate":42.95 },
{"id":4,"name":"TV Lied","rate":19.99},
{"id":5,"name":"Readers Indigestion","rate":24.99}
{"1": [{"id":2,"startdate":"01/01/2012","enddate":"01/01/2013"},
"2": [{"id":1,"startdate":"01/01/2011","enddate":"01/01/2013"},
"3": [{"id":2,"startdate":"09/01/2011","enddate":"09/01/2012"},
"4": [
"5": [{"id":1,"startdate":"01/01/2011","enddate":"01/01/2013"},


Say you're in a for loop, using i as the iterator to run through subscriptions, and starting i at 1: data.subscriptions[i] does NOT equal data.subscriptions[1], as in the 2nd subscript of a numeric array. It equals data.subscriptions['1'], with '1' (variable i's value) being the key, and the 3 groups of subscription data following it as the value (itself a numeric array in this case). For magazines and customers, however, magazines[i] would equate to magazines[1], the 2nd subscript (Car and Driven). In iterating through subscriptions, we're first going through the associate array from keys 1 through 5. Each of those contains a numeric array. If i2 starts at 0 for going through that array and i still ='1': data2.subscriptions[i][i2].id refers to data2.subscriptions['1'][0].id, the first subscript under key '1', with a value of 2. data2.subscriptions['1'][1].id equals 4, data2.subscriptions['1'][2].startdate = "01/01/2011", etc, etc.

Tuesday, October 2, 2012

Not So Fast Wise Guys!

Well ho dee do, if good ole Flickr, or should I say Yahoo, didn't hit me with a 200 most recent uploads visible limit unless I upgrade to a paid account.
Well that sure as heck ain't about to happen, fellas!
I've got eons worth of storage for my stuff on Facebook. What do I need y'all for?
I'll keep what I put on y'all thus far, but I'm a po' folk right now and you can't have any of my assets, such as still exist.

Just Opened a Flickr Account for Streetlights Site

New Flickr page for Streetlights Site is at http://www.flickr.com/photos/streetlightsite/. What the heck. If they're giving me the space, why not use it?

Monday, September 24, 2012

Getting SQL Server 2008 R2 Installed The Hard Way

Had a woeful experience trying to get SQL Server 2008 R2 to install on my old XP Pro PC. Every single attempt failed on one component or another. Almost each fail was due to something else. I'd address one issue, another would kill the works. The biggest nut to crack seemed to be Reporting Services.
Finally, I stopped spinning my wheels as myself, and installed the beast logged in as Administrator.
You wouldn't think you're not the administrator of your own computer, but you're not.
Why this computer forced the issue is beyond me. I installed the free versions of these things before as myself.
You can't use reason, however, with an unreasonable PC; it's either the PC's way, or the highway. So finally, hands clasped in prayer, the Nth installation finished without a hitch, thanks to Administrator, whoever you are.
Windows XP doesn't make it very obvious either, how to log in as Administrator, but that's a subject for another blog.
Having learned this other lesson already, I made sure to tell the installer to leave Report Service configuration to me,  and made sure it did NOT try to steal port 80.

Sunday, September 16, 2012

Whoo Hoo! Something That Actually Works!

Flawless installment today of Bitnami RubyStack web servers on my old XP and Windows 7 PCs.
This after ripping what little hair Microsoft left me trying to get my WAMP Apache to treat Ruby scripts as web pages.
Never had any such software install and work out of the box so easily.
Accepted different ports than those used by Wamp and IIS without a hassle.
The only thing that wasn't intuitive to a Ruby Newbie was this:
For the browser to read your rb files as text, put them in Apache2/htdocs.
To read as web pages, Apache2/cgi-bin.
At least out of the box.
Get RubyStack at BitNami. It succeeded Instant Rails.
Like Wamp, it comes with PHP, Apache, etc. Also includes a few versioning programs like Subversion.
Ruby on Rails does not have to be tough as nails. I will not torture y'all with any more rhymes.
Someone tell the Spell Check used by Blogger.com that "versioning" is indeed a legitimate word at this point in time. I hate seeing red lines under legit new-age words.

Wednesday, September 12, 2012

Microsoft HTTPAPI/2.0 disabling Apache and Wamp Server

Ooh, I cannot stand Microsoft. They did it to me again. This time after installing an SQL Server service pack and going into the database. Microsoft HTTPAPI/2.0 ripped port 80 away from Wamp. Again I'm pulling my hair out trying to figure out why this happened. All the prior usual suspects were locked up: IIS, Web Deployment, Skype, etc.
Turned out this time it was SQL Server Reporting Services. Thankfully I came across Griffin.blog to find this out.

Monday, September 10, 2012

Where Were YOU When Godaddy Went Down?

Along with millions of others on earth, I was Godaddied today, Godaddied right up the butt! I was in the middle of testing the site on our Android device when it suddenly disappeared from existence.
how can such a major firm be so naked and unprepared for a hacker attack like this?
The CEO makes his mea culpa on their homepage, apparently the only thing right now that works. Of course the page's main feature remains poor Danica Patrick, their Nascar racing spokesperson.
That's right Scott Wagner, either let your poor customers forever identify Ms Patrick with their misery. Or were you hoping that seeing hwer image would somehow clam everyone down and hypnotize us all into not feeling royally ticked off?
Congratulations, Wagner, for adding "GODADDIED" to the English language verb collection.

Friday, September 7, 2012

Force iPad/iPhone and iEtcetera to reload pages

Found very useful information on Stack Overflow by South African BrutallDev.

I found absolutely NOTHING else in the whole internet universe to successfully fix the problem on iPads and other iOS devices, where web pages are not reloaded upon a person returning to them via the Safari browser back button. No acceptable solution anyway.

Like SQL Authority Pinal Dave, who's been The Man for years as the go-to guy for SQL issues, I nominate BrutalDev for that honor regarding browser back and forth.

 Just in case that Stack Overflow page ever disappears, or changes urls, Brutal's Javascript snippet is as follows:

if ((/iphone|ipod|ipad.*os 5/gi).test(navigator.appVersion)) {
  window.onpageshow = function(evt) {
    // If persisted then it is in the page cache, force a reload of the page.
    if (evt.persisted) {
      document.body.style.display = "none";

Stick it in script tags or a js file as you please.
I also added a blank onunload to the body tag as he suggested for older iOS.

Thursday, September 6, 2012

At least he did better than Hakeem Nicks

I figured Victor Cruz would be good for 20 fantasy football points. Only got 11.8 out of him Thursday. At least he did better than Hakeem Nicks. Going to be a tough one going into Sunday. That extra 8 point cushion I counted on could be critical. I need big numbers from my Matts, Ryan and Forte, if I'm to avoid being a door-Matt. And McFadden better not turn into McFootinjury. And the Eagles need to collect a few sacks. That's all I ask of them.

Streetlight Site Meadowbrook Parkway section done

Alright! Finally moving forward. My old Meadowbrook Parkway section, formerly on Geocities back in the very old days, has been resurrected.


Wednesday, September 5, 2012

Finally, Streetlight Site is ready for content!

I finally put what I hope are the finishing touches to the Streetlight Site infrastructure, with the first two story pages up and running in the Parkways section.
Assuming there are no unforeseen hiccoughs laying in wait for me, all I need to do now is database the content  and upload the images bit by bit from the old sites.

Wednesday, August 22, 2012

Wamp Server vs IIS 7 - The Sequel

Looks like I ain't done with the Great Satan Server IIS 7. Was a third component I just had to disable, after IIS7 returned and tried to evict Wamp from the PC.
control panel > Administrative Tools > Services.msc > World Wide Publishing service
Thank you to the one who posted this on  http://forums.iis.net/p/1150139/1872824.aspx
Am I going to go through this angina every time Microbrains does an update?
gave a compromise solution for letting IIS keep localhost and reassigning Wamp to localhost:8080 (set Apache to listen to 8080. Well, I don't care if IIS wants 8080. It can have it, but I need Wamp to keep port 80. Thankfully the perfect solution, for me anyway, was found at http://superuser.com/questions/72620/how-to-change-listening-port-on-webbserver-iis-7
I went into IIS's default website, thence to edit bindings and gave IIS the @#$%^& port 8080. Restarted WWPS and now both web servers work fine. Hopefully no further Microbrains update will screw it up again.

Monday, August 20, 2012

Hmm. This sounds familiar

Rosaura showed me this post someone made concerning their periodontal situation. Sounds awfully familiar to what I'm facing, or was told I'm facing.

Dead Tracks is a Done Deal

Got the new slider installed for the internal site links.
As it exists now, The Dead Tracks is pretty much a done deal, just awaiting fresh content, if I can dig it up from my, er, archives, wherever those archives might be buried.

Streetlights Facebook Page Has Launched

Jeff's Streetlights and Highways-Site on Facebook

Finally got this page going. So far, I've uploaded my old bridge photos. Will be uploading my old parkway content next.

New Streetlight Site under construction at: www.streetlightsite.com

Refurbished Dead Tracks website, still on Angelfire, but sans the awful banner ads, at :www.angelfire.com/ny5/deadtracks

Sunday, August 19, 2012

Rounding Image Corner the Hard Way

Finally got an epiphany after pulling my hair out trying to figure out why my Dead Tracks images' corners weren't rounding when my other sites' images were.
Was using the same @#$%^& code, the @#$%^&* CSS. GRRRRRRR!
Finally realized I had those images set for 3% padding elsewhere in the CSS.
Padding big NO-NO with border-radius. Border-radius no like padding!
Changed the @#$%^&* padding to margin and now everything is joyful in CSS land.

Wednesday, August 15, 2012

Fixing Wamp Server Not Starting Issue

Has your Wamp, Xampp, or other such Apache web server suddenly refused to start?
Hmmmm? Installed any Microsoft Visual Studio or SQL items lately?
I was saved this evening from tearing my hair out by this post on:

Basically, whatever I'd recently installed activated Microsoft IIS, the arch rival web server to all these Apache run devils.
But, I prefer to work with the devil I know, and did not wish to move all my www directories over to the IIS root. I like playing with Apache settings, even when they come close to putting me in an insane asylum.
Thanks to whoever wrote the article linked to above, I knew what to do to fix this - go into Administrative Tools from Control Panel, and basically tell IIS to go to hell (That means I turned it off, for all you gentle folk).
Then to services and do the same to Web Deployment Agent Service. And so much for that tag team.

Of course, the first usual suspect when this issue comes up is Skype, which by default like port 80, the port required by Wamp/Apache. That's also an easy fix. In Skype's connections settings you can uncheck the box where Skype uses that port.

This issue occurred on a Windows 7 64 bit PC.

NOTE: See update posted 8-23-2012. The above was not the end all solution.

Tuesday, June 12, 2012

And that ain't all folks

Another interesting pain in the ass issue with Visual Studio 2005 concerns the control flow containers in the tool box. Discovered only after much angina that I couldn't drag them into the control flow area with the mouse like you can all the other items. NO! Not the high and mighty containers! No dragging them around like common tasks! To get one of them to deign to inhabit your control flow you have to double click on them.
Why, Microsoft, why?

Bugs in a Microsoft program? Nawwwww! Couldn't be!

I've been expanding my abilities in SSIS programming, but at present am forced to use the aging Visual Studio 2005 for such endeavors. Well looky, looky if I didn't find a major bug, and thankfully, the fix for it, while playing with a Forloop Container.
The nasty lil' ole bug is in the Script Task Editor, when you go to click on Design Script. The Editor simply closes and leaves you stranded looking at the control flow screen.
The fix, which I found only a couple of mentions of on the web, is to download and install the SQL Server 2005 Service Pack 3 patch.
As of this writing it's still available at: http://www.microsoft.com/en-us/download/details.aspx?id=14752
For my aging XP desktop, SQLServer2005SP3-KB955706-x86-ENU.exe was the file of choice.
So far, I've noticed nothing else screwed up by whatever it installed.
Despite my fears it would, it didn't kill my more recent Native Client that my php scripts depend on.
and my more recent Visual Studios appear to be working fine.