Monthly Archive for February, 2007Page 3 of 13

DEBUGGED: Marc’s PHP, NuSOAP, and SOAP

For the more-programming inclined.

The rest of you, you’ve been warned.

So I’m trying to implement this google response page using the Google SOAP API for this new teacher’s conference for the state of Illinois. The search needs to be able to search through two different databases (programs and resources) and the site itself. The reason I’m trying to do this in the deprecated fashion and not the new AJAX method is that a) we need the customization and b) we need the accessibility.

Lots of things have been going wrong, and I’m here to share with you the pains of my world this week.

First mistake was that I didn’t know the PHP Apache Module for Mac OS X that Marc Liyanage puts up doesn’t come with “display_errors = On” as default (Step by step way to turn it on here). It kind of makes sense, but since I haven’t really done PHP programming while using my own laptop as the dev box, I didn’t know of the existence of this issue. It also doesn’t help that my live box is also a Mac OS X, and I was completely confused when I didn’t get a single error when I started typing random characters into the .php file.

Heck, I started to doubt the validity of the “include” and “require” functions… and found out over and over that it works, just not for this soap class file I was trying to include. When I found out that there was indeed an error in executing the SOAP call after enabling display_errors, I was met with this lovely error:

“Fatal error: Cannot redeclare class soapclient in /Users/jk/Sites/google/nusoap/nusoap.php on line 7240″

You’ve got to be kidding me. After a quick google search, I find that NuSOAP is having issue with PHP 5:

There seems to be a clash of PHP5 build-in soap class and the nusoap class. Simply rename all occurences of “soapclient” in all 10 nusoap files into “soapclientw” (or whatever instead of “w”) and for me it worked.

YES. Now it should work right?

NO.

Yet another error, this time was something completely different. It looked like it was looking for a WSDL file (looking for the element), but wasn’t finding it at the http://api.google.com/search/beta2 address… I think. I’m still not sure what the problem is.

So at this point, I decide to go another route. Instead of using NuSOAP, let’s go ahead and install the PEAR module for SOAP. Of course, I have to update PEAR itself, because it was out of date. Dependencies… install one, update the other… okay, installed. Nothing. Nothing happened again.

Then I decided to restart the apache server.

> apachectl restart

Thank goodness I didn’t type sudo in front of that… or I would have an angry mob of college students outside of my office. Whew. But crisis averted… thank goodness.

I have a question for those that know: would restarting after installing the PEAR module do anything? Isn’t it running as a separate process apart from apache? I don’t know… but I guess I have all of tonight to figure this out.

Oh boy, not another all-nighter… Please not another one…

wasdfps

Lent commitment included nothing about games… crap. Games stopped “playing” (Pun! YES! BINGO!) any discernible role in my life maybe a year ago, so I guess I kinda left them out.

Okay, let me vent a little bit, before I go back and start to cry, looking at my code.

Right now, I feel like my code is shooting me in the face. With an AWP. (Oh, I miss those days… sorta kinda… all those wasted hours on a silly game from the 90s…) I have no weapons to speak of. (Do I get points for really bad metaphors, too?) I’m having one of the hardest times figuring out why my “include” and “require” aren’t doing as they’re supposed to be.

Sidenote: Currently working on: Google SOAP calls to customize the Google search page. All I have to do is include NuSOAP. What the heck is going on? (And like half the links to the sourceforge for NuSOAP is down for some random reason…)

Now… Wasn’t That Roundabout

Okay, back to the point of the post.

  • WASD: the four buttons needed for any first person shooter game
  • ASDF: just another ridiculous computer nerd “joke”… I love typing “asdf”…
  • FPS: first person shooter

Add the three together to get: wasdfps. I have no idea why this is funny. In about 30 seconds, I’m going to look back and say, “who wrote this garbage?”.

Regardless, this sucker’s copyrighted JK 2007 style.

Okay, back to work.

Lent Commitments and Goals

I really should have posted this yesterday. But I was struggling with something.

I always thought that Lent was something that the Catholics partook (partaked…? I think partook is right… hmm…) in, and I learned of its existence through learning about history. For me, since it was yet another deed that one had to do, I thought it wasn’t a good thing at all. Oh, how foolish and extreme I am.

But I realized later in life that deeds and faith go hand in hand.

14What good is it, my brothers, if a man claims to have faith but has no deeds? Can such faith save him? 15Suppose a brother or sister is without clothes and daily food. 16If one of you says to him, “Go, I wish you well; keep warm and well fed,” but does nothing about his physical needs, what good is it? 17In the same way, faith by itself, if it is not accompanied by action, is dead.

18But someone will say, “You have faith; I have deeds.” Show me your faith without deeds, and I will show you my faith by what I do.

19You believe that there is one God. Good! Even the demons believe that—and shudder.

