soft rlimits too low error on mongo

This is typical memory issue. Are you running a bunch of heavy programs along side? Check how much pages you are loading on chrome even.. and your IDE..

There is a way to add more before you start mongod though

ulimit -n 2000 && mongod

But I am a fan of using the resource effectively by removing apps that takes up my memory..

Installing php-mysql-driver using mysqlnative driver

PHP has been providing us starting form 5.3 the mysqlnd [mysql native driver] that will liberate us from using the mysql client library. And it will be shipped along with the php
But if we remove the mysqllib for some reason and wanted to load it again..
This will be for linux fedora – I have done this on Amazon EC2 server

sudo yum shell
remove php-mysql
install php-mysqlnd
run
quit

you will see the new mysql ini files being added in /etc/php.d folder
Then restart httpd

sudo service restart httpd

Upgrade mysql 5.5 to mysql 5.6

This would probably make sense on EC2 instance where it comes by default with mysql 5.5

First shutdown the mysql server and then go ahead and move the mysql 5.5 to new folder

sudo mv /var/lib/mysql /var/lib/mysql55

Then grab the tar from Here

Once you download the tar file

sudo tar -xvf yourDownloadedTar.tar
sudo rpm -ivh MySQL-shared-5.6.17-1.el6.x86_64.rpm
sudo rpm -ivh MySQL-client-5.6.17-1.el6.x86_64.rpm
sudo rpm -ivh MySQL-server-5.6.17-1.el6.x86_64.rpm

yup.. that would be it.
Then restart the mysql and it shall be updated

undefined symbol: php_json_encode in Unknown on line 0

Am fighting to install my application on Amazon EC2.. I installed the mongo and php mongo driver then restarted apache to get the above error message.
The problem is loading precedence. Mongo, which is dependent on json.so, is being loaded ahead of the json.so hence crying over ‘Where Is My JSON.so ehiehiehi’
The fix would be to make sure we are loading json first before the mongo – actually this would be hte problem on while loading memcache as well..
On php.ini –
Right above the extension=mongo.so, add extension=json.so
Usually json.so will be loaded through its own ini file json.ini
On Redhat Linux it would be inside

/etc/php.d/

So, go to the json.ini and comment the extension=json.so line
restart httpd/apache and
DOne!

setting XDEBUG variable through cookies

We know how important xdebug in php is .. no post on that :)
when it is through the url, we will use the

XDEBUG_SESSION_START=somevariable

But, when you are using curl or some other client for using a post, cookie is a rescue

CURL_COOKIE = 'XDEBUG_SESSION=somevariable'

Just add the above as one of the curl options and you should be good.

how to get into programming part 2

Part 1 was on generic stuff that I have little idea on. But on programming and being a programmer, I can say a bit as I am living as a programmer.

Getting into programming
Lets start from simple questions first:
What do I need to be a programmer
A college diploma or degree would be good to be a programmer – but IT IS NOT MANDATORY. I have worked with great great programmers who have just a high school diploma, who have totally unrelated degree and who were working stuffs that in no way related to computers for that matter.
****But, if you have the chance to go to school and learn about programming/computers – it would make life easier and it would definitely create a difference. By yourself, you need a lot of experience to understand the basic things, with class it is so easy. By yourself you be a bad programmer for a while before you know it is bad, with class you will be guided with the best practices and become a good computer citizen right away – so if there is a chance of going to school never turn it down..

So what do you need?
A computer, a good book/website about programming and passion to program.

Where shall I begin?
In programming itself, there other branches as well: you can work on desktop applications, mobile applications and web applications.
I would advise to concentrate on web and mobile applications these days.

I will greatly discuss the web part.
The first thing on my list of advice is do something and see something..
The webpage you are interacting today for different kinds of tasks, be it facebook, google, yahoo, you online banking and the like – they are all web applications. Your goal would be to be one of those peoples who created such a good applications that make our life easier from day today.
Speaking of web applications, there are different kinds of tools that would allow us to create the websites: here are the major ones
1. The basic HTML part we discussed on the designer section of part 1
2. Good understanding of server-client architecture. All we need to know is a major part of this only
3. Fair Database knowledge – don’t worry, you will learn it as requirement when you get started to work on your web stuff
4. At least one web programming language. The HTML we discussed is only for look and data bridge part – there is another main part behind every website.
For example, when you log into facebook, facebook would know you right? it will pull if there are any new messages you have, who liked you? who has friend requested you and the like. All this has to be done somewhere. Based on your username, facebook gurus should provide you with messages that are sent to you only without sharing to the others… and even more tasks. I was talking about this task.
The above task is generally known as back-end development. It could be done using different programming languages – notable ones are PHP, Ruby, ASP.Net, Java and more and more.
So, you need to know at least one of these languages to work as a back-end developer. It looks a lot right? Again it is NOT

umm.. which one shall I study/read first
Here is the fun part. We are going to do it step by step. There are a lot of things we have to know,but we dont have to know all of them before we need them right?
Here is what we do in the order of importance..

1. Lets create simple website..
Oops.. I don’t know anything.. how could create that?
That is what we are going to do. At this level we will see how simple it is to create a very simple one
Open any text editor like notepad, How to open notepad and insert

<html>
<head>
<title>my first webpage</title>
</head>
<body>
Here is my first webpage
</body>
</html>

Then save it as my_first_web.html
After this doubleclick on it and you will see your very first webpage.
Then go back to HTML Introduction and invest a good amount of time by changing font, color, bar and the like until you can do it without further reference..the site has online editor also so you can test it online.

Afte that I would say invest a little bit of time on any programming language before you dive into the web programming.
C++ is a good candidate for it..
Intro to programming Actually, check this guy’s videos they are a good start points..

The following links are also helpful ones
http://cplus.about.com/od/introductiontoprogramming/a/career.htm
http://lifehacker.com/5401954/programmer-101-teach-yourself-how-to-code

I will try to write on Web programming next time – especially on PHP
Please post your questions/comments and I will try to answer accordingly.