All posts by Saro

DirectAdmin 1.31.0, PHP 5.2.3 and CakePHP

Here’s an interesting problem I came across just now. I was setting up a new domain with CakePHP and noticed that the stock copy did not run, neither did identical files I copied from another working domain. Before this, each time I uploaded CakePHP to my server, everything ran out of the box, so why not now? It’s been a while since I’ve added a new domain to the system, so right away I thought it must be PHP or DirectAdmin causing the problem (they were the latest updates done to the server). The error message I was getting from CakePHP was the following:

Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/user/:/tmp:/usr/local/lib/php/) in /home/user/domains/domain.com/public_html/cake/libs/session.php on line 154

Fatal error: session_start() [<a href=’function.session-start’>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/user/domains/domain.com/public_html/cake/libs/session.php on line 154

Doing a quick check on Google brought some insight to the matter, but nothing concrete. I decided to check phpinfo() and see what the open_basedir restriction was set to. Since I had a copy of phpinfo() on another domain of mine, the result of open_basedir came up to “no value”. I mumbled “WTF” to myself and was totally puzzled. Now, quick note on my mistake here: always run phpinfo() on the same user and domain that you are trying to troubleshoot. Fortunately, I didn’t give up just yet: I ran phpinfo() on the troubleshooting domain and right away notice that open_basedir had values, none of which would work with CakePHP. Finally, something! So where were these values coming from?

The next step was to check Apache’s httpd.conf. Since DirectAdmin organizes the httpd.conf files of every user account seperate (it Includes user-httpd.conf at the end of the main httpd.conf file) I went to the troubling user’s configuration and scrolled all the way to the bottom to the latest added domain. Bingo! It had the following line added:

php_admin_value open_basedir /home/user/:/tmp:/usr/local/lib/php/

And it was the only domain that had that line too. A quick sigh of relief after, I silently commented that line out and crossed my fingers, restarted Apache, refreshed the homepage and… yep, everything worked as usual. It seems that the latest version of DirectAdmin (1.31.0 at the time of this writing) has some extra security features enabled (which is a good thing) but a bit unnecessary for people who run their sites on their own servers. So, this is a heads up for everyone out there that might come across this error one day and not know what to do. I hope it works for you.

Update: DirectAdmin actually has a built-in control panel feature that allows you to turn on/off open_basedir restrictions and PHP safemodes per domain name. Just go to the control panel main page and click on PHP Safemode Configuration (available as of 1.31.4, maybe earlier).

Free Samples of Purple Wraath and Green Magnitude

Since I’m an avid user of Purple Wraath and Green Bulge (not Magnitude, since I prefer pills over powders) from Controlled Labs, I came across this cool offer for people who are looking forward trying these supplements without spending their hard-earned cash on a big bottle and not liking them after. You only have to pay for the shipping, which is 4.00$ USD. How cool is that? So, if you feel like trying Purple Wraath and Green Magnitude for their taste, go on and click on ’em! If you’re still unsure whether you want to purchase these supplements, read my reviews on Purple Wraath and Green Magnitude.

Mazda Tribute 2008 Aftermarket Stereo Installation

I just installed my after-market Pioneer Premier DEH-P770MP headunit in the Tribute (yes, at 9:00 PM at night since I was so eager to do it) because the stock radio is garbage. I had a bit of trouble finding guides and HOWTO’s on the web on how to replace the stock headunit, so I decided to document it here on my site. There are more upcoming changes to the stock stereo, such as replacing all four stock speakers with some components and powering them through a four channel amplifier. If anyone is curious on how to do all this, read on! I don’t have any custom pictures yet, but I can guide you step by step on how to remove and disassemble your stock radio and install a spiffy aftermarket headunit that will make music sound so much better.

Okay, without further ado, here’s the parts you will need to successfully install an aftermarket radio in your Mazda Tribute 2008:

  • Metra dash kit, matte black, model #99-5814 (note that you won’t find a glossy surface finish for the dash kit… at least I wasn’t able to)
  • Metra Tribute 2008 wire harness, model #XSVI-5520
  • Metra antenna harness, model #40-CR10
  • Phillips screwdriver
  • 7MM and 8MM socket (with extensions), 8MM wrench might come in handy when removing ground plug
  • Torx T-15 screwdriver (I think, or T20)
  • Small pry-bar or flat screwdriver (be careful with this suggestion as it’ll be used for removing dash, you don’t want something that’ll scratch the panels)

I had a bit of trouble finding the first two parts, but after realizing that the Ford Escape 2008 is an identical vehicle to the Tribute 2008, I looked up for aftermarket parts for the former and concluded that Ford parts will work for the Mazda. I went on MetraOnline.com and confirmed that the dash kit will work for my car (see the Vehicle Fit Guide). Doing a quick search on eBay landed me on the necessary parts for my car. In total, the dash kit cost me 20.00$ CDN while the harness was more expensive, coming in at 70.00$ CDN. All items shipped, the final price was 90.00$ CDN for the whole she-bang.

Continue reading Mazda Tribute 2008 Aftermarket Stereo Installation

That Money Song

For the longest time, since that Fresh Prince of Bel-Air episode aired (titled “You’d Better Shop Around”, where Will Smith becomes a salesperson for a car dealership) I have been trying to find that ‘money’ song. It’s the scene where Will and a customer are in the car, blasting the air conditioning and reclining the seats backwards. The song goes “Money money money money [long], money!”. I find out it’s by the artist O’Jays, title “For the Love of Money”. After ten years, I found it off the Internet by searching Google (forum). I’m so proud of myself. đŸ™‚

Dave Clark is a Moron

I was reading a review about Anjou Speaker Cables (posted on Slashdot.org) and couldn’t help but call Dave Clark a moron since he so cleverly reviewed the 7,250$ cables. You read that right; copper speaker cables with banana plugs costing 7,250$ US Dollars for 12 foot of wiring. Before I dive into the cost of the speaker cables, I’d like to quote Dave Clark’s moronic statement (that was paraphrased on both Slashdot.org and on Pear Cable’s product page):

“In extended listening sessions, I found the cables’ greatest strength to be its PRAT [Pace, Rhythm And Timing]. Simply put these are very danceable cables. Music playing through them results in the proverbial foot-tapping scene with the need or desire to get up and move. Great swing and pace—these cables smack that right on the nose big time.”

Wait, “danceable cables”? Are you kidding me? What the hell are you smoking, Clark? Do you honestly believe in the crap you write for Positive Feedback and all the countless reviews you’ve done for audio equipment?

First of all, spending 7,250$ on speaker cables — a whole 12 feet of it — is complete idiocy. There are people out there who fall for the whole “Monster Cable” quality crap (which Monster itself is overpriced, but Pear Cable just shits all over Monster’s title for expensive garbage) and who believe that specially manufactured cables, made from the same element that other cables are (copper!) can be made to sound more superior. They make it seem that the gold-plated interconnects they latched onto the ends of the cables and the super-duper plastic shielding the cable from “unwanted frequencies” are sent from God himself. Seriously, people, there’s nothing exceptional about copper cable; you can only go so far in terms of quality. The only things that affect cable performance and quality are:

  • Gauge: the lower the gauge, the thicker the cable, the longer the distance you’ll be able to run it, so go big! Select the appropriate gauge with your speaker ohm load. This is the most important thing to consider when it comes to speaker cabling.
  • Shielding: shielded cables will help block unwanted frequencies, such as noise emitted from other devices or power sources. Shielding is shielding; having bullet-proof cables made of Teflon is overkill. You should just run your speaker cables far away from power cables and devices if you’re that paranoid of frequency interference.
  • Interconnects: good, solid interconnects will simply aid in keeping things connected (read: the wire being properly tightened inside the interconnect and not falling off). Just so you know, gold-plated connections aren’t any better than keeping things copper: gold has a higher electrical resistance value than copper. Silver is the best, but most expensive. But you know what? You won’t be able to tell the difference between all three metals. Stick with copper cabling and don’t bother with the “oxygen-free” copper cables since it has no significant value when it comes to speaker wiring.

The above applies to speaker cabling… what about digital connections, such as HDMI? Oh boy, what a mess. Consumers are so uneducated when it comes to electrical equipment that I feel sorry for them.

HDMI Cables: they’re digital, ’nuff said. Digital means that we’re talking about 1’s and 0’s here when data is passing through the cable. HDMI is not analog, it is digital: the cable works, or it doesn’t (the cable is on or it is off). Simply put, a digital cable does not need the same characteristics when shopping for regular speaker cabling except the gauge/thickness when running long distances. I would go as far as to say that HDMI cables are immune to foreign frequencies because the data is CRC checked on both ends of the cable (not to mention corrected) and simple shielding prevents anything from interfering with the wiring. Having gold or silver connections will not help the data move any faster or affect performance in any way. The 100$+ Monster Cables versus the 5-10$ HDMI cables you can pick up at your local electronics store are the exact same thing and do not differ in terms of performance or quality. We’re talking about digital data, folks. The 1 is a 1, and the 0 is a 0. The devices communicate in an error-free language and signal degradation is almost non-existent unless you run the cable in long distances (so go higher in gauge to prevent signal loss). Whoever falls for the Monster Cable crap is a sorry fool who hasn’t done his research before plunging hundreds of dollars in overpriced equipment.

Here’s how I shut a salesperson up recently when he tried to fraud me.

My buddy bought a new satellite receiver with a HDMI port and needed some cabling. We headed to the electronics store and asked the salesperson for some help on where to find it. Right away, he asks us what kind of TV we have and what the source is. He then proceeded to recommend us the 75$ HDMI cable that looked exactly identical to the nearby 10$ one. We ask, “What’s the difference?” and he replies “Oh, this one is gold-plated, much thicker wiring, has shielding and has a better visual quality…” and so on. At the time, I sensed something was wrong… something didn’t quite fit in with the pitch: How can a cable be affected by such properties when we’re transferring data? I then said “But HDMI is digital.” and he looked at me, perplexed. Yes you moron, I know what HDMI is, and your sales pitch is flawed. He simply said “get the 10$ cable” and left us be. Score 1 for consumers everywhere. And guess what: the quality of the feed is just as great when compared to the Monster cables when demoed on televisions at FutureShop or BestBuy.

I like to call myself an “audiophile” as I build my own speakers and run my own cabling with ends crimped by me. The audio system in my car was installed with components I hand-selected with my friend for a good price. It does not have any expensive wiring or silly gimmicks to “enhance” the sound stage or imaging. The system’s value costs upwards 3,000$ but it puts to shame every sound system I have heard, whether it be car audio or home theater, simply because I spent the time to research into making the right subwoofer boxes tuned to the right frequencies and selecting quality components with the right amplifiers to have decent sound. The head-unit outputs 4 volts instead of the standard 2 volts that most receivers are equipped with. The cables were purchased in bulk and cost no more than 100$ for all of the cars wiring: interconnects between speakers, amplifiers and two power wiring kits. It is a great sounding system that makes driving my car pleasurable. The only thing I’m a sucker for is the company JBL, but any “audio expert” or critic should know that JBL IS a great company and not a marketing-driven manufacturer like BOSE (ugh)… but that’s for another blog post. That’s all for now.