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
Adobe Air with Netbeans
I love Netbeans, it’s by far my favourite IDE for developing PHP applications. Recently, I’ve needed to create an Adobe Air application and from what I remember the best free IDE on windows for this was Aptana, which is ok however I found it a little slow (and I already know all the Netbeans shortcuts). So what I really wanted to do was developed Adobe Air with Netbeans, and you can…
The video below shows you step by step however it’s 5 minutes long and I can explain in 5 lines.
- Download the Adobe Air SDK, unzip.
- Open Netbenas, Create a new PHP Project
- On the 3rd page of creating a new project (Run Configuration) choose Run As: Script (run in command line)
- Then choose AdobeAIRSDK\bin\adle.exe as the PHP Interpreter
- The final step which isn’t in the video, (after creating the index.html file and application.xml file) click the Run Project button and it will ask you for Run Configuration, makes sure you choose application.xml as the Index File NOT index.html.
Hopefully this will work for you as well!
Best Firefox Plugins for SEO aka Addons
Probably the best browser for SEO and Web Development (although prefer Chrome for surfing the net). This is mainly because of the wide variety of addons/plugins available.
Recommended Addons for SEO:
- Firebug
- Page Speed
- SEOQuake
- SEO For Firefox
- Google Toolbar (for page rank – doesn’t work on FF7+)
- Search Status
- SEOMoz Toolbar
- User Agent Switcher
Setup Ubuntu as a Web Server
So these are the general steps for setting up a web server (Apache, MySQL and PHP) on a Ubuntu server. If you are not sure on how to use unix command line see: http://www.leonardaustin.com/technical/ssh-commands
Install Apache MySQL and PHP
sudo tasksel install lamp-server sudo /usr/sbin/apache2ctl restart
Install mod_rewrite
sudo a2enmod rewrite sudo /usr/sbin/apache2ctl restart
You also need to find this file:
/etc/apache2/sites-available/default
and change “AllowOverride None” to “AllowOverride All” it appears a couple of times.
Install PHPMyAdmin
sudo apt-get install phpmyadmin
“In /etc/apache2/apache2.conf” Add “Include /etc/phpmyadmin/apache.conf”
The restart apache
sudo /usr/sbin/apache2ctl restart
Install XBedug – Optional for DEV only
sudo apt-get install php5-dev php-pear sudo pecl install xdebug
# Make a note of the location of the xedebug.so then create a xdebug.ini with the below info and put it into “/etc/php5/conf.d”
; xdebug debugger zend_extension="/usr/lib/php5/20060613/xdebug.so" # IN php.ini file make sure html_errors = true sudo /etc/init.d/apache2 restart
PHP Important Folder and Files
# /etc/php5 # /etc/php5/apache2/php.ini
Apache Important Folder and Files
# /etc/apache2/ # /etc/apache2/apache2.conf # /etc/apache2/sites-available/default
Web Folder
# /var/www
Other Steps
Change php.ini errors to show all
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.
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