20You foolish man, do you want evidence that faith without deeds is useless[d]? 21Was not our ancestor Abraham considered righteous for what he did when he offered his son Isaac on the altar? 22You see that his faith and his actions were working together, and his faith was made complete by what he did. 23And the scripture was fulfilled that says, “Abraham believed God, and it was credited to him as righteousness,”[e] and he was called God’s friend. 24You see that a person is justified by what he does and not by faith alone.

– James 2:14-24

And I see how awesome Lent can be, if used effectively. Now, being the all-or-nothing type of person I am, if I decide to give up something or replace it with something, I want it to be that way for LIFE. And if that’s not the case, I don’t even want to start.

This mindset needs to change. I need to know that even the slightest motion forward is still motion forward. Even the intention of moving forward is better than sitting and wallowing.

As long as I follow through, like a good golf swing, no matter how poor my first, second… billionth shot may be, it’s going towards the hole.

And with that, I’ve used up my horrible metaphor quota for the day.

No More Video Sharing Sites, Movies, TV…

Yes. I don’t know if I can make exceptions to videos that will improve my understanding of subjects I need to understand (entrepreneurship, web 2.0 applications, screencast demos of mac applications…), but I know exactly the types of crap I need to stop poking around for.

This includes Xman. Oh sad… I’ll be missing 6 weeks worth of quality Korean variety show entertainment. It also includes Battlestar Galactica, ATHF, The Office, and any other random shows I started to watch due to the innovation and time sink online video sites are. And to think I was going to start off Heroes…

Wrong Motive: Waste of time, anyway. Might as well kill two birds with one stone by saying it’s for lent.

Correct Motive: Truly, these things are time sinks. Big chunks of time that could be used towards something more useful, be it reading the Word or working. Gotta redeem the newfound chunks of time…

Memorize Philippians

Tonight, I’m taking some time to do some research as to why the heck I’ve been wanting to memorize this book for YEARS. The first time the thought of memorizing a full book crossed my mind was during a retreat in LA. I’m not sure what the circumstance was, but the pastor was talking about memorizing Philippians for some reason. From that point on, I’ve been wanting to do this on and off.

My junior year in college, I had the urge again to want to actually go through with it. A small group co-leader (Karen Seo) and I was going to keep each other accountable. I still remember to this day, meeting up at the Union for like 5 minutes, testing each other if we knew it. At that point, I was able to recite chapter 1 and parts of chapter 2. Then… the dry times known as my senior year hit.

Fast forward to now.

Of all the churches, their contributions (which Paul gratefully acknowledges) are among the only he accepts.

I knew that there was a letter that Paul had written, and only one church that this statement applied to. I just didn’t know which one. I’m not sure why this would make Philippians THE book to memorize for this Lenten season (and it’s not even the shortest book…), but I want to do it.

Motive: To be able to spit out verses more and more. The few that I painfully memorized for Helper’s Training helps immensely. I even remember back to the AWANA days in middle school… wow… I’m so old. Do they still have AWANA?

Read through Matthew, Mark, Luke, John

John Kim and I are going to start reading through Mark every Friday. This is going to be awesome. But not only that, I want to see all sides of the story this Lent season.

This is in addition to my Old Testament readings I’m doing. Sweetness.

Bonus

I stopped posting my quiet times up here. I think I’m going to start doing that more and more. At least, the ones that I can keep public and those that can maybe possibly help others to grow also.

Morning Prayer. My negative legalistic views kill me on this subject. At least, tomorrow, I’ll be going. I guess more prayer is needed on this topic of… Morning Prayer.

Warnings

Please don’t look at this list and point to my pride. I really want you guys to keep me accountable on these issues.

And with that, here we go for the next 40 days.

(Yeah, I know… I messed up already with my Justin Timberlake post… but we won’t talk about that. Looking to the future!)

George Orwell: 12 Writing Tips

Short of going out and buying Strunk and White (actually, I should) and memorizing everything in it, here’s a random link I found through my feeds that I’m going to try and think about as I start the set of night posts.

>* What am I trying to say? >* What words will express it? >* What image or idiom will make it clearer? >* Is this image fresh enough to have an effect? >* Could I put it more shortly? >* Have I said anything that is avoidably ugly? >* Never use a metaphor, simile, or other figure of speech which you are used to seeing in print. >* Never use a long word where a short one will do. >* If it is possible to cut a word out, always cut it out. >* Never use the passive where you can use the active. >* Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent. >* Break any of these rules sooner than say anything outright barbarous.

Link

You Know It might be the Start of a Bubble When…

… they start posting articles on articles about how Tech IPOs are back.

More like… iPOS. Yeah, wow, that wasn’t funny at all. (I really debated whether or not to post this last sentence. Please don’t kill me.)