Drupal .module extension treate as php file (syntax color) in Eclipse
Eclipse comes with a nice solution for these kind of situations.
All you need to do in order for Eclipse to treat .module extensions as .php is to go to
Window Menu > Preferences > General > Content Types > (Select) Text > PHP Content TYpe from the Content types area, then below under
File Associations click on Add button and write down any extension you wish. In Drupal CMS case, write down “.module”.
Now you should be able to work with .module files as with all other .php files.
Top 10 Drupal Modules
His list is as shown below, in priority order:
- Content Construction Kit
- Views
- Tagadelic
- Path and Pathauto
- Organic Groups
- Buddylist
- Privatemsg
- Guestbook
- Logintoboggan
- Service Links
You can read Paul Koura's blog post including comments about each module here:
http://webpodge.com/2007/02/22/top-10-drupal-modules/
Easy to under standing File Upload in PHP
http://www.sebastiansulinski.co.uk/web_design_tutorials/php/php_file_upload.php
change the PHP Max Upload file size
I tried much but some of file uploded and some of not for multipul file upload.
search some solution for that.
Most of the web servers are configured such a way that a user can only upload the maximum file size of 2MB.anything more will yield an error 500 due to a timeout. So there might be the problem for the people who wants to upload the .media file of size around 15MB. But, you can increse the maximum upload file size limit describe below.
There are two ways (that I know of) to change the php upload limit.
(1) changes in php.ini
The first is done by editing the php.ini file. This is normally the case if you have your own dedicated or virtual server. There may be multiple php.ini files throughout your system. The main one is typically found in /etc/php.ini which would govern all PHP. scripts.Furthermore you can include php.ini file in each folder that you wish to apply different settings to. In any case the, below are the fields you want to change.
upload_max_filesize = 10M ;
post_max_size = 20M ;
(2) by .htaccess
An alternative is to using the php.ini file is to use .htaccess. By just placing a.htaccess file in your root folder. the following directive would be placed in .htaccess file
RewriteEngine On
php_value post_max_size 20M
php_value upload_max_filesize 10M
php_value max_execution_time 6000000
Remember that : Choose your values carefully, know your audience and monitor the number of users. Always test/plan for worst case scenarios; 500 users uploading 10mb at the same time = 5,000mb bandwidth. This could easily annoy your web host provider.
If you are on windows with IIS server .htaccess file will not work for you,You should update these settings in php.ini file.
Advantages of PHP Programming
The execution speed of a web applications is very important as it cannot afford to slow down the rest of the machine, either. PHP integrates well with other software, especially under UNIX. It can be very fast, because it is a thin wrapper around many operating system calls.
PHP offers various security levels which can be set in the .ini file to defend the system from attacks of users, both as programmers and as surfers.
Another important advantage of PHP is its simplicity. Even HTML coders can integrate PHP programming straight into their pages.
Further Advantages of PHP Programming include:
* Ease of writing interfaces to other libraries.
* Several HTTP server interfaces.
* Large amount of database interfaces like MySQL, MS SQL, Oracle, Informix, and PostgreSQL etc.
* PHP programming is similar to C / JavaScript and Java.
* PHP is extendible.
* PHP will run on (almost) any platform.
* The PHP Extension and Add-on Repository.
* PHP is Open Source.
Reference from : http://www.eninteractive.com/Offshore-Outsourcing/Web-Application-Development/Programming/PHP-Advantages
Different types of WebHosting
Free Hosting
Some service providers offer free web hosting.
Free web hosting is best suited for small sites with low traffic, like family sites or sites about hobbies. It is not recommended for high traffic or for real business. Technical support is often limited, and technical options are few.
Very often you cannot use your own domain name at a free site. You have to use a name provided by your host like http://www.freesite/users/~yoursite.htm. This is hard to type, hard to remember, and not very professional.
| Good: | Bad: |
|---|---|
| Low cost. It's free. | No domain names. |
| Good for family, hobby or personal sites. | Few, limited, or no software options. |
| Free email is often an option. | Limited security options. |
| Limited or no database support. | |
| Limited technical support. |
Shared (Virtual) Hosting
Shared hosting is very common, and very cost effective.
With shared hosting, your web site is hosted on a powerful server along with maybe 100 other web sites. On a shared host it is common that each web site have their own domain name.
Shared solutions often offer multiple software solutions like email, database, and many different editing options. Technical support tends to be good.
Cost: $15 per month.
Best for: Small businesses who receive moderate levels of traffic.
| Good: | Bad: |
|---|---|
| Low cost. Cost is shared with others. | Reduced security due to many sites on one server. |
| Good for small business and average traffic. | Restrictions on traffic volume. |
| Multiple software options. | Restricted database support. |
| Own domain name. | Restricted software support. |
| Good support |
VPS hosting
VPS (Virtual private server also referred to as Virtual Dedicated Server or VDS) hosting is a great stepping stone between shared and dedicated hosting. A single physical server is partitioned into multiple virtual private servers, and each VPS gets a dedicated amount of CPU and memory resources. Therefore, even if a VPS on the same server crashes, your VPS won't suffer. Also, a VPS gives you more control over server, software, and security configuration than shared hosting.
Cost: $60- $100 per month.
Best for: Small and medium businesses who need special server configuration and secure eCommerce capabilities.
Dedicated Hosting
With dedicated hosting your web site is hosted on a dedicated server.
Dedicated hosting is the most expensive form of hosting. The solution is best suited for large web sites with high traffic, and web sites that use special software.
You should expect dedicated hosting to be very powerful and secure, with almost unlimited software solutions.
Cost: starting at $150 per month
Best for: Companies who outgrow VPS hosting, or new companies who have the need and budget.
| Good: | Bad: |
|---|---|
| Good for large business. | Expensive. |
| Good for high traffic. | Requires higher skills. |
| Multiple domain names. | |
| Powerful email solutions. | |
| Powerful database support. | |
| Strong (unlimited) software support. |
Collocated Hosting
Collocation means "co-location". It is a solution that lets you place (locate) your own web server on the premises (locations) of a service provider.
This is pretty much the same as running your own server in your own office, only that it is located at a place better designed for it.
Most likely a provider will have dedicated resources like high-security against fire and vandalism, regulated backup power, dedicated Internet connections and more.
| Good: | Bad: |
|---|---|
| High bandwidth. | Expensive. |
| High up-time. | Requires higher skills. |
| High security. | Harder to configure and debug. |
| Unlimited software options. |
Your Checklist
Before you choose your web host, make sure that:
- The hosting type suits your current needs
- The hosting type is cost effective
- Upgrading to a better server is a possible solution
- If needed, upgrading to a dedicated server is possible
Before you sign up a contract with any hosting provider, surf some other web sites on their servers, and try to get a good feeling about their network speed. Also compare the other sites against yours, to see if it looks like you have the same needs. Contacting some of the other customers is also a valuable option.
APACHE SERVER STATUS & ERROR CODES
401 - Authorization Required
This error code means that you must have special access to view this page. The developers may want only certain people to access this page. There are several ways to limit access to a web page, including password protection. You may get the “401 - Authorization Required” error message when you try to view a web page with limited access. (A web site may have a customized version of this error message, displaying “Access Denied” or “Unavailable.”)
403 - Forbidden
This standard error message is generated by web servers when you try to access a file that has not been correctly configured by whomever maintains it. (The file needs to be set with “read permissions” for all users.) What this code most likely means is that you can’t view the page because whomever maintains the site set it up incorrectly.
404 - Page not found
A 404 - Not Found error means that there was no web page with the name you specified at the web site. This could happen for a variety of reasons:
Make sure that the web address (URL) that you typed in exactly matches the address you were given. Check that the capitalization matches, that all words are spelled properly, and that all the punctuation, like dots (.) and slashes (/), are correct. Be sure you are using the forward slash (/) and not the backward slash (\). (Remember, there are no spaces allowed in Web addresses, and a proper Web address will look like http://www.htmlcenter.com).
The page may have been renamed, moved, or deleted. Another possibility is that the person maintaining the web page may no longer have an account at that location.
500 - Page not available
If the server has been incorrectly set up or is experiencing technical problems, it will return this error. Again the first thing to do is make sure that you have typed in the address correctly.
501 - Not Implemented
This error is a direct result of problems in the web page’s HTML (HyperText Markup Language). It usually occurs with web pages that contain forms in which you type information and send it to a third party.
| Successful Client Requests | ||
| 200 | OK | |
| 201 | Created | |
| 202 | Accepted | |
| 203 | Non-Authorative Information | |
| 204 | No Content | |
| 205 | Reset Content | |
| 206 | Partial Content | |
| Client Request Redirected | ||
| 300 | Multiple Choices | |
| 301 | Moved Permanently | |
| 302 | Moved Temporarily | |
| 303 | See Other | |
| 304 | Not Modified | |
| 305 | Use Proxy | |
| Client Request Errors | ||
| 400 | Bad Request | |
| 401 | Authorization Required | |
| 402 | Payment Required (not used yet) | |
| 403 | Forbidden | |
| 404 | Not Found | |
| 405 | Method Not Allowed | |
| 406 | Not Acceptable (encoding) | |
| 407 | Proxy Authentication Required | |
| 408 | Request Timed Out | |
| 409 | Conflicting Request | |
| 410 | Gone | |
| 411 | Content Length Required | |
| 412 | Precondition Failed | |
| 413 | Request Entity Too Long | |
| 414 | Request URI Too Long | |
| 415 | Unsupported Media Type | |
| Server Errors | ||
| 500 | Internal Server Error | |
| 501 | Not Implemented | |
| 502 | Bad Gateway | |
| 503 | Service Unavailable | |
| 504 | Gateway Timeout | |
| 505 | HTTP Version Not Supported | |