To use custom PHP.ini on DreamhostPS or Dreamhost VPS, I did a lot of research. Actually search, or Google.
When I working on the Dreamhost Virtual hosting, I get the answer from Wiki of Dreamhost. But there are not enough information of PS on it.
The best answer from Google is here, from Dreamhost Scripts and Tips.
Continue reading “Custom PHP.INI on Dreamhost PS”
Install a customized PHP5 on Dreamhost can help you to make php work better and work more. That means you can add more extension on it.
Let’s go to the details of installation.
Install/Compile PHP 5
1) Copy the PHP5_installscript (see the last portion of this post) into a text editor and replace YOUR DOMAIN HERE on the 4th line with your site’s domain name. For example your domain is abc.com, you need to add it same as it.
2) Copy the new contents to your clipboard.
3) Log in to your account using SSH, create a new folder as temp and cd temp.
4) Create a new file in your SSH by entering the command:
5) Hit i for insert mode, then right-click to paste your clipboard (the install script) contents, then hit Esc, type :wq (that’s ‘colon’, ‘w’, ‘q’), and press Enter to save and exit.
6) Make the file executable by entering the command:
chmod +x installscript
7) Run the script by entering the command:
8) After it has finished you will need to edit your htaccess file appropriately. Add the following:
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
Deny from All
Allow from env=REDIRECT_STATUS
to a file called .htaccess and place it in the root folder of your domain you specified above (/home/YOUR USERNAME/YOUR DOMAIN HERE/.htaccess)
I have a post tell you how to install PHP 5.2.0 on Dreamhost in Chinese last December.
Continue reading “Install customized PHP5 on Dreamhost”
The 404 error or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with the server but either the server could not find what was requested, or it was configured not to fulfill the request and not reveal the reason why. 404 errors should not be confused with “server not found” or similar errors, in which a connection to the destination server cannot be made at all.
The default 404 error page is very ugly. Too simply and no way for user to get the useful information.
I would like to tell you how to make a customized one and what we need to put on this page.
1) Creating/Modifying the .htaccess File
In Apache web server, find the .htaccess file in the root of the website. Create new one, if you can not find that it.
Add the following code and save it.
ErrorDocument 404 /404.html
You will of course need to put a 404.html file in the main web directory for the above directive to work.
“ErrorDocument 404” will tell the server when the file requested can not be found, the /404.html will be displayed with HTTP status code 404.
2) Prepare your own 404 error page.
Use any editor to make your own 404.html
I prefer to put following information on this page.
* Tell user the page can not be found on the server;
* Which reason. For example the file is removed or moved from one folder to other foler.
* Give a site-wide search box. Let user has a way to search the correct page within the site.
* Put some category links.
* Add tag cloud, if you site is a blog.
3) Test the 404 error page
When finish your own page, it is time to test it.
Just type a URL, you know it is not exist.
The following screenshot is my current customized 404 error page.
Continue reading “Make a customized 404 error page”