开发者

Problem with debugging PHP with Eclipse and xdebug

Can you help me with the following problem? I have Eclipse Helios configured with xdebug under Ubun开发者_JAVA百科tu. When I start to debug a given page everything seems fine, I can attach to the break point I want, but the problem comes when I tray to step over/into, Firefox (my default browser for debugging) prompt me to "save as" the php page.


Have you checked to ensure that PHP, Apache and MySQL are running?

If they aren't running then you will not be able to run a PHP script.

I think the command in ubuntu (if not running on LAMPP) is "sudo apachectl start" to start apache/php

Then you can put your scripts in /var/www/html/


If you are running LAMPP (http://www.apachefriends.org/en/xampp-linux.html) then you can probably "sudo /opt/lampp/lampp start" to boot everything up.

Then install your scripts to /opt/lampp/htdocs/

After you've done all of that, you should be able to run it.


I assume you're using Apache as your webserver. If so, it seems that Apache doesn't know how to handle *.php files.

Have you added:

# Required modules: dir_module, php5_module

<IfModule dir_module>
    <IfModule php5_module>
        DirectoryIndex index.php index.html
        <FilesMatch "\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>
        <FilesMatch "\.phps$">
            SetHandler application/x-httpd-php-source
        </FilesMatch>
    </IfModule>
</IfModule>

to your apache configuration file? This should do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