Remote Debug PHP on a Hosted Shared Linux Environment using an IDE or browser on my local Windows PC.

I want to Remote Debug PHP on a Hosted Shared Linux Environment using an IDE or browser on my local Windows PC.
A 'shared' hosted account has  limitations. I can open port 9000 on my shared environment which Xdebug I think uses and I have basic SSH access, not much execution privileges.
I use PHP Storm currently and have not had luck with that but I am open to any other IDE or solution that offers a remote debugging environment.
I need specific guidance to set up some solution.
swendellAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You can attempt to do this using Windows + IDEs tend to support Windows as an after thought.

An easier approach will be to run VirtualBox on your home machine.

You can run machine level Linux + VirtualBox running Windows... or...

Machine level Windows + VirtualBox running Linux.

I'd suggest you use Ubuntu Bionic for your Linux OS. Setup of your IDE will be far faster + easier running on Linux.
0
swendellAuthor Commented:
To clarify, There is already a remote hosted site I need to debug in that Linux environment
0
swendellAuthor Commented:
To clarify, There is already a remote hosted site I need to debug in that Linux environment
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You said...

"I want to Remote Debug PHP on a Hosted Shared Linux Environment using an IDE or browser on my local Windows PC"

You can do this + anytime you work with Windows plan on many extra hours futzing around with Windows trying to get software to run correctly. Especially Linux bases software.

If you run Linux + your IDE on Linux, you'll likely save a large amount of time.

There is no right or wrong, just the number of hours to get your IDE working.
0
swendellAuthor Commented:
I have no choice, the remote linux server had the php code to debug in that shared hosted environment
Given that what can i run to debug it from my windows pc and how would i set that up
That is my question in case i was not clear
0
arnoldCommented:
The suggestions

create a test.php
<?php
phpinfo();
?>
pull the  configuration of php the remote side.
Then you can check whether the PHP code .......
Commonly, you would retrieve the PHP code and make sure they use relative referenes ......

Then ... but the earlier suggestion on a similar path are brushed off.
But this way you can add what is seemingly missing from the existing which is error detection/reporting mechanism

You might be better off describing what issue you are running into.

Do you have log cruncher on the remote that deal with crunching/processing the http error log into which .......
0
NerdsOfTechTechnology ScientistCommented:
Download and install EasyPHP Devserver (open source), which sets up a quick WAMP environment locally on your Windows PC (localhost).

Devserver installs a complete, open source and ready-to-use development environment. Devserver is portable, modular, fully configurable and easy to update and extend

EasyPHP Devserver 17.0
PHP 7.x / 5.5.x / 5.4.x / 5.3.x, Apache, Nginx, MySQL, PhpMyAdmin, Xdebug + modules + components

http://www.easyphp.org/


Download Notepad++
https://notepad-plus-plus.org/


Instructions:
Setup the dev server, download the files to the root folder you want to run the dev server from, then edit code with notepad++, test files using your browser via right click on devserver tasktray icon, click "local web" on the menu.
0
swendellAuthor Commented:
OK, these workaround / suggestions to setup a local test environment and move everything back and forth between are not answering my question here, which was to debug a remote Linux system. FYI there are differences between LAMP and WAMP that crash code when you move. For example, one is case sensitive mySQL another is functions like money just are not there on both operating systems. Just two examples that popped up very quickly. Certainly I could edit code so it is friendly to both OS's but really I just want to pop in an debug in the same environment.

Specifically a hosted server in a shared environment.

I was able to find that it can be done if you can install XDebug and open (or tunnel) a port to XDebug from your remote Windows PHP IDE Debugger (Like PHPStorm). The problem is BlueHost who is hosting the site in a shared environment is NOT willing to install XDebug or SSH execute anything really...

I was able to eventually locate help articles in addition to help resources on PHPStorm support site
0
arnoldCommented:
A shared environment specifically does not allow for what you are after.

get a vps and then you can do what you want.
1
swendellAuthor Commented:
Yes In short this can not be done in a shared environment.
I do not have control to change hosting account so that is not an option and not what I asked to do.
Basically remote debugging of this shared environment can not be done, simply the answer is really just NO in this case...
0
NerdsOfTechTechnology ScientistCommented:
So the solution is to pay more for a VPS, cloud VPS, or dedicated server, to enable remote debug, or troubleshoot indirectly and update code via upload.
0
swendellAuthor Commented:
My specific question/scenario was where :
1) I can not pay more / change the hosted server environment which is shared.
2) I wanted to remotely debug that hosted site.

Technically I found a way this could be accomplished in some shared environments, depending upon the hosting company (just not mine, BlueHost)

"I was able to find that it can be done if you can install XDebug and open (or tunnel) a port to XDebug from your remote Windows PHP IDE Debugger (Like PHPStorm).

I was able to eventually locate help articles in addition to help resources on PHPStorm support site"
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
swendellAuthor Commented:
In addition to this solution:
"I was able to find that it can be done if you can install XDebug and open (or tunnel) a port to XDebug from your remote Windows PHP IDE Debugger (Like PHPStorm)."

Below is another approach that would work only for debugging PHP scripts (not web apps):
Use "On-Demand mode" by providing the path to xdebug.so extension (enter remote path there):
Here is how you would set it up
Again the issue (for me) is that my hosted Shared account does not allow:
-  root access to access or interact with the php executable folder.
- sudo access or root access will be required for the debugger  to execute/access php / XDebug
You will also need SSH Access (which I was allowed) but not the required file 'execute' rights
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.