Statements in .htaccess resulting in 500 error


Hi,

Whenever a php script requires write access to a file or directory, you have to chmod that directory (or file) to 777 (or 666 for files) on most servers. This is because on most servers apache and php runs as user ‘nobody’.
Although giving world write access will make it possible to use the script, it also means a security hole, which can be used by hackers.

To avoid this security hole some ISP’s install phpsuexec on their servers. Using phpsuexec php runs under your own username on the server. This removes the necessity to make files and folders world writable. Instead you can just use 755 for folders (the default) and 644 for files (also the default).

But using phpsuexec will result in an error 500 (internal server error) for some statements in .htaccess.

For this, you need to make sure, that whenever you are using files with (or without) an extension different then the normal extension for that filetype you can use ForceType in your .htaccess file to make it clear to the server how to handle that file (or all the files in the folder) (this works on servers without phpsuexec).

??? ForceType application/x-httpd-php

However, when your server uses phpsuexec this will result in an internal server error. To solve this you can simply use SetHandler instead of ForceType, so your .htaccess-file becomes:

??? SetHandler application/x-httpd-php

On a server without phpsuexec it is possible to use the php_value statement in a .htaccess-file to change settings of php (actually overwrite the settings from php.ini).

On a sever with phpsuexec this will also result in a server error. To solve this you can use a php.ini file which you put in the same folder as where you would have put your .htaccess file. In that php.ini file you can change all the php values. You only have to put the values you want to modify in that file. Let me give one example if you want to set the short_open_tag to Off you would have used short_open_tag? = off in your .htaccess file. Using a php.ini file this results in:

[php]

short_open_tag = Off

Disk Space Concept


What is Disk Space Concept and how it is related to Individual Resource Quotas and summary disk usage ?

Plz. tell me

Your account allows you to host your website, store incoming and outgoing mail, create and manage databases. These tasks require disk space on the hosting servers provided to you through individual resource quotas. Your account’s plan may be, also, configured with summary disk usage to control disk space usage on an overall basis for all your disk space consumig resources combined together.

Individual Resource Quotas

Quotas are set separately for your home directory, each mailbox and DB and define how many MB you can store in it. You can’t upload and store more MB than the resource’s quota allows (except for MySQL DBs and PgSQL DBs) and will get an error message if you try to do so. Every 5 minutes the system scans your home FTP directory, mailboxes and DBs to see how much disk space is being used and updates the corresponding quota usage readings, so you can always check how many MB are being used by the resource and how many more MB can be uploaded.

Increasing Quotas

To upload more MB than the resource’s quota allows, you can increase it.
Learn how to increase quota for:

* your home directory
* mailbox
* MySQL DB
* PgSQL DB
* MS SQL DB

Resources’ quotas can be max restricted which means you won’t be able to increase it any higher when this limit is reached. To check how much you can increase your quotas to, go to Billing -> Online price and check the Max field in the quota’s entry.

Summary Disk Usage

Average and Last Day Summary Disk Usage

Every 24 hours the system scans your FTP home directory, each of your mailboxes and DBs to summarize disk space used by these resources which makes summary disk usage for the last day. Summary readings of each daily scan are added up and divided by days elapsed from the beginning of the billing month to make your average summary disk usage. If your hosting plan is configured with the summary disk usage resource, you will see both figures on your Account -> Quick Access page:

MySQL – Priviledges


Most of web developers are now using PHP with MySQL,

Each user role involves a fixed set of privileges on specific database:

Role: Set of privileges:
read select
read/write select, insert, delete, update
dba select, insert, update, drop, create, alter, index

Mail resources with web Your hosting plan


Hi,
I m looking to purchase a web hosting account from cpwebhosting.net.Which Mail resources you provides with your web Your hosting plan.

following mail resources are provided by cpwebhosting.net:

* mailbox to send, receive, read and store e-mails
* mail forward to automatically forward all incoming mail to a list of remote addresses
* mailbox alias to have an alternative address to an existing mailbox
* mail autoresponder to automatically reply to senders with a uniform response when mail arrives in a mailbox
* mailing list to send mail to multiple recipients
* mail domain alias to have an alternative domain name to a mail domain

Hosting mysql php web


