server: /usr/local/apache2/modules/ cannot restore segment prot after reloc: Permission denied

Today I have faced a weired problem. I have compiled apache-php so many times till today. BUt havn’t faced this kind of problem.

Installation of both packages were fine without any error. As soon as I completed installation, I stopped apache, but I cant. The following error appeared.

” Syntax error on line xxx of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/ into server: /usr/local/apache2/modules/ cannot restore segment prot after reloc: Permission denied ”

After googling for whole day I have found the solution. Actually this is NOT a syntax error in the httpd.conf file in spite of the error message – but it does (correctly) point to a line number at which it had an issue.And in this case the issue is … the security setting for SELinux that was selected at the time the operating system was installed.

To get past the problem and allow the PHP Install to complete, we need to just turned enforcement off ..

e.g. [root@ superbox ]# setenforce 0

[root@superbox]# /usr/local/apache2/bin/apachectl start

Gr8 ….Its started……..

What this command do exactly?

Setenforce change the mode of SELinux is running in.
Synopsis: “setenforce [ Enforcing | Permissive | 1 | 0 ]”

Use Enforcing or 1 to put SELinux in enforcing mode.  Use Permissive or
0 to put SELinux in permissive mode.  You need to modify /etc/grub.conf
or /etc/selinux/config to disable SELinux.


Posted in LAMP, Linux | Tagged , , , , , , , | 2 Comments

Bugzilla Migration

I was facing problem with my existing bugzilla server, some hardware issues. I am bit confused what to do, I never done this before ever.

After googleing for some hrs I found the  solution, half part done by those search, but still it wont work. Then i took help from my boss & my system is online now.

There are two things which I wants to do!!

1. Need to transfer complete Bugzilla to another server.

2. Need to upgrade it with latest  available version.

First I have install new bugzilla & then import old data in new. Following are the steps for the same.

On New Server:-

# wget  (Download Latest Version)

#tar -xvzf bugzilla-3.2.2.tar.gz (Untar)

# mv bugzilla-3.2.2 bugzilla (Rename as bugzilla)

#cp -R bugzilla /usr/local/apache2/htdocs/ (Move it to Document root of your webserver)

#chmod -R 655 bugzilla/ (Change Mode)

Now login in mysql & create database & username.

mysql> CREATE DATABASE bugs;

mysql>grant all on bugs.* to bugs@localhost identified by ‘Your Password’; (Dont forget to mention this details in localconfig)

# cd /usr/local/apache2/htdocs/bugzilla

#./      (Run this file to check all dependencies are available or not)

This will ask you many questions just answer it properly, you will need administrator name, ID & localtion of perl installation. If any module is not available, it wont proceed further. Just install all required packages of perl.

If that file finished properly, you are ready with all database info & required settings.

Old Server:-

Now copy contents of data folder (“/bugzilla/data/” ) to new server’s installation directory (“/bugzilla/data/”). Also copy “localconfig” file to new server.

Take backup of you bugzilla database using  following comand:

# mysqldump –opt -u root -p bugs > bugs.sql

Copy “bugs.sql file” to new server.

New Server:

Restore sql data to mysql using following command:

# mysql -uroot -p bugs < bugs.sql

Now run that “./” file again.

Go to web url & try to login with ur existing username password.

Done!!! Your new bugzilla with old data is ready…………..

Posted in Administration, Linux | Tagged , , , , | 4 Comments

PHP Compilation ERROR “:configure: error: DBA: Could not find necessary header file(s).”

If you get this error at time when you are compiling PHP using “–with-gdbm”:

then you are probably missing the gdbm-devel package.

For redhat users # yum install gdbm-devel
For ubuntu users # apt-get install libgdbm-dev

Posted in LAMP | 2 Comments

Ubuntu update — Key not found error

Problem :

  • W: GPG error: hardy Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXX (Actual Key in error)

Solution :

  • vijay@superox$ gpg –keyserver –recv xxxxxxxxxx (Replace xxx with you key no getting in error)
  • vijay@superox$ gpg –export –armor xxxxxxxxxx | sudo apt-key add – (Replace xxx with you key no getting in error)
Posted in Linux_Tips_n_Tricks | Leave a comment

Not able to see Folder Option??

Unhide Folder Options in Windows Explorer

Sometimes folder options in your PC may get disabled by some virus and after removing the virus, you can not use folder options

This guide will show you how to unhide ‘Folder Options’ :
(Make sure virus already removed & cleaned)

Method :

* type “regedit” in run command and hit enter

* find any of the following keys:

* User Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ Explorer

* System Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Policies\ Explorer

* Value Name: NoFolderOptions

* Data Type: REG_DWORD (DWORD Value)

* Value Data: 0 = show options, 1 = hide options

Alternate Method :

Start>> Run > type gpedit.msc

Select : User Configuration>>Administrative Templates>>Windows Components>>Windows Explorer

Select : Removes the Folder Options menu item from the Tools menu.

Right click on it & select >>Properties>> Disable>>Apply

Posted in Windows | Leave a comment

Installing Free SSL certificate

There is website who provid ssl free ssl certificate for 30 days.

Go to “; here search for freessl or directly go to “;

Select your webserver version & follow the instructions. I have used apache 2.x To get your free ssl certificate you need to generate CSR.

Just follow steps from “;

You will get your CSR after following these steps.

Submit your CSR to using the online application pages at “;

They will ask you for online authentication via phone or mail, just follow them. You will get mail of your free ssl certificate. They will also send you an link for “Installation guide for SSL certificate” or just follow this link “;

Enjoy Free certificate for 30 days for free, as per my knowledge these guys are providing certificates for good cost, just renew it if you are really intrested.

Posted in Linux_Tips_n_Tricks | Leave a comment

MySQL dump & restore database

To take dump of any database use following.

[root@superbox]#  mysqldump –opt databasename -p > databasedump.sql

To restore existing dump to new database.

* Login in mysql

[root@superbox]# mysql -uroot -p

* Create new database.

mysql> create database <databasename>;

* Create user with access for that particular database.

mysql> GRANT ALL on <databasename>.* to <username>@localhost identified by ‘yourpassword’;

* Now restore existing dump to new database using old dump file.

[root@superbox]# mysql -uroot(or username) -p databasename < /path/to/databasedump.sql

It will take time as per your database size.

Posted in LAMP | Leave a comment