Browsing all articles tagged with php
Mar
4

Why Should We Take Trainings?

For the past few days, I have been thinking of enrolling myself to one of the available trainings for Red Hat Certified Engineer (RHCE) courses in Manila. Of course knowing myself, it would take me at least six months decide whether I should go with the training or not. I am also thinking if I am truly prepared for this kind of training, physically, mentally and financially.There are also a few types of trainings that can enhance our life not only with our careers but also on a personal side. There are technical trainings, management trainings, personality trainings (good for aspiring models or spokespeople) and more.

Certifications from prestigious enterprise companies like Red Hat Enterprise or CISCO is definitely a plus to anyone’s profile, providing bigger chances of getting that dream career. But, if totally unprepared, trainings and examinations can break your self-esteem, not to mention your bank. CISCO trainings at Mapua Insitute of Technology can take at least a year and may cost around Php30,000 to complete the four modules. I have taken technical training myself these past few years. The first one I had was Linux System Administration at Meralco Foundation which has definitely paved the way for me to become a Linux System Administrator. The training was OK and the lessons we had back then was very basic and the cost is really cheap. I learned a lot of things during my Linux training and I still use the notebook with my ‘newbie’ notes in it.

The next one I had was PHP-MySQL training with same institution. It is also OK, as we started with very basic modules and went on to more challenging case studies. This was a hard for me because this was the time I had to skip school because my father is already very sick. Nonetheless, I finished the final case study just in time.

Now going back to RHCE training, there is no doubt that being an RHCE attracts employers like moths to light. But this one puts really hard pressure on me. Php22,000 for an examination is a huge money and failing is not an option unless I earn Php2M a year. I also need to undergo another type of technical training for my personal use: driving lessons :) . So time management is a big factor here.

In the end, it all boils down to one: training is a very good investment and though it may be costly at first, the rewards are definitely great.

*Sigh*

Feb
17

Basic Apache and PHP Install from Source Part 1

Ok, I may not be a guru when it comes to installing and configuring Apache and PHP but here is a sample of how I install Apache and PHP on Fedora or Red Hat boxes fresh from source. Pardon my newbie-sh technique but here it goes:

Installing Apache:

# cd /usr/src

- Download the http package

# wget http://www.apache.org/dist/httpd/httpd-2.2.8.tar.gz (change this to a mirror available to you)

- Extract the contents of the package

# tar zxf httpd-2.2.8.tar.gz

# cd httpd-2.2.8

- Configure the source depending on your requirements. At this point, configure may fail because of unsatisfied dependencies. Check what the error is and you can download the required package using yum or up2date. If you do not need SSL module for secure page (https), you can leave out the –enable-ssl part.

# ./configure –prefix=/usr/local/apache –with-mpm=prefork –enable-ssl –with-ssl=/usr/local/ssl –enable-log_config=static –enable-vhost_alias=static –enable-includes=static –enable-dir=static –enable-access=static –enable-mime=static –enable-mime_magic=static –enable-mods-shared=most –enable-cache=shared –enable-disk_cache=shared –enable-file_cache=shared –enable-mem_cache=shared

Tip: To check what these directives mean, you can issue ./configure –help .

# make

- If everything goes well, your fresh http will be installed in /usr/local/apache with the following command:

# make install

Installing PHP:

# cd /usr/src

# wget http://www.php.net/get/php-5.2.5.tar.gz/from/us.php.net/mirror (change this to a mirror available to you)

# tar zxf php-5.2.5.tar.gz

# cd php-5.2.5

- Same with http. The configure part will depend on your requirement.

# ./configure –with-config-file-path=/usr/local/apache/conf –with-apxs2=/usr/local/apache/bin/apxs –enable-calendar –enable-ftp –without-pgsql –with-zlib –with-openssl=/usr/local/ssl –with-mysql –with-mhash –with-mcrypt –with-curl –disable-cgi –enable-mbstring –enable-soap –with-bz2 –enable-sockets –enable-zip (If configure fails, read the error why the it failed and install first the dependencies then run again the configure.)

# make

# make test

# make install

To start the httpd service, execute

# /usr/local/apache/bin/apachectl start

You can create a symlink to your /etc/init.d so you can start apache by typing /etc/init.d/httpd start

# ln -s /usr/local/apache/bin/apachectl /etc/init.d/httpd

There you have it. You have successfully installed Apache with PHP on your webserver. I will continue this little howto with how to configure your webserver.

Jun
24

Learning PHP

Author Rai    Category LAMP     Tags , , , , ,

Recently, I took a short PHP-MySQL course at Meralco Foundation and it was tough. Really. I have no professional experience with software development whatsoever and this course gave me a jumpstart. I was really glad I got through with the course and even managed to learn something from it (lolz). The course covered the basics of PHP programming, setting up databases and creating useful programs. Too bad that we used Windows-Apache-MySQL-PHP combo, much to my disappointment. But nevertheless, it was the same banana. We were introduced to WAMP Server, an all-in-one package under Windows which provides Apache, PHP and MySQL in one installation. You can check out their website, http://www.wampserver.com, if you want to know more about WAMP.

I personally recommend WAMP to those who are heavy Windows user and want to learn PHP programming. Just install the program the traditonal Windows way (Click Next-Next-OK-Finish) and you are good to go. No fuss. On the other hand, I still recommend Linux-Apache-PHP-MySQL (LAMP) for advanced users. I do not have benchmark results for WAMP compared to LAMP on a live server but I believe that when it comes to performance, it all boils down to server configuration.

There are a lot of walkthroughs on the internet to guide you on setting up your own LAMP server. Like they always say, Google is your friend. I will also put up my personal guide in setting up a LAMP server to add up to those piles of guides on the net. As I am writing this, my imagination is running wild and I am beginning to see some newbie reading my post about LAMP (lolz).

Just for kicks, I put up my final exam here on my site so that you can see what a pathetic web developer I am. You can try out the exercises here. You may not send your violent reactions here.