Common Problems experienced with PHPSuphp

July 23rd, 2010

If your PHP scripts are reporting 500 Internal Server errors, please check the following:

Make sure the directory permissions are not greater than 755

Make sure the PHP file permissions are not greater than 755 - 644 is the default permissions for files uploaded by FTP and will work fine for most PHP files.

Make sure you do not have any .htaccess files which contain PHP flags/values or ForceType directives. These directives need to be handled differently, as explained above.


How to find and change existing users files permissions or ownerships to meet PHPSuexec or SuPHP guidelines ?

Set owner of all user files
Also you can run the following to ensure all users files are correctly owned.
You can do this running the following commands in shell as root;

for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess/public_html; done

for CPAccess in `ls -A /var/cpanel/users`; do chown $CPAccess:nobody /home/$CPAccess/public_html; done

Set permissions of all user files

find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

Cpanel Basics

How to install suphp

July 22nd, 2010

This article helps you to enable suphp on Linux servers with Cpanel..

Take the backup of httpd.conf and php.ini files.

cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bk

cp /usr/lib/php.ini /usr/lib/php.ini.bk

Now run
/scripts/easyapache

go through the options and select suphp and complete the steps.

Once it is done, login to WHM - onfigure Suexec and PHP

Change the PHP 5 Handler from DSO to suphp.

Click on Save New Configuration.

Done, You have completed the installation and now you can check the top command to see php processes will run with user name instead of nobody. But still apache processes run as nobody.

Now we have to change the ownerships and permissions….

Set owner of all user files

for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess/public_html; done

for CPAccess in `ls -A /var/cpanel/users`; do chown $CPAccess:nobody /home/$CPAccess/public_html; done

Set permissions of all user files

find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
find /home*/*/public_html -type f -perm 0777 -exec chmod 755 {} \;
find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

find the .htaccess files which contains php settings like php_value

find /home/*/public_html -name .htaccess -type f | xargs grep -rl php_

It will give the list, so you can comment the php settings and add it on php.ini

Apache , htaccess and Front Page

how to make php script work in html files using .htaccess

July 22nd, 2010

If you want HTML files parsed as PHP… You can write following in .htaccess file.

For web servers using PHP as apache module:

AddType application/x-httpd-php .html .htm

For web servers running PHP as CGI:

AddHandler application/x-httpd-php .html .htm

For web servers using PHP as suphp module:

AddType application/x-httpd-php5 .htm .html

Cpanel Basics

Windows Hosting control panel from Cpanel

July 19th, 2010

Finally we see feature rich windows hosting control panel from Cpanel Inc.
The below excerpts from their web site.
========
The control panel for Windows Server
It’s here! We’ve been working hard to develop the world’s only Windows web hosting control panel worthy of carrying the cPanel logo — and now it’s arrived.

The simple yet powerful Enkompass interface offers a rich assortment of features that can save your business time and money.

Top Business Features

* Reduce software licensing costs
Quickly add servers as your business grows, paying only for the licenses you need on each type of server.
* Gain access to 30% more market share
According to Netcraft, Microsoft IIS7 is is one of the two leading web server technologies, installed on over 60,000,000 servers worldwide.
* Reduce support costs
Single sign-on provides easier management, greater time savings, and the ability to add new resources.
* Accurate & fast reporting
Easily run reports on bandwidth utilization, disk space utilization, active accounts, resource availability and more, for instant access to valuable decision-making tools.
* Offer premium hosting plans
As a commercial technology, Windows® web hosting can command premium prices. This provides you the opportunity to increase your bottom line.

For more information visit http://www.cpanel.net/windows/overview.html

cPanel Help ,

Three Ways to Make Your Corporate Website SEO Friendly

July 19th, 2010

There is a slight divide between the corporate world and the online business world. No, it is not the suit-and-tie divide, which has seen corporate attire absent in dotcom start-ups since the 1990s, and it is not the difference in business plans or funding sources between the two worlds. It is the difference in website design and development, and it is a divide that is putting the bootstrapped online business world far ahead of its corporate rivals.

The problem is relatively clear when you visit a big company’s website. There’s content — lots of it — but there’s relatively little effort put forward into converting that content into anything. There’s a ton of information, a list of contact details that puts the Yellow Pages to shame, and massive potential for SEO work. However, very few big businesses put their SEO muscle to work, and more than a few settle for websites that simply do not sell their services.

As easy as it is to blame the lack of SEO on established buying practices — in store orders, online stores, and resellers — it’s not the total problem. Much of it is simply the fact that a lot of corporations simply are not well educated on the ultra-competitive SEO world, and view search as something other than a major priority. If your company is sounding similar, it is time to take a different approach, and to embrace search for the incredible sales and lead generation machine that it is.