cpwebhosting.net does provide the Hosting facility with PHP MySQL.
With PHP and MySQL database, you can store information on the web and then you can include that information on your websites.
With the use of PHP MySQL I have been doing lot of things, my websites are being hosted on the http://www.cpwebhosting.net like Banner Rotation, Databases, Forums, Websites.
* Banner Rotation. On this site, where each banner is, a PHP script is called. This opens a database and picks a random banner from it to show the visitor. It also counts the number of times the banner has been viewed and could, with a few changes, track clicks too. To add, change or edit the banners all I have to do is change the database and the script will pick the correct banners for all the pages on the site.
* Forums. Hundreds of forums (message boards) on the internet are run using PHP and MySQL. These are much more efficent than other systems that create a page for each message and offer a wide variety of options. All the pages in the forum can be updated by changing one script.
* Databases. One quite obvious example is sites which get all there information from a database. For example Script Avenue is run by a few scripts, which gain all their information from a large database. All the different script categories can be accessed in one script by just changing the URL to access a different part of the database.
* Websites. If you have a large website and you want to change the design it can take a very long time to update and upload all the pages. With PHP and MySQL your whole website could be just one or two PHP scripts. These would access a MySQL database to get the information for the pages. To update the website’s design you would just have to change one page.

H-Sphere was down


My H-Sphere was down, and when it finally came up, it gives me 500 error when accessed by browser.

Seemingly your PostgreSQL database is down. If you use Linux, restart it with the command:
etc/rc.d/init.d/postgresql restart

Logging problem


I have created a reseller account, logged in, but can’t enter admin cp.

Make sure:
– you have configured DNS for reseller
– you are using a registered domain.
If you need to use an unregistered domain for your own use only, add this domain to your hosts file (/etc/hosts on *nix systems)

CGI Scripts


Web pages can be executed as CGI scripts. CGI scripts are executables that will execute on the server to produce dynamic and interactive web pages.

Cpwebhosting.net does provide CGI capabilities which offers preinstalled, ready to run, guest-books, page-counters, and chat-forums solutions written in CGI scripts.

The use of CGI is most common on Unix or Linux servers.

H-Sphere templates


I have a web hosting account with H-Sphere control panel. can anyone tell me what are H-Sphere templates.

H-Sphere templates is basically what lays behind the H-Sphere Control Panel Web interface. For the most part, templates are written using Freemarker Java processing language for dynamic content generation.

What is the Location of Templates in H-Sphere control panel.

Location of Templates

1) Template root directory
2) Default (common) design directory
3) Custom template directory

InTemplate root directory:-

H-Sphere template root directory is by default /hsphere/local/home/cpanel/shiva-templates. It is set by the TEMPLATE_PATH parameter in the ~cpanel/shiva/psoft_config/hsphere.properties file:

TEMPLATE_PATH = /hsphere/local/home/cpanel/shiva/shiva-templates/

2) Default (common) design directory

Design, or skin, is the Control Panel GUI representation. Each design is defined by its own sets of templates, images, CSS styles, JavaScripts, etc. The most important part of GUI, templates, are placed in separate subdirectories of the template root directory in accordance to a design they belong to. The special common subdirectory is used to store templates that are the same for different designs. Also, this directory contains templates for the Left Menu design which is the default H-Sphere design. The path to this directory, relative to TEMPLATE_PATH, is set in hsphere.properties:

DEFAULT_TEMPLATES = common/

3) Custom template directory

Custom template directory is usually /hsphere/local/home/cpanel/shiva/custom/templates. Its location is set in hsphere.properties:

USER_TEMPLATE_PATH=/hsphere/local/home/cpanel/shiva/custom/templates/

Custom templates directory structure should correspond the default template root directory (shiva-templates) tree. However, you should be aware that templates in the custom template directory override the corresponding templates in the default template directory, thus all modifications and new features in existing default templates coming with new H-Sphere releases would be also overriden by custom templates. Therefore, only customized templates should be placed to your custom template directory.

Types of Templates

* System E-Mail Notification Templates
* Skeletons
* Web Interface Templates
o Main Templates
o Control Templates (Controls)
o Submit Templates (Submits)
o Function Templates
o Templates For Special Purposes
o Context Help Templates

Choosing A Scripting Language For Your Web Site


Choosing A Scripting Language For Your Web Site!

Building Web pages and databases today is easier than ever before. The real trick is expertly integrating the two together so that some Web pages can let visitors input data from HTML forms while other pages display database information. The answer lies in server-side scripting frameworks such as ASP.NET, ColdFusion, JSP, PHP and Perl. These frameworks let you write HTML documents with islands of code embedded in them.