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/”
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.
How to Enable SSL on Xampp with Vhosts
If you need to enable SSL on Xampp whilst stilling using vhosts, follow the next few steps. It assumes that you already have vhosts enabled.
Open xampp/apache/conf/extra/httpd-vhosts.conf
Around line 19 you should see “NameVirtualHost *:80″, below this line add “NameVirtualHost *:443″ (without quotes)
Then add a new vhost site just like a normal one but with *443 instead on *80 and the following lines:
SSLEngine on SSLCertificateFile conf/ssl.crt/server.crt SSLCertificateKeyFile conf/ssl.key/server.key
An example of this is:
DocumentRoot "C:/xampp/htdocs/myproject/public" ServerName mysite.local ServerAlias mysite.local SSLEngine on SSLCertificateFile conf/ssl.crt/server.crt SSLCertificateKeyFile conf/ssl.key/server.key
Restart Xampp apache and everything should work fine.
Recent Posts
- Diary of a Startup: I’ve Just Applied to Seedcamp
- 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
- 30 minutes until 30!
- Google Analytics Benchmarking Newsletter July 2011
My External Links
Twitter Updates
- I'm at Earls Restaurant (229 Banff Ave, Wolf St, Banff) http://t.co/mYqKENLt 3 days ago
- New Local Dark Ale. Lovely @ Earl's - Banff http://t.co/otFtzHbQ 1 week ago
- I'm at Calgary International Airport (YYC) (2000 Airport Rd. N.E., Calgary) w/ 7 others http://t.co/IRI8zsHj 1 week ago
- I'm at BA Galleries Club Lounge South (at Terminal 5, LHR Airport, Heathrow) w/ 3 others http://t.co/FikQ8bSQ 1 week ago
- I'm at Terminal 5 (LHR Airport, 234 Bath Rd., Hounslow) w/ 8 others http://t.co/IbyWsNNf 1 week ago
- I'm at Yum Yum (5B Brewery Place, Brewery Wharf, Leeds) http://t.co/DKzTstpt 2 weeks ago
- RT @YahooFinance: The Case for a 21-Hour Work Week http://t.co/UFru9Pwy 3 weeks ago
- How Facebook's Expected $100 Billion IPO Breaks Down [INFOGRAPHIC] http://t.co/GxGMffP6 via @mashable 3 weeks ago
- I'm at Old Broadcasting House (Leeds Metropolitan University, at Civic Quarter, Leeds) w/ 4 others http://t.co/8M32KNy5 3 weeks ago
- Start 2012 by Taking 2 Minutes to Clean Your Apps Permissions. http://t.co/ltxMfrow 1 month ago




