Windows 10: xdebug not stopping with eclipse - eclipse

httpd.conf set listen:9080 (listen 80 would not work with windows 10 visual studio is somehow stopping it working.)
so url that works is http://localhost:9080/project2
php.ini settings appeared correctly in phpinfo()
[xdebug]
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost:9080
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
and set in eclipse
preferences -> php -> Servers -> edit
Base URL: http://localhost:9080
Local Web Root : C:\wamp\bin\php\php5.5.12
Servers -> What is path mapping?
Path on Server ? http://localhost:9080/project2
Local Path ? C:\Apache24\htdocs\project2
Set PHP Executables as follows:
Executable Path: C:\wamp\bin\php\php5.5.12
php.ini: C:\wamp\bin\php\php5.5.12\php.ini
Debug -> Run Configurations -> Debugger -> Configure
Accept Remote Session: tried localhost and prompt
Tried in Chrome and Opera they both run without stopping.
Can debug by printing to page though would like to use debugger.
Cannot think of any other reason debug set and green in chrome. Tried disabling it and selecting debug again.
Please reply soon.

Related

Serving Ionic 2 project not working

When running Ionic 2 with the following command,
ionic serve
I get this:
WARN: ionic.config.js has been deprecated, you can remove it.
Running live reload server: http://localhost:35729
Watching: www/**/*, !www/lib/**/*, !www/**/*.map
√ Running dev server: http://localhost:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
Here is the ionic config file:
{
"name": "firebaseStart",
"app_id": "",
"v2": true,
"typescript": true
}
How can i run it ?
This is fine. See √ Running dev server: http://localhost:8100
open browser and navigate to
http://localhost:8100

how to deploy war file to Glassfish on port 80?

When I deploy my application, I can access to my website at the adress: domain.com:8080 but I want to access with the adress domain.com:80.
When I try to access to domain.com, I found a page "index of" with different folders (my .war) but not website. Can I configure something on glassfish, what I need to do?
help me I'm desesperate
To run your app under 80 port you have just to adjust your listener from 8080 to 80 and make the your app as default web app in the virtual server :
log first on the GF admin panel ( default domain.com:4848 )
then go to left menu :
(change port to 80)
1 - Configuration -> 2 - server-config (default) -> 3 - network Config -> 4 - network Listeners -> 5 -select your listener (http-listener-1 if default) ---> 6 - then change the port to 80 and save .
(make it default app)
same thing but make change in default virtual server :
1 - Configuration -> 2 - server-config (default) -> 3 - virtual servers -> 4 - server (by default) ---> 5 - then select your app in the default web app and save
after those restart the server and try .
here are some image so they can help you (sorry screen shot in french)
Config port 80 :
make your app as default in virtual server :

Why won't eclipse app instance run in https

