|
Re: Unable to run as php web page [message #492160 is a reply to message #492105] |
Mon, 19 October 2009 08:03 |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
Can you recreate the problem using PDT 2.1 ?
Dave Kelsey
On 18/10/09 19:51, Jim wrote:
> Hi,
>
> I just installed latest version of Eclipse 3.5 and PDT, setup xdebug
> integration, but I couldn't use debug/run as php web page, when I try to
> do this or try to run/debug via run/debug configuration dialog, nothing
> happens, there is no browser opening the page. I can run the php file as
> script though.
>
> My environment:
> Windows XP
> Eclipse 3.5 + PDT 2.2 (+ IDE For Java EE 1.2.1)
> PHP 5.2.9
> Apache 2.2
>
> My setup:
> Preferences->PHP->PHP Servers: I added
> URL=http://localhost
> Path on server=<Path to my local apache htdocs directory>
> Path in Workspace=/Test (I have a PHP project named Test pointing to
> apache's htdocs)
>
> Preferences->PHP->PHP Executables: Executable path: <My local php.exe>
> SAPI Type: CLI
> PHP debugger: XDebug
>
> Preferences->PHP->Debug:
> PHP Debugger: XDebug
> Server and PHP Executable: The ones I added above
>
> Run Configurations->PHP Web Page: I added
> Server Debugger: XDebug
> PHP Server: The one I added above
> File: /Test/test.php
> URL: http://localhost/ /test.php
>
> Any idea what's wrong?
>
> Thanks
>
|
|
|
|
|
|
Re: Unable to run as php web page [message #492425 is a reply to message #492409] |
Tue, 20 October 2009 12:04 |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
Ah ok, sorry I was under the impression you where trying to debug a web
page. So you create a run configuration with some autogenerated URL but
when you press run, nothing happens is that correct ?
You need to see what browser eclipse is set to. Go into
Window-->Preferences and expand the General tab and highlight "Web
Browser". You have a choice of internal or external, try setting it to
external and if there are no external browsers defined, define one using
the New button. See if that helps. You could also try changing the
debugger to Zend Debugger as well in the run configuration and see if
that makes a difference (as you aren't debugging it shouldn't be a
problem which debugger is selected).
Dave Kelsey
On 20/10/09 12:25, Jim wrote:
> So this is an xdebug problem? Is xdebug involved when I use run as (not
> debug as)?
>
> I just tried to disable xdebug in php.ini, and try the run as again,
> still doesn't work. Can this prove the problem is not in xdebug? Or do I
> need to make other changes to Eclipse preference to disable xdebug?
>
> Thanks
|
|
|
|
|
Re: Unable to run as php web page [message #496093 is a reply to message #492105] |
Sun, 08 November 2009 15:22 |
No real name Messages: 1 Registered: November 2009 |
Junior Member |
|
|
I'm having a similar issue. I've installed the latest version of PDT from the Eclipse PHP website.
Eclipse will not run .php files either locally w/in the IDE, or w/in a browser.
It doesn't appear that PHP or Apache are installed, even though I downloaded the PDT packaged labeled "all packages included". ( http://www.eclipse.org/downloads/download.php?file=/technolo gy/epp/downloads/release/galileo/SR1/eclipse-php-galileo-SR1 -win32.zip)
Is that even possible? How could it include all packages, but not have PHP and Apache, or be able to run PHP out of the box?
Do I need to download and install apache and php separately? Or, should these have been included? And, if they were included, how do I get them installed and running? None of the tutorials, how-to guides, videos, or configuration instructions seem to cover how to simply run PHP w/in the Eclipse IDE.
Very confused... thanks in advance for any help anyone can provide.
|
|
|
|
Re: Unable to run as php web page [message #691946 is a reply to message #493854] |
Sat, 02 July 2011 22:35 |
Tishcorp Messages: 2 Registered: July 2011 |
Junior Member |
|
|
Hi All,
I got the same issue, able to debug using the php option but the web page option did not worked.
I had two issues.
1. My McAffee firewall settings was blocking port 9000 which is the port that XDebug is configured to listen. Make sure you have a rule that open this port.
2. The solution that Matyas wrote is important. Xdebug configuration guides did not mention anything about adding these entries to the php.ini file. I had my php.ini file pointing only to the dll.
After I adde the following entries, debugging with the browser worked.
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
-------------------php ini section modified to enable web debugging----------
; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.
zend_extension = C:\Web\PHP\ext\php_xdebug-2.1.1-5.3-vc6.dll
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
--------------------------------------------------------------------------------
There are other settings in eclipse that you need to configure. I found an excellent guide that explains step by step how to set up XDebug or the other debugger in eclipse.
I'm uploading the file for your referece.
Cheers
Tishcorp
[Updated on: Sat, 02 July 2011 22:53] Report message to a moderator
|
|
|
Re: Unable to run as php web page [message #691947 is a reply to message #493854] |
Sat, 02 July 2011 22:46 |
Tishcorp Messages: 2 Registered: July 2011 |
Junior Member |
|
|
By the way I forgot to mention.
If you are at the point where eclipse php script debug opiton works for you is because you already solve for all the installation prerequisites and guides. And this issue will be resolved by adding this four parameters in your php.ini
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
One of the main issues that you need to solve in the installation of Xdebug is to downoload the dll that is compatible with your Apache server version. Some versions of Apache were compiled with different compilers and the Xdebug library should be compatible with the Apache server version.
In my case this below you'll find the liabrary compiled for my apache server. If you read the Xdebug installation guides they recommend to copy the dll under the ext sub folder located where you have installed PHP. In my case, you can see the route below
zend_extension = C:\Web\PHP\ext\php_xdebug-2.1.1-5.3-vc6.dll
When I was using a DLL that was not compatible with Apache eclipse was not able to load the debugging environment, I did not get any errors, it just didn't do anything.
Ensure you check this. If you are not sure, don't have patiente to read the techical differences of apache installations and how serevers are configured, trial and error would work since there are 5 dlls for windows that you can try to see if they are compatible.
In a windows environment you just need to download the dll adn copy it into the folder. This is pretty simple stuff. If you are using linux or any other version of unix you might need to understand the diferences because you'll need to complile the Xdebug version manually.
[Updated on: Sat, 02 July 2011 22:51] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03926 seconds