Phpstorm Phpmyadmin



After following all steps you will have fully configured XAMPP with PhpStorm integration. This lab is part of the “Software Technologies” course @ SoftUni. XAMPP is a software package that bundles in a single package PHP + Apache + MySQL + phpMyAdmin + some other tools for PHP Web development in Windows environment. Now phpMyAdmin loads when PHPStorm is running but I am now having trouble debugging PHP scrips from PHPStorm. It says localhost refused to connect in Chrome when I debug an HTML page that triggers a PHP script. I am selecting the HTML file in PHPStorm and clicking debug. The file is local but is also pushed to the htdocs folder of my local MAMP.

As a PHP developer on Ubuntu, we may need to re setup our development environment sometimes. I did it already a few times, so decided to write down the steps for a typical php development environment on ubuntu. My Ubuntu version is 16.04.

Installation List

Installation PHP 5.6 & Apache2

We need to enable PPA in order to install PHP 5.6.

Now we can install PHP 5.6 by the following commands

To install Apache2, run

Ubuntu 16.04 comes with PHP 7 as default. If you have PHP 7 installed, it won’t activate php 5.6 module. To activate, run

Now finally restart apache, so you are done with PHP 5.6 installation.

MySQl

PHPMyAdmin

Please follow the instruction from the link bellow to install PHPMyAdmin in your system.

CURL

PHP Storm IDE

You need to first install Oracle JDK in order to install PHP Storm. If you want to use SmartGIT 17.1.2 in your system then install JDK 8, otherwise you caninstall latest JDK 9.

Install Oracle JDK 8

First, update the package index.

Then, add Oracle's PPA, then update your package repository.

To install JDK 8, use the following command:

During the installation process you will need to accept the Oracle License agreement. Once installed we need to set Java environment variables such as JAVA_HOME on Ubuntu 16.04/17.04.

You can check the configured JAVA_HOME value by running the command bellow.

Install PHP Storm

First go the official website and download the tar archive. Extract the archive in your system and you will get a folder like ‘PhpStorm-172.4155.41’ (latest version at the time of writing this). Then go to the location where you downloaded it from the command line and move the folder to /opt/phpstorm following the command below.

Create a symlink

Now type phpstorm in the terminal to launch the application.

Follow the installation instruction of Importing from previous installation and Privacy Policy. Then choose the ‘Evaluate for fee for 30 days’ option and complete the installation.

After installation, opent the IDE and activate the license.

Go to Help > Register

Choose the 'License Server' option and use this URL as the license server, http://idea.imsxm.com

Click Activate, and you are done! :)

Install Composer

Check if Composer is already instaled or not.

Before installing the composer, we need to update the machine with the below command –

Composer will be installed under /usr/local/bin

Download the Composer using the below command in the /tmp folder

Once you have downloaded the script, we will install the packages using the below command, and will install the Composer in the /usr/local/bin with –install-dir flag;

Finally check the version of the composer to make sure it is installed properly.

Phpmyadmin

Install and Configure xDebug on Ubuntu for PhpStorm

  • Assuming that you have already installed php and apache
  • Install xDebug php extension
  • Edit your xdebug.ini
  • Your xdebug.ini file path should look like this
    • /etc/php/7.1/mods-available/xdebug.ini
  • Add these lines without modifying exiting
  • Restart the apache server to reflect changes
  • Configure phpStorm

  • Go through - Settings >> Languages & Frameworks >> PHP >> Debug

  • Check that 'Debug port' is the same you have in your xdebug.ini. In our case it was 9000.

  • Save and close the Settings Dialog

  • Start debugging

  • Create some breakpoints in your project

  • Make sure those breakpoints gets executed when your visit your website in browser.

  • Start listener by clicking on the telephone 📞 button on top toolbar

  • If you can't find telephone button; then go through menus - Run -> Start listening for PHP Debug Connections

  • In your browser access your project url like this

Phpstorm Phpmyadmin Password

  • OR use bookmarks

  • OR use chrome extension

  • You should see a popup window in PhpStorm , click Accept connection

  • Done, enjoy debugging !!!

Disable xdebug

Enable xdebug back

Disable xdebug for commandline only

Step 1 – Download Skype Debian Package

First of all, download the Skype package for Debian system from its official download page. You can also use below command to download latest available Debian package.

wget https://repo.skype.com/latest/skypeforlinux-64.deb

Step 2 – Install Skype

Use the following command to install downloaded skype package on your Ubuntu system.

sudo dpkg -i skypeforlinux-64.deb

In the case of the above command failed to install package due to any dependency run command.

sudo apt-get install -f

Step 3 – Launch Skype

Use your dashboard skype button to start skype on your system, or you can use the following command as well.

skypeforlinux

Phpstorm

Data source is a location of data for your application. In PhpStorm, you can define the following data sources:

  • Database data source: operational databases that contain data (see Database connection ).

  • Data Definition Language (DDL) files: SQL files that contain data definition language statements.

