Mac OS X Lion Theme for Android

July 24th, 2011

Lion OS X

Popularity: 13% [?]

How to check the current PHP handler and change it

June 5th, 2011

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf –current
Available handlers: suphp dso cgi none
DEFAULT PHP: 5
PHP4 SAPI: none
PHP5 SAPI: cgi
SUEXEC: not installed

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf 4 dso none 1

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf –current
Available handlers: suphp dso cgi none
DEFAULT PHP: 4
PHP4 SAPI: dso
PHP5 SAPI: none
SUEXEC: enabled

[root@server ~]# /usr/local/cpanel/bin/rebuild_phpconf –help
======================================
Usage:-
/usr/local/cpanel/bin/rebuild_phpconf [--dryrun] [--no-restart]
[--no-user-updates]
[--current|--available]
–dryrun : Only display the changes that would be made
–no-restart : Don’t restart Apache after updating the php.conf link
–no-htaccess : Don’t update user configurable PHP mime mapping.
–current : Show current settings
–available : Show available handlers and PHP SAPIs
: Version of PHP to set as default handler for .php files
: Type of Apache module to use in serving PHP requests
: enabled, disabled, 1 or 0
======================================

The Five Types of PHP Configuration That Are Possible:-
====================================================
* None – Don’t provide access to this version of PHP
*DSO – Provide this version of PHP via libphp4.so or libphp5.so ( mod_php). This is normally the fastest possible way to serve PHP requests, but PHP will execute as the user “nobody”. If both versions of PHP are available, it is impossible to configure both to be served as DSO unless the concurrent DSO patch was applied at build time.
* SuPHP – Provide this version of PHP through mod_suphp. This is the most flexible way of serving PHP requests and tends to be very secure. PHP scripts are executed by the user who owns the VirtualHost serving the request.
* FCGI – Provide this version of PHP through mod_fcgid. This is a very fast way of serving PHP requests, but php.conf will most likely require additional tuning to perform well. If Suexec is enabled, each user will create their own PHP FastCGI server automatically and PHP scripts will be executed by the user who owns the VirtualHost serving the request. If Suexec is disabled, the “nobody” user will own all of the PHP FastCGI server processes and PHP scripts will be executed by the “nobody” user. FCGI mode is recommended only for advanced administrators who understand how to tune the performance of mod_fcgid. Userdir requests will not function correctly with the basic mod_fcgid setup provided by cPanel.
* CGI – Provide this version of PHP through mod_cgi or mod_cgid. If Suexec is enabled, PHP scripts will be executed by the user who owns the VirtualHost serving the request. If Suexec is disabled, the “nobody” user will execute all PHP scripts. Userdir requrests will not function correctly with the basic CGI setup provided by cPanel. It is intended as a fallback when the other preferred methods (DSO or SuPHP) are not available. Serving PHP as CGI is not particularly secure or fast regardless of whether Suexec is enabled.
=======================================================

source: http://openhelp.net/2009/05/10/how-to-change-the-default-php-handler-from-the-command-prompt-cpanel-server/

Popularity: 8% [?]

Fantastico error: Parse error: syntax error, unexpected $end in /tmp/

June 4th, 2011

Fantastico error:
Parse error: syntax error, unexpected $end in /tmp/

Solution:
Your /tmp directory is full, clear it out.

Popularity: 7% [?]

Magento error: Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.

June 4th, 2011

Magento error:
Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.

Solution:
This error is caused by /app/etc/local.xml being readable by the world. Set the permissions to 551

Popularity: 11% [?]

How to check Plesk version and update the admin password

May 14th, 2011

You can type:

rpm -q psa

or

cat /usr/local/psa/version

The password is located under:

/etc/psa/.psa.shadow

Popularity: 7% [?]

rename multiple file with same extension in Linux

May 11th, 2011

I want to rename all files with .txt to .sh and wildcards don’t work to well with the rm command

here’s the trick:

for file in *.txt; do mv $file `basename $file .txt`.sh; done

Popularity: 9% [?]

Serve files with no extension as PHP

May 11th, 2011

So I recently wget mirrored a whole website and uploaded them to my web server. The PHP files from the original server had no extension and when trying to load them, Apache did not serve them as PHP, loading a bunch of jibberish.

To solve this problem, I had to edit .htaccess :


< FilesMatch '^[^.]+$' >
ForceType application/x-httpd-php
< /FilesMatch >

#OR

#AddHandler server-parsed .php

#SetHandler application/x-httpd-php

#AddHandler application/x-httpd-php .php

#OR

#RewriteEngine On
#RewriteRule ^[^.]+$ – [T=application/x-httpd-php,L]

Popularity: 8% [?]

Offline Browsing in Linux: wget and some tricks

May 11th, 2011

Ever since I joined Hostgator.com, I’ve been learning a lot of Linux in the hopes that I switch my career into Linux. Hopefully Forensics related.

So this new dilemma I had was to download a website for offline browsing. I went on the hunt for an offline file browser for Linux…. I found that I could use wget to mirror a whole website.

For example, I want to make a copy of blackberrysimunlockcode.com, Here’s how:

wget -m http://blackberrysimunlockcode.com

Here the -m option is telling wget to mirror the website. This is the basic command. But say I need some advanced options. What do I do?

I was trying to get all the script files off of a website to save for later learning and all it was downloading was the index.html and robots.txt
The robots.txt file was blocking user agent wget. To confirm this I used the debug option in wget:

wget -m -d http://blackberrysimunlockcode.com

You’ll get something like:

Not following http://blackberrysimunlockcode.com/privacy.shtml because robots.txt forbids it.

or

Rejecting path sh/eg/talk.sh.txt because of rule `sh’

or

no-follow in index.html

I tried using the option –user-agent “Mozilla” ….. no luck

I tried adding the following in .wgetrc :

## Local settings (for a user to set in his $HOME/.wgetrc). It is
## *highly* undesirable to put these settings in the global file, since
## they are potentially dangerous to “normal” users.
##
## Even when setting up your own ~/.wgetrc, you should know what you
## are doing before doing so.
##

header = Accept-Language: en-us,en;q=0.5
header = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
header = Accept-Encoding: gzip,deflate
header = Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
header = Keep-Alive: 300
user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
referer = http://www.google.com

…Still no luck.

The trick is to use option -e robots=off

So my new command became:

wget -m -k -e robots=off -w 2 --random-wait -U "Mozilla" -np http://blackberrysimunlockcode.com

Heres what the options do:

-m mirrors website
-k fix links so you don’t get directed to www.blackberrysimunlockcode.com/sh/eg instead of /sh/eg (relative vs absolute)
-e executes command robots=off
-w 2 sets wait time as 2 seconds so you don’t overload server and get ip blocked
–random-wait can be random in 2 secon increments
-U sets user agent
-np no parent, so if the current subdirectory/page links to parent pages, it might crawl whole website

Popularity: 8% [?]

Gizmo5 out of business?

March 4th, 2011

Well not really out of business, but I just got an email from them saying that customers would no longer be able to place calls after April 3, 2011. All credits can be converted into Google Voice or you can ask for a refund.

How am I supposed to make free calls with my android phone now?

Joomla Hosting at FiberLightning.com

Popularity: 11% [?]

Hello Kitty Snow Live Wallpaper 2 for Android

February 10th, 2011

Hello Kitty Snow Live Wallpaper for Android

WordPress Hosting at FiberLightning.com

Popularity: 12% [?]