Zend debugger in eclipse - timeout every time - php

I am running a virtual server in the US.
I am trying to get my eclipse machine at home (outside the USA), to connect to the USA server.
I have setup Zend on the server. When I run phpinfo() I get the following zend output. Note: 1.2.3.4 will be the external WAN IP address of my ADSL router at home.
Directive Local Value Master Value
zend_debugger.allow_hosts 127.0.0.1,1.2.3.4 127.0.0.1,1.2.3.4
zend_debugger.allow_tunnel no value no value
zend_debugger.deny_hosts no value no value
zend_debugger.expose_remotely always always
zend_debugger.httpd_uid -1 -1
zend_debugger.max_msg_size 2097152 2097152
zend_debugger.tunnel_max_port 65535 65535
zend_debugger.tunnel_min_port 1024 1024
So zend looks like it is working ok on the server side.
When I run a debug session and select 'Test Debugger' I get a timeout every time. I have already added dummy.php to the root folder of the server.
In 'installed debuggers' I double clicked on Zend and have put my external WAN IP address. I noticed that the port is 10000, I also have webmin running on this port on the server, will there be a conflict?

I had a similar error, and I read the apache error.log file. there was written the problem. What is in your error.log file?

Related

apache2 + MPM-ITK + PHP = socket doesn't work

