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
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++.
The PHP language provides functions that make communicating with MySQL extremely simple. You use PHP functions to send SQL queries to the database. You don't need to know the details of communicating with MySQL; PHP handles the details. You only need to know the SQL queries and how to use the PHP functions.
php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=newDB", $username, $password); // setting the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "CREATE DATABASE newDB"; // using exec() ...
MySQL is a first choice of PHP developers. As an open source Relational Database Management System (RDBMS) that uses SQL language, MySQL database helps to automate data retrieving and provide great support in PHP MySQL web application development.
Create MySQL Database at the LocalhostOpen your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. Now click Edit privileges and go to Change Admin password, type your password there and save it. Remember this password as it will be used to connect to your Database.
This is what works for me:
Server stuff (emulates my RHE deployment server):
Code writing:
php.exe -l
) on the code fileTemplate editing:
Debugging code and templates:
Database stuff:
Other useful stuff:
Almost all this stuff is open source and actually useful.
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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With