Claudiu Persoiu

Blog-ul lui Claudiu Persoiu


Archive for 22 January 2011

Authenticated as root on ubuntu

with 2 comments

Ubuntu is based on the sudo command, apparently eliminating the possibility of directly using the root account.

Sometimes, when a series of commands must be executed as root from console, it becomes “annoying” to use sudo command.

Even though it doesn’t seem possible you can authenticate as root.

First of all the user must have root right,  when using sudo command!

The authentication can be done in two ways:
– sudo session:

sudo -s

– using su:

sudo su

Of course the root authorization is only for the current console. But from this console, for example other consoles can be opened, and they will be running as root.

Written by Claudiu Persoiu

22 January 2011 at 1:09 PM

Posted in Diverse,Linux-Unix

Tagged with

My php elephant (elephpant)

without comments

Ever since I’ve learned about the existence of the elephpant, I’ve wanted one. A goal not exactly romantic or worthy of being idealistic, but a lot more complicated than it looks.

elephpantNot even google can give very relevant results. The french company Nexen which is producing them don’t have any retail shops, in fact there isn’t any official retail market for them.

Although the Web is full of photos of the php elephant from all sorts of events, or even erotic ones, not the same thing can be said about places to buy if from.

The Nexus site states that there is a minimum of 50 small php elephants or 1 large, but here is where the story ends. At some point I decided to try to buy 50 elephant but… I was unable to do that either.

Eventually, after about 2 years of searching I’ve got by chance on eBay. I’ve thought that maybe a second hand one exists. It seems that there is somebody in US that is distributing! When I’m writing this blog it seems that not even that announcement exists, but with a little luck in few weeks will resurface. The search has to be on “php elephant” not “elephpant” which is the official name.

After about a couple of weeks since placing the order, it arrived! Now I’m the happy owner of an elephpant! The price is not exactly small, 15 pounds + delivery, but for this long awaited mascot I think it worth it.

It’s really quite small, but very nicely done, and very cute. He was my mascot from the ZCE 5.3 certification.

The mystery about the rarity of these elephants had an answer on elephpant.com: “No retail at the moment. We prefer relying on local PUG or online shop to actually do retail.”. It looks like at the moment the only way to get one is to find someone that bought 50 php elephants and now is selling some of them, or to buy 50 yourself!

The fate of the 2011 elephpants production it was decided at the end of last year, with a pre-order form on http://www.elephpant.com/. And most likely pre-orders will be soon available again.

When the pre-order form appeared on elephpant.com I even got a email telling me to pre-order if I’m still interested. So if you are interested you should subscribe to the newsletter.

With this generation a new pink php elephant is on his way! Probably they are here for the PHP Woman side of the community. There aren’t any images with this new elephant, because this is the first generation.

Written by Claudiu Persoiu

15 January 2011 at 5:53 PM

Posted in Diverse,PHP

Tagged with ,

Passing Zend PHP5.3 Certified Engineer Exam

with 3 comments

As I was saying in a previous blog, when Zend launched the new ZCE 5.3 certification I’ve received an discount voucher code, available until the end of year 2010. I wanted to use this opportunity, so in the last week of the year I’ve bought the voucher.

I already had the experience of the ZCE 5 certification, about which I’ve blogged at that time.

I wanted to take the exam before the end of the vacation, that is 7-I.

The period was a little short, in theory, I had about two weeks to prepare, but because they ware around the hollydays the time was in fact way shorter.

Zend PHP5 Certification Study Guide – 2nd Edition

I’ve begin my study with Zend PHP5 Certification Study Guide – 2nd Edition. The book even though it does not have the latest 5.3 features is not outdated. Because it wasn’t the first time I was reading it, it felt more like a recap. I’ve tried for each chapter to create an example that will show the functionality and one that shows the cases where the functionality was not as expected. With all this in 4 days I was able to go through the entire book.

As a suggestion, for streams and SPL for instance where is a little difficult to study directly form the manual, the guide looks like a good start.

Because after all the book is a guide, as I was reading the book, I’ve looked in the corresponding chapters in the php.net manual for a more detailed view on the subjects.

Mock tests

Before I finished reading the first book I’ve took a PHP5 mock test and to my surprise the result was “Excellent”. I got the mock tests from when I took the ZCE 5 exam, and because a lot of the questions are repeat quite frequently, I’ve only used 3 back then. This time I’ve only took a couple of them for the same reason. The tests are quite useful for the PHP5 part because, just like there ware described, they are usual more complicated then the exam itself. But don’t take to many of them, especially if the first results are poor, because they may lead you in a false self trust because of the repetitive questions.

Zend PHP 5.3 Study Guide

When I’ve finished reading the first book I started reading the free Zend PHP 5.3 Study Guide, which can be downloaded from the certification page, in the right. The guide is in beta version and you can really feel that. Everyone who’s been talking (blogging) about it is saying that it is full of bugs, and after all that is true. One of the funniest bugs in my opinion is at page 109, question 12, the answer is D… which is not displayed in the page. But I believe that where there are bugs they will be easily discovered and will not mislead.

It feels a lot more like a guide then the previous book, is a lot more concise and abstract and if forces you to study the manual.

At the end of each chapter there are questions, I only had 100% on a couple of chapters. The questions a quite difficult, even more difficult then the questions in the actual exam in my opinion. You have to read each question carefully because in the exam there are the same type of questions.

To go through the entire guide it took me another couple of days because I was already warmed up from the precedent book.

The day before the exam

I’ve read on Lorna “lornajane” Mitchell‘s blog that before the exam is good to recap some delicate subjects. In the day before the test I’ve started to recap some subjects that need more memory then intellect, like the tens of functions for string si array manipulation. Also I think is a good idea to recap SPL.

The exam it self

After not a lot of studding the moment of the exam was here.

Just like the last time, I’ve schedule my exam over the Internet a day before and just went to the Pearson VUE center.

The exam itself didn’t feel more difficult then the PHP 5 one. In my opinion there is more focus on high level OOP and SPL then the previous exam. The style of the questions is quite similar, maybe a little more “type in” questions, but that can be just my luck because the questions are dynamically selected from a question pool with different difficulty levels.

The 90 minutes time has quite enough to go through all the questions whit all the attention required and to review the answers I wasn’t sure about. At the ZCE5 exam I’ve finished about a half of hour before the time. This time for ZCE 5.3 I’ve finished only 10 minutes early because I’ve tried not to rush at all.

READ CAREFULLY! Is very important to read each question carefully and read in again until you are sure you understand what is required of you. Some questions have a quite awkward formulation and can mislead very easy. Don’t panic, if you have doubts maybe you should mark the question for review and come back to it in the end.

I usually mark the first question of the exam for review because I’m nervous and I can’t focus enough.

Unlike 2 years ago, when I was working a lot more with raw PHP and even had some PHP 4 servers, last year I’ve worked most of the time with open-source frameworks. This can be a disadvantage because I’ve didn’t use just as much the core functions. But unlike the first certification I must admit I didn’t study as much, probably is because of experience and the fact that occasionally I flick through the pages of the guide.

And with that being said it is time to put the first check on the year resolution and add a new logo to my blog.

For those who are preparing, I wish you the best of luck!

Written by Claudiu Persoiu

8 January 2011 at 1:56 PM