Configure display options for data sources

You can group, assign a color, and filter objects in the Database tool window (View | Tool Windows | Database ).

Customize the view of objects in the Database tool window

  • To group, enable, or sort data sources, click the Show Options menu icon on the title bar of the Database tool window and select the necessary options.

    In the Database tool window (View | Tool Windows | Database ), the view of the data source changes instantly.

    For more information about the view options, see View options in the Database tool window.

Group data sources in folders

  • In the Database tool window (View | Tool Windows | Database ), select the necessary data source and press F6. Alternatively, right-click a data source and select Move to Folder.

    • If you do not have any folders, you will see the New Folder dialog. In the text field, type the folder name. You can use a forward slash (/) to define nesting. For example, the QA/Quick name will create the Quick folder inside the QA folder.

    • If you have folders with grouped data sources, you will see the Move to Folder dialog. To create a new folder, select New Folder. To remove a data source from the folder, select Root folder.

    Also, you can use Ctrl+C, Ctrl+V, and Ctrl+X to copy, paste, and cut your data sources between folders. If you cut and paste a data source inside one project, it will be just moved, no password is required. But the password is required in all the other cases. The cut operation can be undone by using Ctrl+Z.

Assign a color to a data source

To have better differentiation between production and test databases, you can assign a color to a data source.

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties icon .

  2. Select the data source for which you want to assign a color.

  3. Click the circle in the Name field to select a color.

Assign a color to query consoles and grids

  • The text data viewer can use the color of the data source. To set a color, right-click a data source and select Color Settings. In the Database Color Settings dialog, select the dialog and coloring options. To have the data source color applied for query consoles and grids, select the In console editors and grids checkbox.

Filter objects from the toolbar

  • To select the necessary objects, use the Filter icon on the toolbar .

Show comments for data sources and database objects

  • To enable descriptions for databases and tables, navigate to View | Appearance and select Descriptions in Tree Views.

    To add comments for tables, select a table and press Ctrl+F6. In the Comment text field, add a table description.

    To add comments for a database, open database settings Ctrl+Alt+S and add a database description in the Comment text field.

Share data sources

Data sources in PhpStorm are available at two levels: project and global. The project level means that you can access a data source only from the project where this data source was created initially. At the global level, a data source is available for other projects. By default, a data source is available at the project level.

To share a data source between different projects inside your IDE, you need to move the data source to the global level.

You can copy a data source if you need to use the same data source in another project, but have different requirements to it, such as its accessibility level (project or global), the user, database connection and schema settings, and so on.

Make a copy of a data source

PhpmyadminPhpstorm phpmyadmin download
  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties button ( ).

  2. In the Data Sources and Drivers window, select the data source that you want to copy.

  3. Click the Duplicate icon ( ), or press Ctrl+D.

Share data sources between projects

  1. In the Database tool window (View | Tool Windows | Database ), click the Data Source Properties button ( ).

  2. In the Data Sources and Drivers window, click the Make Global icon () to make the data source available at the global level.

Share data sources between different IDE instances

You can copy information about a data source to the clipboard in the XML format. The resulted XML does not include password information.

You can send the XML snippet to another IDE (in a messenger or by email) and import it.

  1. In the Database tool window (View | Tool Windows | Database ), select data sources that you want to copy.

  2. Press Ctrl+C.

  3. On another workstation, click View | Tool Windows | Database.

  4. In the Database tool window, click the New icon , select Import from Clipboard.

PhpStorm stores passwords in native keychains on macOS and Linux and in the KeePass storage on Windows. You can configure your IDE to store passwords in KeePass (File | Settings | Appearance and behavior | System settings | Passwords ).

Sharing data source settings

You can export and import data source settings by using the settings.zip file. The settings.zip file includes only data sources that are available at the global level. For more information about how to change a level, see Change the project level to global.

Export data source settings

Phpstorm Phpmyadmin Tutorial

  1. Click File | Manage IDE Settings | Export Settings.

  2. In the Export settings window, click Select None.

  3. In the Export settings window, select Database: drivers, Database: settings, and Database: global sources. You must have at least one global data source to have Database: global sources in the export list.

  4. In the Export settings to field, type a path to the folder where you want to store the settings.zip file.

Import data source settings

Phpstorm Phpmyadmin Login

Phpstorm Phpmyadmin

Phpstorm Phpmyadmin Server

  1. Click File | Manage IDE Settings | Import Settings.

  2. In the Import File Location window, locate the settings.zip file that you exported, and double-click it.

  3. In the Select Components to Import window, select Database: drivers, Database: settings, and Database: global sources.

  4. Click OK.

  5. In the Restart Needed window, click OK to restart your IDE.

  6. Open the Data Sources and Drivers window, enter necessary connection credentials in the data source properties. If the data source is on a local or network drive, ensure that the path to this data source is correct.

  7. To ensure that the connection to the data source is successful, click Test Connection.





Comments are closed.