ABHIONLINUX
Site useful for linux administration and web hosting

2010/10/22

Error while installin Xdebug pecl module

[root@server ~]#pecl install xdebug

downloading xdebug-2.0.3.tgz …
Starting to download xdebug-2.0.3.tgz (286,325 bytes)
……………………………….done: 286,325 bytes
66 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/xdebug-2.0.3
running: /root/tmp/pear/cache/xdebug-2.0.3/configure
checking for egrep… grep -E
checking for a sed that does not truncate output… /bin/sed
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… configure: error: cannot run C compiled programs.
If you meant to cross compile, use `–host’.
See `config.log’ for more details.
ERROR: `/root/tmp/pear/cache/xdebug-2.0.3/configure’ failed

FIX:
Execute the commands:-

[root@server ~]#cd /var/tmp/
[root@server ~]#rm -fr pear pear-build-root
[root@server ~]#ln -s /root/tmp/pear-build-root .
[root@server ~]#mkdir -p /root/tmp/pear/download

Try to install the package now:-

[root@server ~]#pecl install xdebug

It will be installed correctly in the server.

2010/10/20

Change exim interface IP address

We can change the exim interface IP by editing exim.conf.

1. Open exim.conf in the text editor.

vi /etc/exim.conf

2. Check for the following lines in exim.conf
======================
remote_smtp:

driver = smtp

interface=
======================
You need to modify this as given below

*******************
remote_smtp:

driver = smtp

interface=xx.xx.xx.xx

Where  xx.xx.xx.xx with your IP address.
******************

3. You need to restart exim service in the server.

/etc/init.d/exim restart

2010/10/15

How to upload multiple files using ftp in command line mode.

You can use lftp command to upload multiple files

lftp hostname

> user ftpusername ftppassword
> mirror source destination [to download entire directory]
> mirror -R source destination [to upload entire directory]

Uploading Error in WordPress. “Unable to create directory-Is its parent directory writable by the server?"

While uploading files such as plugins and themes, we will get an error “Unable to create directory /home/username/public_html/wp-content/uploads/2010/10. Is its parent directory writable by the server?”

This is due to changes in server, host or upgrading to new version

Firstly, we need to check the upload file path.

1. Login to wp-admin
2. Click on setting --> media --> "Store upload in this folder"
   It will be like /home/username/public_html/wp-content/uploads , change it to wp-contents/upload.

This will fix you issue. If this doesnt fix the issue, you need to check the folder permission. Change the permission of wp-content and uploads to 777 and correct ownership of all the files/folders.

2010/10/03

how to set time zone in VPS node (OpenVZ)

Below is the steps to set the time zone for a particular node in VPS.

1. Login to the main node.(SSH).
2. Stop the node(container) which you want to set time.
   # vzctl stop 777
            777 = Container ID
3.Set the container to have capability to change the time zone.
   # vzctl set 777 --capability sys_time:on --save

4. Start the container and login to it.
   # vzctl start 777
   # vzctl enter 777
5. Change your local timezone.
   # mv /etc/localtime /etc/localtime_bk
   # ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
6. Set the date
   # date 100318312010
  time has been set to 18.31 on 3rd Oct 2010
  (10-Month, 03-Day, 06-Hours,  31-Minutes,  2010 -Year