Netbeans PHP configuration on Ubuntu - php

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 ?

Related

laravel using a different php version

I've a lamp stack installed on my localhost. I just installed everything I needed via the command line, but I'm not very knowledgable about how the server works.
So when I just start a very simple php project from scratch, simply make a folder in the root directory and create an index.php with phpinfo() at the top, I find that I'm running php 7.3.
Then when I created another folder with a laravel installation inside (I didn't set up, just copied files and made the required changes - it works fine - note I'm just messing about with laravel, no expert!). If I stick a phpinfo() at the top of a file in the laravel project, it says I'm on php7.4!
How is it possible that the two projects, on the same server which are running different php versions?

Trying run working Laravel project on my PC via XAMPP

I have a whole project with database, everything is working here.
Project with database
I would like to run website so I can see changes I have made.
Im using XAMPP. My configs for VirtualHost hosts and http-vghosts.conf
I have tried this https://youtu.be/iXYCnYRalaw?t=2m13s ->> from [2:13] to [4:22]
using XAMPP, but still cant run it.
Can you give me any advice or steps how to make website run on my PC? [ofcourse just for me (VirtualHost)].
Editor using: Atom
My PC spec
If running laravel appliation inside XAMPP htdocs folder is really necessary, then could you provide some kind of error, simply telling "it doesn't work" doesn't help at all.
One thing you can try is to open command prompt inside laravel folder and run
php artisan serve
This will open local server that runs current project in:
http://127.0.0.1:8000
Also, checking laravel minimum requirements is something you should check out. 5.5 requires PHP 7 and you didnt tell what XAMPP version you are running.

Joomla with Xampp

I've installed Xampp, and used phpMyadmin to create a database, I want now to use that with a Page made by Joomla,so I installed it with bitnami package, but I can't activate both, Xampp servers and Joomla at the same time, so when I try to log in phpMyAdmin of Joomla it doesn't recognise my admin and pasword of xampp. Any idea of how to solve the problem?
EDIT: I'm using Linux
TIP: Don't use bitnami. Use Joomla as it is instead.
It will be much better for you on the long run.
So:
Uninstall Bitnami
Restart Apache & MySQL
Example:
Create a database in phpMYAdmin
Example:
Download Joomla
Extract Joomla's ZIP file into C:\xampp\htdocs in Windows or /Applications/XAMPP/xamppfiles/htdocs on OSX.
I would recommend creating a folder inside "htdocs" like "mysite" so you can add multiple sites in the future inside different folder's
Navigate to either http://localhost/ or http://localhost/mysite and follow the Joomla Installation Process
It is simple to solve your problem.
Uninstall the bitnami package
Start your Xampp Apache and MySQL Server
Create a Database over phpMyAdmin
Download: https://www.joomla.org/download.html
Extract the files in the ZIP to your xampp installation in the folder htdocs. When you used the standard installation it isC:\xampp\htdocs
Open your browser on http://localhost and follow the installation instructions of Joomla

Laravel 404 on every page, but shows directory after Yosemite update

I updated to Yosemite about 3 hours ago; now all my Laravel projects show a 404 page when trying to load ANY route. It 'lists' the files when trying to go to the home route?
I created a new Laravel project and it works just fine; how can I fix this?
Here is what I mean:
As you can see, there is data there; mamp is running just fine. So I cannot figure out why it is not working?
This is most likely a problem with MAMP more than Laravel. I run Laravel with Homestead and when I updated to Yosemite everything worked fine after restarting my VM. You may look at this post. Apache may not be starting on MAMP.
MAMP Folks just posted the workaround
Workaround for the 10.10 Preview 5 bug: Rename the file “envvars” located in /Applications/MAMP/Library/bin into “_envvars”
Test Update: It works!
If you get the courage as well you should really give Homestead a shot for developing with a Laravel. I even use it for Wordpress and everything else.
So I created a new project via Terminal and coppied the code (I tried just dragging the files in finder and it gave the same results. So I created new files, and literally coppied the code and it worked just fine. I have no clue what it is, weird.
I had to remove the comment (#) from the beginning of LoadModule php5_module in /etc/apache2/httpd.conf to enable PHP after updating to Yosemite, you may have to do the same.
Yosemite does some serious changes to the environment. Apache is updated from 2.2 to 2.4, so one should check the httpd configuration.
PHP is updated from 5.4 to 5.5 - if you have had a working mcrypt module, you will have to reinstall that too.
This is the most referenced link: http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/
What worked for me was updating XCode to 6.1 and then
brew update
brew install php55-mcrypt.
Be sure to link the correct php Module in your /etc/httpd.conf afterwards.

Intellij Project Structure: Configure PHP SDK

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

Categories