View Issue Details

IDProjectCategoryView StatusLast Update
0000811XdebugUncategorizedpublic2012-12-24 12:48
ReporterVirsacer Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version2.2.2Fixed in Version2.2.2 
Summary0000811: PHP Documentation Link
Description

PHP has the built in config vars docref_root and docref_ext for generating links in error messages. Xdebug should use them instead of its own manual_url.
You could use a default value if they are not set, but there shoudnt be 2 vars for the same purpose...

The links generated by PHP are not clickable in the browser (see screenshot)

Steps To Reproduce

Set docref_root and force a php error...

TagsNo tags attached.
Operating System
PHP Version5.4.0

Activities

derick

2012-04-22 13:40

administrator   ~0002067

Hi,

I do not disagree and it was kind of interesting to figure out why I added it in the first place. Seems like I added it on June 6th, 2002: https://github.com/derickr/xdebug/commit/e2b429e611c77b493e22634ce096787dfbc94c38 . This was before PHP introduced docref on August 8th, 2002: https://github.com/derickr/php-src/commit/88c385e8176c50d0cfe1d5203cd0ce40859a1b68

I'll get rid of it in 2.2.1.

cheers,
Derick

derick

2012-06-27 21:13

administrator   ~0002301

Fixed on github for 2.2.1 and 2.3.

Virsacer

2012-06-28 18:22

reporter   ~0002308

Last edited: 2012-06-28 18:23

Thanks for the fix, but there are still two small issues:

  1. The slash needs to be part of the variable (PHPs behaviour):
    return xdebug_sprintf("<a href='%s%s%s' target='_new'>%s</a>\n",
    (PG(docref_root) && PG(docref_root)[0]) ? PG(docref_root) : "http://www.php.net/",

  2. The nameformat in the downloadable manual is i.e "function.mysqli-connect" instead of "mysqli_connect"

So now I get http://127.0.0.1/PHP//mysqli_connect.html instead of http://127.0.0.1/PHP/function.mysqli-connect.html

This format is also supported by the online doc: http://www.php.net/function.mysqli-connect

fwendt

2012-09-17 14:00

reporter   ~0002347

I was trying to setup Xdebug v2.2.1 at Apache 2.4.2/PHP 5.4.4 at a Linux machine and i got just there, with the same issue. So, as Virsacer reporter, i have the same problem: currently, its not possible to make Xdebug works with PHP.ini "docref_root" local documentation linkage, at a dev machine.

The sintax used by Xdebug linkage is point to function references is wrong to pharse local manual entries. Even online entries too.

I believe the "function.*" should be added at the pharsed issue, as well as the correct handler-mapping pointed above. Maybe, this just get working fine if it only follows the default PHP.ini "docref_root" behavior.

Best regards.

derick

2012-12-24 12:48

administrator   ~0002402

I've further committed code for this - it should work now.