Sendmail on Ubuntu
Install Sendmail on Ubuntu
I also need my php applications to be able to send our email using the mail function. Therefore I need to install sendmail and enable it in my php.ini file.
Install Sendmail
apt-get install sendmail
Check its working
ps -aux | grep sendmail
Change php.ini
replace ;sendmail_path = with sendmail_path = /usr/sbin/sendmail
Config Sendmail
sudo sendmailconfig
Change your host files
homename /etc/hosts 127.0.0.1 localhost.localdomain localhost myhostname
Changing Plesk Fast CGI to Apache PHP with ZF
So recently I’ve had to change the php mode from Fast CGI to Apache Module in plesk due to the http authenticate functions in php not working. This caused my Zend Framework website to produce a 500 error, in my case it was something to do with:
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()
The reason for the error is that the session already existed from my first visit and CGI was the owner, when I changed it to Apache module apache did not have permission to change the session data. The solution, shut down your browser (or start a privacy mode) and then try and view your website. Everything should work fine afterwards.
Share Folders on Unbuntu VBox with Windows
These instructions assure you are using Windows as your host and Ubuntu as the client machine. I am using vbox 4 and Ubuntu 10.04 LTS. I had loads of issues getting this to work with other tutorials and forum posts. I kept getting errors like:
/sbin/mount.vboxsf: mounting failed with the error: Protocol error /sbin/mount.vboxsf: mounting failed with error: No such device
Here is my method which worked for me and hopefully for you as well.
Stage 1. Install Guest Additions. If you have done this already skip this stage.
- Start Ubuntu and click devices in the vbox window, the select install Guest Additions
- This should put a cd icon on the Unbuntu desktop, double clicking should open a folder.
- Click “Open Autorun Prompt” then wait for it to install.
- Shut down Ubuntu from within the client.
Stage 2. Add the shared folder
- Open up VirtualBox control panel.
- Right hand click on the box you want to share a folder with
- Go to share folder, add a folder and tick Auto-Mount and Make Permanent
- Click OK and start your Ubuntu vbox
Stage 3. Give Your User Permission
- You need to add your user to the vboxsf group.
- Click system->administration->Users and Groups
- Click Manage Group -> scroll down, scroll down and click vboxsf. Then click properties.
- There should be a list of Group Memebers, make sure your user is clicked (by default your user will be called Ubuntu).
- Close everything and restart from within Ubuntu, not vbox control panel.
Stage 4. Done
- Once Ubuntu starts your shared folder can be found in “File System/Media/”
How to Install InstantSSL on Plesk
To install an Comodo InstantSSL on plesk you need to do two steps, 1. create a csr then upload it, 2. install the certificate comodo send to you (this is the bit that Comodo’s documentation is crap).
Create a CSR
- In Plesk go to the domain you want a SSL for
- ClickSSL certificates
- Click ‘Add SSL Certificate’
- The name can be anything but make sure the rest of the fields are filled in correctly. Make sure you select 2048 bits
- Click Request (you will be redirected back to the certificate index page)
- Select the certificate you just requested, scroll down and the csr should be shown
- Go to comodo and upload the csr when they ask for it.
Istall InstantSSL on Plesk
This is the bit that is confusing as the Comodo documentation doesn’t match the files they send you. You should recieve three files:
- www_domain_com.crt
- AddTrustExternalCARoot.crt
- UTNAddTrustServerCA.crt
If you have move files read the following but then look at the troubleshooting section as well.
Go back to Plesk and the certificate section.
- Paste www_domain_com.crt into the certificate textarea
- Paste AddTrustExternalCARoot.crt into the CA Certificate textarea
- Paste UTNAddTrustServerCA.crt into the CA certificate textarea directly below the AddTrustExternalCARoot.crt
- Click send text
In plesk go back to the domain overpage, click ‘web hosting settings’ and you should see the certificate you just created.
Troubleshooting
- If comodo sent through more than the files listed above paste them into the CA certificate in this order (EssentialSSLCA.crt ComodoUTNServerCA.crt UTNAddTrustServerCA.crt AddTrustExternalCARoot.crt)
- Check the domain has a exclusive IP address
- Check the certificate pasted into the textarea are in the correct order
- Check the comodo support site (even though it is rubbish).
Hopefully this has helped a few people as every time I have to install a instantSSL I alsways forget which order to do what.
Install APC on Ubuntu with PHP 5.3
Installing the APC with PHP5.3 is straightforward (when you know how):
1. Install the required packages:
sudo apt-get install php-pear php5-dev apache2-threaded-dev
2. Install APC:
sudo pecl install apc-3.1.4
3. Create file /etc/php5/conf.d/apc.ini with the following content:
extension=apc.so
4. Restart Apache:
sudo /etc/init.d/apache2 restart
After restarting the Apache2 web server apc.ini section should be included in the phpinfo() output.
Recent Posts
- How to get environment in Symfony2
- How to make a Symfony2 Twig Extension
- How to ipconfig/flush dns on Mac OSX
- Diary of a Startup: Create a startup for £14
- Sendmail on Ubuntu
- Adobe Air with Netbeans
- Best Firefox Plugins for SEO aka Addons
- Setup Ubuntu as a Web Server
- Changing Plesk Fast CGI to Apache PHP with ZF
- How to Access PUT data in Zend Framework
My External Links
Twitter Updates
- What I do when my mum calls me for help using her computer xkcd.com/627/ via @neil_pie 1 day ago
- Fancy this? @bwaine @WillBooth Hackathon London #hackldn - An Event for developers and Startups hackathonlondon.com via @hackathonldn 1 day ago
- New Kings Cross, much much better @ Kings Cross St Pancras New Departures Hall instagr.am/p/KAi6iNs_-6/ 2 days ago
- Cine: Ed and Rob cinemagr.am/show/5227880 #cinemagraph #gif 3 days ago
- The 8 Signs That You Have an Extraordinary Boss inc.com/geoffrey-james… 4 days ago
- How Social Media Is Taking Over the News Industry [INFOGRAPHIC] mashable.com/2012/04/18/soc… via @mashable 1 week ago
- UK's largest water feature. Cost £24.4m in Bradford @ City Park instagr.am/p/JuaRBxs_yK/ 1 week ago
- RT @lucywardleeds: Hilarious! Newcastle got our score wrong and have reported winning the title nufc.co.uk/articles/20120… @ed_liddell 1 week ago
- Zombie google maps fastcodesign.com/1669550/zombie… 1 week ago
- The worst names for variables in code petdance.com/2012/04/the-wo… 1 week ago
Archives
- April 2012
- March 2012
- January 2012
- December 2011
- November 2011
- September 2011
- August 2011
- June 2011
- May 2011
- March 2011
- February 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- March 2010
- February 2010
- January 2010
- November 2008
- September 2007
- June 2007
- May 2007
- April 2007




