Whats a great dev setup for working with PHP + MySQL?
-
19-09-2019 - |
Question
I've been a PHP Dev for many years now, and it just dawned on me that maybe I could be using better development tools.
For example, my typical setup for development is
- Notepad++
- Dev WAMP Server (local machine usually)
- CodeIgniter framework (lately I've fallen in love with it, as it speeds up deployment for me, big time.)
- phpMyAdmin (for MySQL of course).
If you are a PHP dev, whats your typical setup? Eclipse (too bulky for me at times)? etc;
I'm curious if I am missing something that might save me a ton of time, like some kind of on the fly PHP code validator (before I hit F5 and then debut what the error is). I currently achieve somewhat of a 'validation' by seeing the color highlights in Notepad++.
Solution
This is what works for me:
Server stuff (emulates my RHE deployment server):
- Apache 1.3 and 2.2
- mod_security
- PHP 4 and 5
- MySQL
- MDaemon mail server (old 3-user version just for testing mail())
- ImageMagick
- ffmpeg
Code writing:
- Notepad++
- a custom command in shortcuts.xml to open the PHP manual on the selected function
- another custom command to run PHP in lint mode (
php.exe -l
) on the code file - yet another custom command to run RATS scanner on the same
- poEdit for I18N
Template editing:
- Smarty
- the Notepad++ User Defined Language file for Smarty
- another custom command to run smarty-lint
- my own Notepad++ autocomplete file for Smarty
Debugging code and templates:
- Xdebug
- the Xdebug Helper extension for Firefox
- the DBGP plugin for Notepad++
- WinCacheGrind for profiling
- Firebug with FirePHP
- modified Smarty debugger that outputs to FirePHP
- dBug
- Tail for Win32 to read the error logs in realtime
Database stuff:
- HeidiSQL to manage MySQL
- SQLite Manager for Firefox
- ADOdb
- MyEnTunnel for remote connections via SSH
- rarely used: SQLite 2009 Pro, MySQL Workbench, DBDesigner4
Other useful stuff:
- a Subversion server with TortoiseSVN and Winmerge
- Keynote NF to store code snippets
- Filezilla with Notepad++ set as default editor
- Ndexer (modified to add support for Notepad++) for searching the code archive
- the Regex Coach
- Fiddler2 with JsonViewer
- Nikto vulnerability scanner
- PhpSecInfo
- Doxygen
- miniPHP Studio to make desktop applications with PHP
Almost all this stuff is open source and actually useful.
OTHER TIPS
As much as I hate Eclipse, I still use it because of it's ability to associate projects and provide the "jump into" functionality with F3. I'd really love an alternative, but Netbeans can't seem to get their intellisense working with the built-in PHP functions ("PHPDoc not found"), and I haven't found any other IDE that I like.
My toolset consists of:
- Eclipse
- Ultraedit (for quick editing and file/grep functionality)
- Apache and PHP as separate installs
- MySQL Administrator
I highly recommend MySQL Administrator... it's an excellent tool.
One thing I'll mention as well is my method of setting up web applications with Apache. I generally edit my hosts file and add an entry like this:
127.0.0.1 myapp.example.com
Then set up the apache config to have a <VirtualHost:80xx>
on a separate port for each app I'm working on. With this method I never have any cookie-setting problems, and I can make each application accessible from outside my router by opening individual ports. This is great for showing clients the latest developments, but having full control over all the projects I'm working on. A simple config file controls the application's main URL, so when I'm ready to move code to production, a quick change is all it takes.
Zend Studio is my favorite, it's built off of eclipse
Since you're on windows, I can highly recommend HeidiSQL over PHPMyAdmin for working with MySQL. PHPMyAdmin was really designed for working with remote servers - there are much better tools for working with local ones.
I know you've dismissed Eclipse, but it makes it very easy to debug code. Refreshing a page with F5 isn't really debugging btw - you can't set breakpoints, or monitor variables etc. (I know there's a method to print out all current variables etc., but that's very cumbersome)
vim+mysql command line+xampp+ocassionally mysqladmin
My linux setup consists of: apache, mod_rewrite, mysql and php all logging to one file /var/log/dev-console.log
then i tail that with a graphical tailer like multitail or acoc to add colour to the sql and filter out some of the mod_rewrite text.
editing in bluefish-unstable