Question regarding my code and xampp setup

Answered

Hi,

 

I have the following php code setup within bootstrap, without the bootstrap templating it works fine on my own live web server: https://pastebin.com/zQq5jLYG

 

I have literally just done this one part of the tutorial and it runs basic php code fine, e.g. echo 1+1; then it displays 2: https://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+XAMPP+with+PhpStorm+IDE#InstallingandConfiguringXAMPPwithPhpStormIDE-IntegratingthePHPexecutable

Do I need to do anything more on that tutorial? e.g. running the apache server, because phpstorm seems to do it on localhost fine already with just the cli for php in place, either that or I am wrong...?

Is it an issue with Bootstrap and php, do I need to do something different with the html form tags?

 Overall my PHP code will not work via phpstorm and bootstrap???

Many thanks,

0
4 comments
Avatar
Permanently deleted user

Hello,

Integrating PHP executable will help you to work with CLI scripts but for debugging web applications you need to integrate an Apache too - it is one of the next steps.

Using PHP built-in web server is good only for previewing very simple pages, not for working with real web applications.

1

Apologies for taking so long to respond I have been busy with studies.

I have now followed everything in that tutorial.

I have Apache running, but it always directs me to: http://localhost/dashboard/

I tried to edit index.php in htdocs directory to redirect to my project directory, this did not work.

I tried to edit httpd.conf as well but there was nothing in there of relevance.

I concluded even though this is set as default I should be able to somehow map my project directory to execute to the apache server, after looking through the settings it does not instruct me how to do mappings, I looked through phpstorm documentation and to be honest I do not understand it.

Below are two screenshots I have right now, with the second one I am unsure what I need to enter in Deployment path on server and Web path on server, I presume these would bypass default dashboard and redirect to my directory (student.money) index.php page but I could be completely wrong? Please help?

https://pasteboard.co/2NOB8NJ1D.png 

https://pasteboard.co/2NOV51m7O.png 

0
Avatar
Permanently deleted user

Hi,

Mappings > Deployment path is a relative path where your files are being placed and being mapped to.

It is relative to a root path we have in Connection tab and is project-related so you can have one deployment configuration for many projects and just modify mappings there

If your root path is already the place we need to place our project files to, deployment path should be set to `/` (without quotes).

You can read more about deployment scenarios and configuration at https://confluence.jetbrains.com/display/PhpStorm/Deployments+in+PhpStorm .

> I have Apache running, but it always directs me to: http://localhost/dashboard/

So when you access "localhost", it goes to "dashboard" automatically?

0

I done it like this: 

 

https://pasteboard.co/3rSiBUghG.png

 

Yeah it was but when I do like that, right click project or click run now it loads the project up in the browser correctly, I was also not uploading to XAMPP lol.

 

I think its better to do in a seperate folder rather than root as I am working on many different projects in phpstorm.

 

Issue all fixed now thanks for the help.

 

 

1

Please sign in to leave a comment.