I am maintaining a servlet application previously developed in Eclipse Helios. I have the servlet instance war file and it runs fine in my Tomcat 7.0 on windows and I receive the correct web responses in SoapUI. It runs with SSL encryption and the url in SoapUI states;
https://localhost:8443/ProjectName/etc/etc
But after retrieving the original code from SVN into Eclipse Helios, I can get it to start okay running through the imported Tomcat but it does not seem to start using SSL in Eclipse Helios and the URL in the Eclipse tab states;
http://localhost:8000/ProjectName/etc/etc
And so when I attempt to run a web request in SoapUI it reacts like the servlet instance is not running. What am I doing wrong?
This solution is supplied for MAC, can follow the same strategy for windows as well.
Step 1) Generate the certificate with java keytool utility by navigating to bin folder of java installation directory
LM-MAA-22004958:etc rkala$ cd /Applications/corona-java-1.1.0/jdk-7u45-macosx-x64/Contents/Home/bin
LM-MAA-22004958:bin rkala$ keytool -genkey -alias myappcert -keyalg RSA -keystore myapp.keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: localhost.xyz.com
What is the name of your organizational unit?
[Unknown]: my
What is the name of your organization?
[Unknown]: my
What is the name of your City or Locality?
[Unknown]: my
What is the name of your State or Province?
[Unknown]: my
What is the two-letter country code for this unit?
[Unknown]: my
Is CN=localhost.xyz.com, OU=my, O=my, L=my, ST=my, C=my correct?
[no]: yes
Enter key password for <myappcert>
(RETURN if same as keystore password):
Step 2): Copy the generated myapp.keystore file to tomcat /conf directory
LM-MAA-22004958:bin rkala$ mv myapp.keystore /Users/rkala/Downloads/apache-tomcat-7.0.93/conf
LM-MAA-22004958:bin rkala$ cd /Users/rkala/Downloads/apache-tomcat-7.0.93/bin
LM-MAA-22004958:bin rkala$ ./startup.sh
Using CATALINA_BASE: /Users/rkala/Downloads/apache-tomcat-7.0.93
Using CATALINA_HOME: /Users/rkala/Downloads/apache-tomcat-7.0.93
Using CATALINA_TMPDIR: /Users/rkala/Downloads/apache-tomcat-7.0.93/temp
Using JRE_HOME: /Applications/corona-java-1.1.0/jdk-7u45-macosx-x64/Contents/Home
Using CLASSPATH: /Users/rkala/Downloads/apache-tomcat-7.0.93/bin/bootstrap.jar:/Users/rkala/Downloads/apache-tomcat-7.0.93/bin/tomcat-juli.jar
Hit the browser with url https://localhost:8443 and you are good to go
Step 3) Modify both server.xml with the same config provided below
1.Tomcat server.xml -> Path: /Users/rkala/Downloads/apache-tomcat-7.0.93/conf/server.xml
2.Under eclipse workspace server folder,modify the server.xml here as well
Add the tls config below this section of commented code. I used port 8443 for https
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector
SSLEnabled="true"
clientAuth="false"
keyAlias="myappcert"
keystoreFile="/Users/rkala/Downloads/apache-tomcat-7.0.93/conf/myapp.keystore"
keystorePass="password which you supplied while generating the certificate using keytool"
maxThreads="200"
port="8443"
scheme="https"
secure="true"
sslProtocol="TLS"
/>
Step 4) Catalina policy permission:
Modify the catalina.policy file located in /conf folder of tomcat installation directory
Search for below keyword(grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar) and replace all the code with single line as mentioned below
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
permission java.security.AllPermission;
};
Step 5) Modify the eclipse.ini file and add the below entries and then restart the eclipse.
-vmargs
-Djavax.net.ssl.trustStore=/Users/rkala/Downloads/apache-tomcat-7.0.93/conf/myapp.keystore
-Djavax.net.ssl.trustStorePassword=password which you supplied at step 1
Now you should be able to launch the application and will be able to access it via https
I assume you are referring to running tomcat from within Eclipse. By default the server instances managed by Eclipse (projects in their own right) each have their own separate copies of the tomcat config files (server.xml, context.xml, tomcat-users.xml etc) based on the locally installed runtime version selected at creation. So if the SSL connector is not enabled within that configuration then it won't be started. This allows you to have more than one tomcat instance running at the same time, each with a different config.
To edit the configuration for an Eclipse managed tomcat instance, look for Servers in the project explorer, open your instance and edit the server.xml to uncomment the SSL connector tag which will look something like:
<Connector SSLEnabled="true" clientAuth="false" maxThreads="150" port="8443" protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>
You may also need to create a keystore for tomcat if you haven't already - see the docs for more info: http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html.
Restart tomcat from within Eclipse and try the secure address. Hope that helps.
I deleted the server in Eclipse and add it again and now everything appears to be working. Thanks to all who viewed and inputted.

