Retire the MySQL driver

The original MySQL extension is now deprecated. Use PDO instead. It is enabled by default in PHP installations now. PDO is database driver which allows you to easily use diferent databaees without having to relearn a different interface. PDO has a much nicer interface than the old mysql driver, you will end up being more productive, and write safer and cleaner code.

You can find a good PDO Tutorial here.

HowTo: Set up a Remote (S)FTP PHPStorm Project with BitBucket.org

The past few Days I have put all my Projects as a GIT-Repository to BitBucket.org for the obvious reason to have a Backup and easily Rollback changes if necessary.

What cost me a little effort was the process of getting my PHPStorm-Projects which are created from a remote (S)FTP Location into BitBucket so that I’m able to push and pull to/from the Repository and at the same time able to upload my changes via (S)FTP to the Webserver.

So if you might want to do the same this could be helpful.

I presume
…you have a BitBucket Account set up.
…you have PHPStorm installed
…you have GIT installed

1. Open PHPStorm and create a new project from a remote (S)FTP Location with the „New Project from existing Files…“ option

2.  Create a new GIT Repository in BitBucket

2. Open your Project in PHPStorm

3. Open the Menu ‚VCS‘ and choose ‚Enable Version Control Integration‘

4. Open the Git Bash  and do the following

cd /path/to/my/phpstorm/project
git remote add origin https://your-bitbucket-username:your-bitbucket-password@bitbucket.org/your-bitbucket-username/repositoryname-you-created-in-bitbucket.git
git add *
git commit

Enter a Description for the Submit and Save
(i.e. vi style save: i – Enter your Description – ESC – :wq – Enter)

git push -u origin --all

Your are done. Now you can use your Remote PHPStorm Project with a GIT BitBucket Repository.
Change a File and use ‚VCS -> Commit Changes‘ to commit and push your changes.