I have 2 servers running an proprietary software that I can access by an specific port and sending/receiving JSON string.
In both servers, I have apache2 with ITK for each virtual host.
In server "A", I have an PHP script that uses socket to connect to server "A" and "B" to get data and display on webpage. The problem is that PHP can connect only to server "A" (localhsot), but can't connect to server "B". The PHP doesn't show any error (display_errors are on in php.ini) and when I try to get last error from socket (I don't remember the php function right now), I get nothing.
On apache log, I got this error:
Operation not permitted: AH02156: setgid: unable to set group id to
Group 0
There's no firewall blocking between hosts, I can 'telnet' both servers in any direction without any problem. Just PHP doesn't connect to 'external' hsot, just localhost.
The only change in my vhost file is to add itk option:
AssignUserId rpi rpi
So my question is: how to I configure apache-itk to allow my PHP to open external sockets?
I have tried to change LimitUIDRange to "LimitUIDRange 0 0", but no success.
maybe related to the Apache module:
mpm_itk_module
or
AssignUserId
Apache config.
Please see this links:
http://forum.ispsystem.com/showthread.php?t=2917
https://forum.root.cz/index.php?topic=15707.0
I'm trying to solve the same problem.
If you set LimitUIDRange 0 0, that means that only root is allowed, which doesn't make sense. The correct directives would be LimitUIDRange 0 65534 and LimitGIDRange 0 65534. As long as you don't set any hosts to be run as root, this is not any more insecure than default apache. Especialy does it not mean that website users are allowed to change their own user id. However, they will be allowed to run executables with the setuid bit set, like any other normal user.

How to fix WAMP page access when using IP Address instead of localhost in the URL

I have recently built my local test server WAMP by using Windows 7 Pro 64bit OS. I have also chosen to use the 32bit programs (Apache, MySQL & PHP) so my WAMP spec would be x86 V11 binary Thread Safe (TS). I want to keep all development related items into the C:\dev folder or directory, so my file system looks like this:
C:\dev\bin\apache24\
C:\dev\bin\MySQL5.6\
C:\dev\bin\PHP5.6\
C:\dev\www\phpMysqlAdmin
C:\dev\www\HollyGhost.com\login.php
Settings: my.ini
# Path to the installation directory.
basedir = "C:/dev/bin/MySQL5.6/"
# Path to the database data directory
datadir = "C:/dev/bin/MySQL5.6/data/"
# The TCP/IP Port the MySQL Server will listen on
port = 3306
# Server Id.
server_id = 1
C:\Winows\System32\drivers\etc\hosts
127.0.0.1 localhost
If I need to view the web site: http://localhost/HollyGhost.com/login.php the site comes up without any issues and works great; but if I rewrite the URL on the same box to: http://127.0.0.1/HollyGhost.com/login.php the site renders the login page but I cannot log into the system. All I am getting when I attempt to log in is the login page keeps refreshing. I tried to do the same from another PC and I am getting the same result. I need to do this so I can test other devices locally.
Any help is greatly appreciated. I am not sure if this issue is a permission problem based on the fact that MySQL data is stored in the \MySQl5.6\data directory. If so, how do I go about fixing it.
The problem was in the Windows Firewall -> Advance setting -> Inbound Rules. The Inbound Rules for MySQL Profile was set to Private and the Program was set to Any. I change Profile to "Domain, Private" and set Program to point to MySQL installation directory "MySQL.exe" this works for me after rebooting all network devices and PCs.

xampp not working, just installed

I just downloaded xampp from "https://www.apachefriends.org/index.html" this link, and switched off my defender as it asked me to, after instaling, i ran it and switched on mysql and clicked admin on the gui but i get this " The web page is not available ", even though mysql is stil higlighited green in the ui, i even tried localhost:3306 as my port is 3306 and my pid is 4584, but still got " the web page not available" am i doing anything wrong here?
Check your server error logs under <XAMPP_INSTALLATION_PATH>/apache/logs/ directory. It will guide you if any port is already occupied.
I agree with #ErasmoOliveira as most of the time I faced similar thing & exiting skype fixed this issue.
run your XAMPP, then click Setup (Apache line), click on Apache (httpd.conf). in this file find the line Listen 80, change 80 with another port, example: type 81 or 8080 or whatever you want but that it respects the format /^[8]{1}[\d]{1, 3}$/
restart apache again, you will surely work correctly by tapping to your browser http://localhost:81 (if you replaced the port to 81)

Phpstorm, xdebug and vagrant still waiting for incoming connection

This is annoying me, mainly because it was working fine then all of a sudden breakpoints stopped breaking and when i checked debugger it was just waiting for incoming connection.
My vagrant machine is running on private_ip: 192.168.13.37
My xdebug.ini config is as follows:
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable = on
xdebug.remote_connect_back = on
xdebug.remote_port = 9020
These are my PHPstorm debug settings:
I have a vagrant server setup in PHPstorm which has a host of dev.website.com which points at the correct IP in windows host file, the port is 80 and the folders are mapped correctly.
I also have PHP application set up to use the explained server which a start url of / .
I have clicked start listening for PHP debug connections, then clicked the little green bug icon to start debugging. This launches the project with the following query string ?XDEBUG_SESSION_START=18359 but when I look in PHPstorm in the debug window it will say waiting for incoming connection with ide key 18359
Any ideas how to get it working again?
Edit
Added xdebug log : pastebin
Had identical problem, what helped me is setting :
xdebug.remote_autostart = 1
my other settings are:
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9010
xdebug.idekey=phpstorm
xdebug.remote_autostart = 1
xdebug.remote_handler=dbgp
xdebug.remote_host=10.0.2.2
You say you have a server setup pointing to port 80? That could be the problem.
I have a vagrant server setup in PHPstorm which has a host of dev.website.com which points at the correct IP in windows host file, the port is 80 and the folders are mapped correctly.
Do you use PHP Remote Debug?
If it's the server setup from the screenshot, change the port there to 9020 or whatever you desire to use.
My First steps of checking why xDebug isn't working:
Set Break at first Line in the PHPStorm preferences
preferences->languages&frameworks->PHP->debug ( search break at first )
Enable the break at first Line feature
Still not working?
What does your phpinfo say?
Is xDebug enabled and do all the settings match?
phpinfo()
If not try this https://xdebug.org/wizard.php and check out this Tutorial
If so try
Is there maybe a firewall blocking your port?
No?
ok ->
vagrant ssh
netstat -an | grep 9000
Check if the port is listening and is not blocked by anything.
I would recommend using port 9000, had issues with others.
I recently had an issue with hhvm blocking the port.
I purged it from the system.
If everything looks fine, try to use phpstorms remote debug feature and map explicitly your index.php file of your project/s.
Also maybe try not to use numeric values as your idekey
XDEBUG_SESSION_START=18359
Most people use something like this:
XDEBUG_SESSION_START=PHPSTORM
you can add an idekey to your xdebug.so
would look like this
xdebug.idekey=PHPSTORM
Small list with xdebug parameters: https://xdebug.org/docs/basic
My current projects phpstorm config looks like this:
This is a plugin for setting the session cookie in the browser
https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
I had a problem very similar with my two hosts on remote server.
One was called dev.host.com, the other 123.host.com (which was corresponding to a temporary version number).
My problem was that dev.host.com was working perfectly fine with xdebug in phpstorm while the other host was always waiting for incoming connection.
I spent some hours to look why, but found nothing concluant by changing my xdebug parameters, my phpstorm conf, my folders permissions,... until I renamed my 123.host.com with some alphabetical characters like 'abc.host.com' and..... it started working !
So I would advise you to be careful with the name you choose for your host, I think it was not mapped correctly... Weird but solved on my side.

Blank pages shown by wamp server even after changing port number

When i run my wamp server and run localhost:80 in chrome browser, It is showing me blank page. Then i changed my port number to 84 in httpd.conf file. Even then it is showing blank page.
I tried with different port numbers(85, 86, 8084) and also stopped skype process which uses port 80.
Could any one suggest me how to solve this problem?
You'd likely get a 404 if your webserver were misconfigured. A blank page typically means a PHP error.
Check your error logs. You can find the log location in httpd.conf
Fix your PHP issue. The logs have the file and line number.
1) You have to restart wamp server every time you change something in your config
2) Set everything back to default in wamp server or just re-install it
3) Open up skype, go to Tools -> Options..., Go to Advanced -> Connection And uncheck Use port 80 and 443 as alternatives for incoming connections -> Save
4) Launch WAMP again -> enjoy :)
Same issue, here is the solution !
(there is more than one file to change in order to go to different port)
Cause :
Another program (Skype but not only) is using the port80 (which is by default the one used by wamp).
You can see it typing the following command "netstat -ano" and looking what is on "localadress 0.0.0.0.80", if you want to see the concerned program open, note the number at the end of the line (4 for example), then open taskmanager, services, and see who is on PID 4.
Solution :
Let's change wamp port to 81 !
Change wamp port from 80 to 81

Categories