Skip to main content

Posts

Showing posts from November, 2013

How to create tar by excluding directories in centos Linux

I had a problem to compress files in my webserver. Because my images and backup folders were too large. Then I thought to exclude those directories and create a tar file. I have used --exclude option which matches patterns. First I have used following command to exclude images and backup folder. tar -cvf "new_tar_cha_2013-11-26.tar.gz" .  --exclude "path/to/backup/backup/*" --exclude "images/*" > error_tar_cha.log It excluded backup folder correctly. But It excluded all the images folders inside my directory. Because it matches the pattern . My solution was, I renamed to root images folder to different name - "images-cha1" and excluded it. It fixed my problem. tar -cvf "new_tar_cha_2013-11-26.tar.gz" .  --exclude "path/to/backup/backup/*" --exclude "images-cha1/*" > error_tar_cha.log I think this will be helpful for others also. Thanks

PHP :: How to request Webservice using PHP CURL

I had a problem when requesting webservice. My solution as follows.         $url = " https://path_to_service.asp " ; //setting the curl parameters.   $headers = array ( "Content-type: text/xml;charset=\"utf-8\"" ,     "Accept: text/xml" , "Cache-Control: no-cache" ,   "Pragma: no-cache" ,   "SOAPAction: \"run\""   );   try { $ch = curl_init ();   curl_setopt ( $ch , CURLOPT_URL , $url ); curl_setopt ( $ch , CURLOPT_POST , 1 );     // send xml request to a server   curl_setopt ( $ch , CURLOPT_SSL_VERIFYHOST , 0 );   curl_setopt ( $ch , CURLOPT_SSL_VERIFYPEER , 0 ); curl_setopt ( $ch , CURLOPT_POSTFIELDS , $xmlRequest );   curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , 1 ); c

Joomla 2.5 :: Redirects Error 500 (Internal server Error) page when loging with invalid username and password

I faced this issue when migrating my local joomla 2.5 installation to test server. It works fine when logging with correct username and passwords. Then I have checked in error_log and found issue. PHP Warning:  fopen(path_to_log/logs/error.php): failed to open stream: No such file or directory in  new_server_path/libraries/joomla/log/loggers/formattedtext.php on line 248 Then I have checked in back end and changed path to log folder as follows.