Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Change local server setting in php

Posted on 2016-09-14
6
Medium Priority
?
162 Views
Last Modified: 2016-10-02
Hi Experts,

I used  use Phpstorm 2016.2.1 + Xampp 3.2.2 installed on my laptop (Windows 10); and when I tried to run a PHP page in browser it show me the link like this: localhost/C:/Users/IT/Desktop/......../MyPHPPage

I already:
1- Move my application to be under : C:\XMAPP\htdocs\
2- Change my PHP server setting to be Localhost:8080 (Because It's conflicted with other app port)

Usually, I want to get something like this localhost:8080/MyPHPFolder/MyPHPPage, So please tell me what to do in details.


Thanks a lot.
Harreni
0
Comment
Question by:Harreni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41797751
localhost:8080 should take you to the DocumentRoot as defined in the Apache httpd.conf file

If you want to have localhost:8080/yourfolder/yourfile.php where yourfolder is not under the document root you need to setup an Alias to the folder - also in the httpd.conf file.

I am not sure how you managed to get localhost:/c:.... - is it is till doing that?
0
 

Author Comment

by:Harreni
ID: 41799341
Thanks Julian.
I copied the whole folder from the internet site using FileZilla to C:\ drive and then I moved again it to C:\XMAPP\htdocs\ and for that it mayb keep showing me localhost/C:/Users/IT/Desktop/......../MyPHPPage in the URL.
Now, It fixed by coping the folder from the internet to C:\XMAPP\htdocs\ directly.

Another question:
Why Phpstorm showing localhost:63342/ instead of localhost/ although XMAPP is using port 80? Is there a way to fix that to localhost?

Thanks a lot.
0
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41799688
I don't know much about PHPStorm but like many development environments what they do is launch a http service that is then used to monitor / debug the session. I suspect PHPStorm is doing the same thing - when you connect to localhost63342 it is a PHPStorm HTTP service and not apache.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Harreni
ID: 41803511
Thanks a lot Julian.

Anyone can tell me how to make Phpstom run localhost/ instead of localhost:63342/ ?
0
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41803549
From this article
Built-in webserver port can be always configured in Settings/Preferences | Build, Execution, Deployment | Debugger. The default port is 63342. Built-in webserver can also accept external connections when explicitly configured to do so (disabled by default due to security reasons).
0
 

Author Closing Comment

by:Harreni
ID: 41825271
I configure the interpreter as per the article and its works with  localhost:63342/ without need to change it to  localhost
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question