Page 5 of 5

Remote MySQL Connection Access

When moving a site from one server/host to another it’s often necessary to have both servers/hosts share a third server’s database. This is necessary because as the DNS change propagates around the world some user’s ISP may send them to your old server and some may arrive at the new server.

If you had two independent servers running two instances of MySQL the records in the database won’t match and some users will never be on the new server. This is especially a problem if you’re running a subscription based website. You merchant may have already processed their account information and confirmed them on your site, but wait, were they confirmed on the old server or the new one?

Using a shared database allows users who sign up to your site through the old server to be added same database as users who sign up through the new server. But MySQL doesn’t allow this to happen by default. It thinks that any incoming request from an outside connection is a security threat.

The internet is usually a great place to find tutorials, especially relating to programming. However, configuring a MySQL database for remote connections seems to be a poorly documented thing online.

With that in mind, here is a short explanation of how to configure MySQL to allow remote connections.

Note: this will not work on shared hosting.

Continue reading

Releasing Frontend Libraries Via Bower

For a long time I’ve had a CSS and JavaScript library that I’ve maintained for my personal and professional projects. The CSS included UI components, like buttons and switches, and the JavaScript were ports of all the PHP functions I had written so I have the same functions client side that I had server side.

Recently I released these libraries under the banner of a larger project, MogulMVC.

Since releasing them on GitHub I’ve been able to install them in any project by just running a git clone or git pull in my CSS or JS directory, and this makes it very easy to keep them updated, but it was still lacking something.

Continue reading

AJAX vs WebSockets

I’m in the process of converting a web application from an Apache + PHP backend to Node.js. The application being converted is based heavily around real time interaction between users, so, it was a natural fit for WebSockets.

In fact the old application used a Node.js backend for WebSockets, but an Apache + PHP backend for everything else, including page generation and AJAX endpoints. This means every AJAX driven form had a PHP endpoint which performed a desired action and a WebSocket event listener waiting to broadcast the event to other users.

Having to recode this application from the ground up in a new asynchronous language presented an interesting question to me.

Why should I use AJAX when I have WebSockets?

Continue reading

Which Server Side Language is Right for You?

One of the biggest hangups I had when starting to program was deciding what technology to use. At the time I was only writing server side code and was working in shared hosting, so my options were limited to various versions of PHP.

Within the last year I started using cloud hosting and thus gained the ability to configure my servers to use any language I wanted. Shortly after realizing this a small amount of fear came over me. The choice of language wasn’t made for me anymore, I would have to pick from a giant pool of languages. I would also be spending at least three months learning all about this language I picked before I would feel secure in it. After that three months I might not like it and would have wasted three months of my life.

At the time I was doing a lot of freelance and was instructor at a college teaching web development. Because I was teaching I wanted to know the basics of all the languages I could use on the server, just in case my students asked me about them.

I knew the basics of most of these languages but I had never written anything substantial in them. So, over one long weekend I locked myself in a room and started writing hello world, testing frameworks, making CRUD, overall building projects in every language and every framework I could get my hands on.

Four days later here are the four things I learned.

Continue reading

Cross Browser Voice Recognition with PocketSphinx.js

For several months I have wanted a cross browser voice recognition system that doesn’t rely on a server, use browser plugins or extensions, or use external programs like Flash. Something that could continually listen for keywords and trigger functions when one is detected. I looked into the webkitSpeechRecognition() object in Chrome, but unfortunately that relies on Google servers and is only available in Chrome. I looked into building extensions and plugins for Firefox and Chrome that package CMU Sphinx, but that is not native code. I even got voice recognition working in Flash, but wasn’t happy because it didn’t work on my Android device.

After months of looking I have found one that fits the bill completely and is really awesome.

Continue reading

The Value of Starting

First posts are always hard. Important questions emerge. What do you write about? Should the tone be humorous or serious? What will people think?

I’m going to talk about the value of starting your project, regardless of it being a blog, website, or novel. Most times starting is more important than what you end up with in the end.

I’ll describe this the best way I know how, with a story.

When I started working as a programmer I was always worried about the correct way of doing things. I constantly thought about what languages, frameworks, or libraries I should use, what design patterns I should learn, and how I would scale my application if it got big. Then one night that all changed.

Continue reading

The dark web is a dangerous place. Its crowded with hackers, drug dealers, and nefarious people trying to steal your identity or cause you harm. But it doesnt have to be that way! In this blog post, well outline how you can build something from scratch on the dark web without getting caught up in all the chaos of these shady parts of the internet dark.pe. A lot of people are interested in the dark web, but dont know how to access it. This article will provide an introduction and step-by-step instructions on how to find what youre looking for. It covers topics like Tor browser, Bitcoin, VPNs, and more!