Symbolic Links for Development and Production Servers

Tech No Comments »

I use a config file for most of my PHP projects–and it’s filled with variable declarations and constants I need throughout the site. I have to reference the config file in almost every one of my files for my site, and it might look something like

include_once('Library/WebServer/Documents/Gorilla/includes/config.inc');

The problem is, if I’m developing on one machine and uploading to another, the chances are the path will be different, like

/var/www/gorilla/includes/config.inc

So, instead of doing a global file/replace on every one of my files, or writing some weird “decider script” that used a $_SERVER variable to point to the right config file, I’m using the unix command “ln.” It’ll work for the Mac and other Linux flavors, and it’s saved me a ton of headaches.

ln -s /Library/WebServer/Documents/Gorilla /var/www/gorilla

The ln is “make links,” and the “-s” creates a symbolic link that allows you to reference the first link through the second. Make sure you have at least the base directory already (in this case “var”.) Now when you upload to your production server you won’t have to change hard-coded links to match your system. Just reference the production link, like

include_once('/var/www/gorilla/includes/config.inc')

and your development server uses the symbolic link to access your development file at /Library/WebServer/Documents/Gorilla/includes/config.inc.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Oy vey!

rants No Comments »

I switched servers this week and made a cardinal mistake–I didn’t properly backup my blog. I’ve got copies of most of the entries, and I’ll be adding those today–but I’ve lost a lot of comments. Learn from my mistakes…

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Pulling Back the Curtain - Part 3

General No Comments »

Well, it’s been a while since I last gave a glimpse behind the scenes of my new startup. My plans are to launch June 1st, and things are finally coming together. The site itself is nearly ready for launch, I have a few things I’d like to tweak, and a few browser-compatibility issues to deal with, but it’ll be done soon. Right now, I’m taking care of the unfun-ness of the business: meeting with the lawyers, accountants, and bankers.

The Lawyer
I met with a lawyer this morning, and he’s working on some Terms of Service I’ll need to keep myself out of legal issues. He was great–easy to talk to, had relevant questions, good ideas, and was encouraging.

The Accountant
I met with an accountant yesterday, and wasn’t too impressed with him, so I may look for another. I really don’t know what I didn’t like about him, it just didn’t feel comfortable. And when you’re starting a business, you need to work with people you feel comfortable with, and it just wasn’t that way with him.

I thought I wanted a lawyer and accountant that were young, progressive, technologically-minded people. It turns out age has little to do with it–and being a technophile may not be a requirement either. My lawyer is 65+, doesn’t have an email address on his business card, and has a circa 1998 brick phone. The accountant is in his late 20’s and has a Blackberry, but other than that showed little interest in staying current with techno trends or news. I’m meeting with another accountant Thursday and will know more then–maybe it’s just the nature of accountants.

The Banker
Banking is a crazy issue altogether. Banks aren’t in business to look pretty–they’re beastly about wanting money, and they’ll take it any way you can give it to them… finance charges, minimum balance charges, transaction-limit fees, average daily balance fees, high-activity fees, no-activity fees, ATM fees, merchant account fees… you get the picture. The beauty is, they take this money, plus any money you store with them, and make MORE money using your money, it’s really amazing–it’s the purest form of perpetual motion I’ve found. In my next life I hope to be a banker.

That being said, you have to deal with banks, so again, go what you’re comfortable with. I looked at accounts at all the big boys, Bank of America, Chase, Wachovia, Wells Fargo, but I ended up staying with a local hometown bank. They actually have branches in several cities, so it’s not like a mom-and-pop thing, but the beauty of dealing with a local bank is this: 1) You keep your business local, and 2) If you need something, like a rule bent here or there, they don’t have to call a corporate office 8 states away to get approval.

I went inside this bank, rather than getting online and opening an account–and I’m glad I did. They generously lowered my opening-balance requirement, and actually talked me out of an account that would make them more money because a different (free) account they had worked better in my situation. One of the accounts they offered had a monthly service charge but unlimited transactions of deposits and withdraws. Another account was free but limited me to 150 transactions per month. Since my site will take money from customers, I could outgrow the 150-transaction limit quickly, and that was concerning. She investigated and found out that the 150-transactions only counted as “in-person� transactions, and there was no limit to electronic. Being web-based, 99% of the transactions on my account will be electronic (web-based), so the limit was no longer a factor. If you’re signing up for an account that has a transaction limit, check to see if it only applies to physical, in-person transactions. Had I opened my accounts online, I would’ve messed up and gotten the account that had the service charge.

Just be comfortable
It all comes down to what you’re most comfortable with. If you’re not comfortable with your bank, your accountant, or your lawyer, it’s going to make it tough to talk to them when the need arises. Establishing good relationships with them can give you more ideas to help your business grow. Some ideas will be good, some just won’t work for you, but at least you’ll have a few extra brains to help you out. Both Lawyer and Accountant had some ideas for me that would make me more money off the site, but it’s advice I didn’t like–I’m not making this site to languish in poverty, but I’m also not looking to rip people off. The project is about helping people raise money, and the very nature of it is to help give, not help take away (things that will become more lucid after I launch…) Just remember–advice is not an edict. Take it, test it, and see what works best for you.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in