Netbeans 7.3.1 FTP downloading issue on Mac ("I won't open connection to" error..."

I've set up a new PHP project on NetBeans, configured the FTP manager to open a standard (pure) FTP connection to my host...'Test Connection' works successfully ... FileZilla
works fine to log in to host + open + edit files (normal FTP operations).
Just can't get it to download my files in Netbeans ... very frustrating
USER hicksads 331 User hicksads OK. Password required PASS ** 230
OK. Current restricted directory is / PBSZ 0 200 PBSZ=0 TYPE I 200
TYPE is now 8-bit binary CWD /public_html 250 OK. Current directory is
/public_html PWD 257 "/public_html" is your current location CWD
/public_html 250 OK. Current directory is /public_html PWD 257
"/public_html" is your current location SYST 215 UNIX Type: L8 PORT
192,168,100,18,194,238
500 I won't open a connection to 192.168.100.18 (only to 110.142.50.242)
QUIT 221-Goodbye. You uploaded 0 and
downloaded 0 kbytes. 221 Logout.
Any help much appreciated!
I was in a hotel room and needed to download all the files for a project.
When downloading with netbeans on a pc...
I wont open a connection to ip address only to ip address...
after some searching it was this post that helped me.
1. find the remote connection row and click manage
2. most ftp accounts will need port 2
3. at the bottom there is a check box for passive mode. Check it.
test connection and if succesfull you are ready to download.

xdebug not talking to Eclipse debugger

I'm trying to get Eclipse to talk to xdebug. From the xdebug log, it seems that xdebug is working correctly (i.e.: it's sending it's <init> and <response> messages), but Eclipse is not sending anything to xdebug (i.e.: no feature_set, feature_get, etc. commands like Netbeans).
Here's my setup:
Mac OS/X 10.7.5
Eclipse 4.2.1 "Juno"
PHP Development Tools (PDT) SDK Feature 3.1.1.201209101312
(Netbeans 7.1.2)
MAMP 2.1.1 running:
apache 2.2.22
PHP 5.4.4
the PHP executable being run is /Applications/MAMP/bin/php/php5.4.4/bin/php
the PHP config file being used is /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
xdebug 2.2.0
The relevant lines from my php.ini are:
[xdebug]
zend_extension = "/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable = on
xdebug.remote_enable = on
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_autostart = on
xdebug.remote_handler = "dbgp"
xdebug.remote_autostart = on
xdebug.remote_mode = "req"
xdebug.remote_connect_back = on
xdebug.remote_log = /tmp/xdebuglog.log
I can get Netbeans to connect to xdebug on port 9000 with session ID netbeans-xdebug with no problem. Note that when I start debugging, it opens a new window in my web browser with ?XDEBUG_SESSION_START=netbeans-xdebug appended to the URL of the PHP file I'm running.
Here is a snippet from the xdebug log when Netbeans tries to connect:
Log opened at 2013-01-18 18:42:52
I: Checking remote connect back address.
I: Remote address found, connecting to ::1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Applications/MAMP/htdocs/projectname/index.php" language="PHP" protocol_version="1.0" appid="647" idekey="netbeans-xdebug"><engine version="2.2.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>
<- feature_set -i 0 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>
<- feature_set -i 1 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>
<- feature_set -i 2 -n max_children -v 30
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>
<- feature_get -i 3 -n max_data
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="3" feature_name="max_data" supported="1"><![CDATA[1024]]></response>
<- stdout -i 4 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="4" success="1"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="break" reason="ok"><xdebug:message filename="file:///Applications/MAMP/htdocs/projectname/index.php" lineno="17"></xdebug:message></response>
<- stack_get -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="6"><stack where="{main}" level="0" type="file" filename="file:///Applications/MAMP/htdocs/projectname/index.php" lineno="17"></stack></response>
…
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="14" status="stopping" reason="ok"></response>
Log closed at 2013-01-18 18:47:21
In Eclipse…
I created a new PHP Project in the workspace, using the default PHP settings, and created separate folders for source files and public resources. I changed nothing in the PHP Include Path step, but in the PHP Build Path, I clicked Link Source and linked /Applications/MAMP/htdocs/projectname with a projectname folder in my project.
I then set Eclipse preferences as follows:
In General -> Web Browser, I've set it to use an external web browser (Firefox).
In PHP -> Debug -> Installed Debuggers, I've checked that XDebug is in the list, is using port 9000, JIT remote sessions are off, and I used these instructions to ensure it uses the idekey mparker17.
In PHP -> Debug, I:
Set the PHP Debugger to "XDebug"
Set the PHP Server to the correct base URL (http://projectname.local) local web root (/Applications/MAMP/htdocs/projectname) and path mapping between the server and my workspace.
Set the PHP Executable to the correct executable path (/Applications/MAMP/bin/php/php5.4.4/bin/php), PHP ini file (/Applications/MAMP/bin/php/php5.4.4/conf/php.ini), the SAPI type to "CLI" and the PHP debugger to "XDebug".
Checked the Enable CLI Debug checkbox.
Checked the Break at first line checkbox.
In my debug configurations, I added a PHP Web Application and set it's preferences as follows:
In the Server tab I set the PHP server created above, set the file correctly, and set the URL correctly.
Here is a snippet from the xdebug log when Eclipse tries to connect:
Log opened at 2013-01-18 17:33:48
I: Checking remote connect back address.
I: Remote address found, connecting to ::1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Applications/MAMP/htdocs/projectname/index.php" language="PHP" protocol_version="1.0" appid="703" idekey="mparker17"><engine version="2.2.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
Log closed at 2013-01-18 17:33:49
This seems to indicate to me that Eclipse isn't talking to xdebug, but I'm stumped as to why that would be happening.
JIT remote sessions are off
Turn it on.