Intellij Project Structure: Configure PHP SDK - php

starting with Intellij 13.1 which was released today, it is possible to configure additional SDKs in the Project Structure dialoge. While the old 13.0 version only contained the following three items when clicking on the new button:
JDK
IntelliJ Platform Plugin SDK
Mobile SDK
The new 13.1 update has added several more options as can be seen on the screenshot:
When I click on PHP Interpreter then a directory chooser opens and ask me for the "Select Home Directory for PHP Interpreter". Which folder is the correct one under Ubuntu?
I have tried /usr/bin and I get a message that says: Probably SDK installed in '/usr/bin' is corrupt, and when I choose another directory then the message says: The selected directory is not a valid home for PHP Interpretor.
However, when I go to Settings->PHP I have already correcly configured PHP 5.4 and when I open the details by clicking on '...' then I see the following:
Has anyone tried this? Am I doing something wrong, or is this a bug in IntelliJ maybe?

Open a new local shell/terminal window and type which php
this will tell you where the php binary is installed
in some ubuntu releases the repo's install php as php5, if that is the case you might need an ln -s to php
Although in my PhpStorm (PS-138.2071) it looks like this :

This is done on settings level. Don't do it in project sdk level. Got to settings, look for php. Choose PHP language level and intellij will scan and get the interpreter for you

Related

Php\Ubuntu virtual links

I have latest Ubuntu 18, also Apache2, php 7.2, mysql.
I have rather old simple php application, written on php4 (at least not older than php5).
I have a task to run this application in this environment, to install php4 is not a variant. Possibly there are some compability mode to run this application by php7.2 as php4?
I succeded to open index.php in FireFox, but also it seems, that it is not shown correctly. I run that application also on Windows\IIS and it works perfectly. But on Ubuntu Application has a menu and i see only part of it. Also any item in that menu is created through localization links, like:
application\en\sitemap
application\en\news
Physically i have folders sitemap, news and etc, just under application root folder. But FireFox is not able to open application\en\news, because it seems it is trying to reach folder EN, which is not exist, of course. So neither menu item could be opened. Though on Windows it works from the start!
Tell me, please, direction for futher search.
Is there a compability mode php7.2-php4?
How should this virtual links en-ru work - should i configure php or there should be some points in application config.php for this issue?
Thanks

how to set up facebook sdk on PHP hosted on xampp on windows

I'm trying to setup the facebook marketing sdk in php but I cant seem to get past the first part since I dont know what this "terminal" is.
instructions can be found here: https://developers.facebook.com/docs/marketing-api/sdks/
I could get the composer via an alternative method. Either by getting the executable setup or by adding .php to the installer and running it via browser but the next step is
"//Then install it through composer:
php composer.phar install --no-dev"
I cant run the .phar file via accessing it in the browser. It also shows a few errors when I replace the .phar with .php and doing the same method previously by accessing it through the browser.
Basically two things I need to understand
1. Where do I input those commands on a windows 7 OS
2. Where do I place the files for the facebook marketing SDK? just under htdocs in xampp?
Where do I input those commands on a windows 7 OS
Open the command line (https://www.howtogeek.com/254401/34-useful-keyboard-shortcuts-for-the-windows-command-prompt/)
Go to your project folder and use those commands
Where do I place the files for the facebook marketing SDK?
Composer will make a directory (/vendor) within the folder that you currently are. Then composer will put the required files to the right place automatically.

how to copy php files from working directory to local www folder from intellij 13

I have always been using netbeans to develop php project but wanted to give a try to see how intellij Ultimate (version 13 in this case). After installing the php plugin, and created a simple web application project, I got lost. Turns out to some hours of googling and trial and error I couldn't find that small thing that could say check to copy the the files to remote location or remote server etc.
I am running fedora 19 with apache2 so my root directory is /var/www/html/phpproject. I am hoping to see my files from /media/blacksensei/Repo/work/intellijworkspace/phpproject/src copied to that folder so that I can have access to it via http://localhost/phpproject.
Can anyone explain this process simply for me.
Thank you
I'm not php developer. But what I see that it is quite simple:
Create Run/Debug configuration for PHP Web aplication
Tap + in Before launch section
Choose Upload to Remote Host and configure it
You can find more details here - http://www.jetbrains.com/idea/webhelp/uploading-and-downloading-files.html#d438110e553

Netbeans PHP configuration on Ubuntu

I have this problem getting my newly created php project on Netbeans work on Ubuntu.
I've tried to place the source folder of the project in the /lampp/htdocs folder or selected the copy location option on the 3rd step of creating the project, yet none of them worked.
Here the version of the softwares I'm using:
Netbeans 7.1
LAMPP (newly download)
Ubuntu 11.10 (up-to-date)
I would be thankful if steps can be provided.
Ok I'll give you everything I usually do From the moment I download a new version of Ubuntu.
After installing Ubuntu I download XAMPP for Linux and follow their installation guide. Pay extra care to the permission when extracting XAMPP. Be sure you extracted it in the correct folder /opt.
You must start XAMPP manually by using the command /opt/lampp/lampp start. You will need root access for that. If everthing was started normally you will get the following message in the terminal:
Starting XAMPP 1.7.7...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
Navigate to http://localhost or http://127.0.0.1 you should see the following screen.
(source: techblissonline.com)
Select your favorite language then voila your installation is complete.
create a new Netbeans project and call it test for example inside /opt/lampp/htdocs/.
Create an index.php file inside /opt/lampp/htdocs/test/ and put echo phpinfo() inside it.
Navigate to http://localhost/test/index.php and you should get the page you just wrote.
Notes:
Make sure all php extensions that you need are already installed by checking the phpinfo() page in XAMPP.
You would probably want to start XAMPP each time you start your PC instead of doing it manually every time. There are several ways to do that if you google it.
Have you tried all these steps and still can't get your project running ?

how to deploy joomla website using xampp?

i have pre developed site ( using joomla )
i should make some editing to the database using xampp server
should i install joomla ?
and when i enter
localhost/project/index.php
i get this message
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
I think you don't need install it again. You did it before, just you need to install Xampp to run Apache and MySQL. Then copy your files in its htdocs folder in a certain folder (Like joomla). But pay attention that you must have a backup from your previous database. Otherwise, you need to install joomla again to create database and its tables.
I used AMPPS to do the same. You can import your current installation of Joomla in Softaculous provided by AMPPS. AMPPS is also a WAMP Stack with auto-installation of more than 230 open-source scripts. All the site installed by AMPPS and imported manual installations will be managed by AMPPS.
(Note : Your config file of Joomla should be proper. Take bakup before importing)
If nothing works you can still install Joomla again as it is easy using AMPPS. Hope this helps. :)

Categories