These three suggestions could be the difference between an unknown business website and a conversion-powered one. Implement one, two, or all three and you are sure to see a world of difference in website traffic, online sales and orders, and noticeable online PR.

#1: Add a blog to your company website.
Blogs are great for SEO, and they are even better for grassroots PR efforts. By adding a blog to your company website, you introduce a human element to an otherwise stale website. Even a simple blog can add some massive SEO power to your website, and if it attracts attention it is easy to convert that readership into a massive SEO resource.

#2: Experiment with dedicated SEO.
External SEO firms are often a waste of money, especially for small businesses. However, when your online presence has the potential to sell millions of dollars worth of services, products, or coverage per year, it is in your best interests to open yourself to as many channels as possible. Search is the biggest online referrer, and the small cost of retaining an SEO company is quickly paid back in the incredible order boost that you’ll receive.

#3: Use in-house SEO to lower costs and boost awareness.
Hiring a full time SEO for your company is less expensive than you would expect. While contractors are good for temporary assignments and one-off SEO boosts, if you want a dedicated SEO presence it is best to invest in someone that can work for you full time. Experiment with contract work and temporary SEO at first, then decide whether it is worth the expense of a full SEO team.

Sign up at ehostpros.com web hosting account for $2.99/mo. and you can start blogging in no time. We also offer Reseller Hosting and Domain Name Registrations.

Search Engine Optimization

Cpanel backup problem.

February 15th, 2010

/scripts/cpbackup is taking only one account backup and giving a log message backup is completed.

Problem is there might be a file called /etc/cpbackup-skip.conf which has all users to skip the backup.

check and remove the file, so that backup will start run for all users.

Cpanel Basics

cPanel 11.25.0 provides mechanisms to prevent Cross Site Request Forgery attacks.

October 23rd, 2009
Comments Off

cPanel Security Advisory: CVE 2008-2043

Summary

cPanel 11.25.0 provides mechanisms to prevent Cross Site Request Forgery attacks.

Security Rating

This update has been rated as having an Important security rating by the cPanel Security team.

Description

All versions of cPanel prior to version 11.25.0 are vulnerable to cross site request forgery attacks. Cross-site request forgery, often abbreviated as CSRF or XSRF, exploits the trust a website has in a user’s browser. By exploiting that trust a malicious user can execute unauthorized commands on a website.

Solution

cPanel 11 users should upgrade to version 11.25.0 which contain mechanisms to prevent these types of attacks. To insure full protection, the following options in Tweak Settings are strongly recommended to be enabled:

  • Require security tokens for all interfaces. This will greatly improve the security of cPanel and WHM against XSRF attacks, but may break integration with other systems, login applications, billing software and third party themes.
  • Validate the IP addresses used in all cookie based logins. This will limit the ability of attackers who capture cPanel session cookies to use them in an exploit of the cPanel or WebHost Manager interfaces. For this setting to have maximum effectiveness, proxydomains should also be disabled.
  • Disable Http Authentication for cPanel/WebMail/WHM Logins (forces cookie authentication.) This will help prevent certain types of XSRF attacks that rely on cached Http Auth credentials.

In addition it is recommended the following Tweak Settings be disabled:

  • Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)
  • Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled it will add appropriate proxy subdomain DNS entries to all existing accounts. (Use /scripts/proxydomains to reconfigure the DNS entries manually)

Source from :

http://www.cpanel.net/2009/10/cpanel-security-advisory-cve-2008-2043.html

Cpanel Hosting News

How to login horde and neomail directly

October 12th, 2009

Fix for horde addressbook add entry issue, Horde Issue

October 12th, 2009

To correct the problem with the Horde address book not working correctly, you will need to SSH into your server as root, and type “mysql” to get a mysql prompt. Enter the following queries, and your problem should be fixed:

CREATE TABLE horde.turba_objects (object_id varchar(32) PRIMARY KEY,owner_id varchar(255),object_name varchar(255),object_alias varchar(32),object_email varchar(255),object_homeAddress varchar(255),object_workAddress varchar(255),object_homePhone varchar(25),object_workPhone varchar(25),object_cellPhone varchar(25),object_fax varchar(25),object_title varchar(32), object_company varchar(32),object_notes text);

insert into mysql.tables_priv values(”%”,”horde”,”horde”,”turba_objects”,”root@localhost”,now()+0,”Select,Insert,Update,Delete”,”");

flush privileges;

HOWTOs :: WHM/Cpanel Problems

WHM Skins

October 12th, 2009

On Cpanel Servers Skins are located at:
/usr/local/cpanel/lang/

If on any server some sking file is missing you can copy from another server like svr37 has all skins in its /usr/local/cpanel/lang/ directory and copy it to the svr without skin.
and name it spanish etc the lang. name

Then chown it to:
chown -R root.wheel languagename

HOWTOs :: WHM/Cpanel Problems