Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Unable to run as php web page
Unable to run as php web page [message #492105] Sun, 18 October 2009 18:50 Go to next message
Jim  is currently offline Jim Friend
Messages: 5
Registered: October 2009
Junior Member
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 #492160 is a reply to message #492105] Mon, 19 October 2009 08:03 Go to previous messageGo to next message
Eclipse UserFriend
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 #492258 is a reply to message #492160] Mon, 19 October 2009 15:45 Go to previous messageGo to next message
Jim  is currently offline Jim Friend
Messages: 5
Registered: October 2009
Junior Member
The same is happening if I uninstall PDT 2.2 and install PDT 2.1
Re: Unable to run as php web page [message #492368 is a reply to message #492258] Tue, 20 October 2009 09:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

You might want to take a look at
http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pd f

If you are still having problems, then you need to get an xdebug log
file by setting the xdebug.remote_log entry in your ini file. This is
described in the guide. Then if you could post the results of the log on
the forum I can take a look.

Dave Kelsey


On 19/10/09 16:45, Jim wrote:
> The same is happening if I uninstall PDT 2.2 and install PDT 2.1
Re: Unable to run as php web page [message #492409 is a reply to message #492368] Tue, 20 October 2009 11:25 Go to previous messageGo to next message
Jim  is currently offline Jim Friend
Messages: 5
Registered: October 2009
Junior Member
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 #492425 is a reply to message #492409] Tue, 20 October 2009 12:04 Go to previous messageGo to next message
Eclipse UserFriend
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
icon12.gif  Re: Unable to run as php web page [message #493854 is a reply to message #492105] Wed, 28 October 2009 10:00 Go to previous messageGo to next message
Matyas Mising name is currently offline Matyas Mising nameFriend
Messages: 1
Registered: October 2009
Junior Member
hey.

i was having the same problem as you did.

os: ubuntu 8.04
fresh installation of apache2 php5 (+xdebug) and mysql from the repositories
eclipse galileo jee + pdt 2.2

i could debug php scripts

if i tried debugging web pages (after setting up the browser) the page did open but the script ran as if no breakpoints were specified ( i also had the "break on first line" option checked)

(MY) SOLUTION:
in the ini file (generally php.ini [Xdebug] section, but in my case it was /etc/php5/conf.d/xdebug.ini) i only had the following line.

zend_extension=/usr/lib/php5/20060613+lfs/xdebug.so

after adding the lines below, the debugger started to work as expected.

xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
zend_extension=/usr/lib/php5/20060613+lfs/xdebug.so

hope this helps.

greetings,

matyas
Re: Unable to run as php web page [message #494058 is a reply to message #493854] Thu, 29 October 2009 01:56 Go to previous messageGo to next message
Jim  is currently offline Jim Friend
Messages: 5
Registered: October 2009
Junior Member
Thanks Matyas, unfortunately I didn't even get that far, my problem is the webpage won't open.
Re: Unable to run as php web page [message #496093 is a reply to message #492105] Sun, 08 November 2009 15:22 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
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 #496139 is a reply to message #496093] Mon, 09 November 2009 02:00 Go to previous messageGo to next message
Jim  is currently offline Jim Friend
Messages: 5
Registered: October 2009
Junior Member
It's been a while since I visited this problem, but I believe you still need to install php and apache separately, the all in one package doesn't include them.
Re: Unable to run as php web page [message #691946 is a reply to message #493854] Sat, 02 July 2011 22:35 Go to previous messageGo to next message
Tishcorp is currently offline TishcorpFriend
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 Go to previous messageGo to next message
Tishcorp is currently offline TishcorpFriend
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

Re: Unable to run as php web page [message #1281385 is a reply to message #691947] Mon, 31 March 2014 20:23 Go to previous messageGo to next message
Alaa Farouk is currently offline Alaa FaroukFriend
Messages: 1
Registered: March 2014
Junior Member
I had the same problem and I found a solution, thought of posting it here to help anyone who sees it.

I clicked on Window menu -> Show view -> Others, searched for Error Log and displayed it, I found a clear message that says port 10000 (which is used by Zend Debugger) is used. I do not use Zend at all, all my run configurations uses XDebug.
I went to Window menu-> Preferences -> PHP (In the left pane) -> Debug -> Installed Debuggers, set the Zend port to be 10020 instead of 10000, and now I can run my PHP pages on web browser normally.

Hope this helps.
Re: Unable to run as php web page [message #1350440 is a reply to message #496139] Mon, 12 May 2014 17:13 Go to previous messageGo to next message
Randy E. Barton is currently offline Randy E. BartonFriend
Messages: 2
Registered: May 2014
Junior Member
Jim wrote on Sun, 08 November 2009 21:00
It's been a while since I visited this problem, but I believe you still need to install php and apache separately, the all in one package doesn't include them.


Yes, I had the same problem, but it worked after installing php and apache separately.
Worth trying!
Re: Unable to run as php web page [message #1605562 is a reply to message #1281385] Sat, 07 February 2015 16:03 Go to previous messageGo to next message
Jonathan Jackson is currently offline Jonathan JacksonFriend
Messages: 1
Registered: February 2015
Junior Member
Alaa Farouk wrote on Mon, 31 March 2014 20:23
I had the same problem and I found a solution, thought of posting it here to help anyone who sees it.

I clicked on Window menu -> Show view -> Others, searched for Error Log and displayed it, I found a clear message that says port 10000 (which is used by Zend Debugger) is used. I do not use Zend at all, all my run configurations uses XDebug.
I went to Window menu-> Preferences -> PHP (In the left pane) -> Debug -> Installed Debuggers, set the Zend port to be 10020 instead of 10000, and now I can run my PHP pages on web browser normally.

Hope this helps.




Thank you Very much. This worked
Re: Unable to run as php web page [message #1611453 is a reply to message #1605562] Wed, 11 February 2015 11:21 Go to previous message
Omkar Soft is currently offline Omkar SoftFriend
Messages: 2
Registered: February 2015
Location: Bangalore
Junior Member
Thanks for sharing you ideas about running php web page.
Previous Topic:RSE on Eclipse Luna - Update Site down ?
Next Topic:How to disable DLTK indexing for a particular project or folder?
Goto Forum:
  


Current Time: Thu Oct 10 04:50:34 GMT 2024

Powered by FUDForum. Page generated in 0.05596 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top