Tuesday, September 16, 2014

cannot enable executable stack as shared object requires: Permission denied

Story:

Today, One of our team member has been installed a clean installation of RHEL 6.3 (RedHat) and once we try to start the Apache web server, it went bad due to following error.

Error:


Starting httpd: httpd: Syntax error on line 218 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot enable executable stack as shared object requires: Permission denied 

Solution:


  1. Log into the CLI - Command Line interface (As root user)
  2. Run Following Command
[root@new ~]# execstack -c /etc/httpd/modules/libphp5.so

Image:


Tuesday, August 5, 2014

Abstract classes in PHP

Related Links

  • http://php.net/manual/en/language.oop5.interfaces.php
  • http://www.techflirt.com/tutorials/oop-in-php/abstract-classes-interface.html

What is class abstraction?

  • PHP 5 introduces abstract classes and methods.
  • Usually abstract class are also known as base class.
  • Abstract classes are those classes which can not be directly initialized. Or in other word we can say that you can not create object of abstract classes.
  • Any class that contains at least one abstract method must also be abstract.
  • Abstract classes always created for inheritance purpose. You can only inherit abstract class in your child class.
  • It can only act as parent class of any normal class. You can use abstract class in class hierarchy. Mean one abstract class can inherit another abstract class also.
  • A protected abstract function can be implemented as either protected or public but not private.