From 5f7fa1e3a5c9eb49293131ef2622055f16ff2ad8 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Sat, 24 Mar 2012 15:42:47 +0000 Subject: [PATCH] Rename find-binary.php to wizard.php. --- html/docs/include/features.php | 6 +- html/download.php | 2 +- html/find-binary.php | 136 +------------------------------- html/wizard.php | 137 +++++++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+), 139 deletions(-) create mode 100644 html/wizard.php diff --git a/html/docs/include/features.php b/html/docs/include/features.php index af9c3d8b..58ff7f39 100644 --- a/html/docs/include/features.php +++ b/html/docs/include/features.php @@ -31,7 +31,7 @@

There are a few precompiled modules for Windows, they are all for the non-debug version of PHP. You can get those at the download -page. Follow these instructions to get Xdebug +page. Follow these instructions to get Xdebug installed.

@@ -77,7 +77,7 @@

Compiling

-

There is a wizard available that provides you +

There is a wizard available that provides you with the correct file to download, and which paths to use.

You compile Xdebug separately from the rest of PHP. Note, however, @@ -1343,7 +1343,7 @@ function calls but also function calls made more levels up and down. look for a line extension=xdebug.so in any of the INI files that are listed under "Loaded Configuration File" and "Additional .ini files parsed" in the top block. Remove this line, and go back to the -Tailored Installation Instructions.

+Tailored Installation Instructions.

diff --git a/html/download.php b/html/download.php index c23cb1cb..02f7cc77 100644 --- a/html/download.php +++ b/html/download.php @@ -32,7 +32,7 @@ version at that time. The VCx marker tells with which compiler the extension was built, and Non-thread-safe whether ZTS was disabled. Those qualifiers need to match the PHP version you're using. If you don't know which -one you need, please refer to the custom +one you need, please refer to the custom installation instructions.

- -   - - - - -XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION
- - - -

Tailored Installation Instructions

- analyse( $_POST['data'] ); - - if ( ( $reason = $x->determineSupported() ) !== true ) - { - echo "

{$reason}

\n"; - } - else - { - $dlFile = $x->determineFile(); - $iniFile = $x->determineIniFile(); - $iniLine = $x->determineIniLine(); - - // add quotes when necessary - $x->extensionDir = strpos( $x->extensionDir, ' ') === false ? $x->extensionDir : "\"{$x->extensionDir}\""; - - if ( $x->xdebugAsPhpExt && !$x->xdebugAsZendExt ) - { - echo "

Instructions

\n"; - - echo "

Warning: You seem to have Xdebug loaded as a normal - PHP extension only. This will cause odd issues, please see the FAQ entry on it.

\n"; - } - else if ( $x->xdebugVersion && version_compare( $x->xdebugVersion, $x->xdebugVersionToInstall, '>=' ) ) - { - echo "

You're already running the latest Xdebug version

\n"; - echo "

But here are the instructions anyway:

\n"; - } - else - { - echo "

Instructions

\n"; - - if ( $x->zendServer ) - { - echo "

Warning: You - seem to be using Zend Server, which is known to cause - issues with Xdebug. It might work, but you're on your - own.

\n"; - } - } - - echo "
    \n"; - echo "
  1. Download {$dlFile}
  2. \n"; - if ( !$x->windows ) - { - echo "
  3. Unpack the downloaded file with tar -xvzf {$dlFile}
  4. "; - echo "
  5. Run: cd {$x->tarDir}
  6. \n"; - echo "
  7. Run: phpize

    -

    As part of its output it should show:

    -Configuring for:
    -...
    -Zend Module Api No:      {$x->phpApi}
    -Zend Extension Api No:   {$x->zendApi}
    -

    -

    If it does not, you are using the wrong phpize. Please follow -this FAQ entry and skip the next step. -

    \n"; - echo "
  8. Run: ./configure
  9. \n"; - echo "
  10. Run: make
  11. \n"; - echo "
  12. Run: cp modules/xdebug.so {$x->extensionDir}
  13. \n"; - } - else - { - echo "
  14. Move the downloaded file to {$x->extensionDir}
  15. \n"; - } - if ( $x->zendServer ) - { - $file = $x->windows - ? "{$x->zendServerInstallPath}{$x->dirSep}etc{$x->dirSep}cfg{$x->dirSep}debugger.ini" - : "{$x->zendServerInstallPath}{$x->dirSep}etc{$x->dirSep}conf.d{$x->dirSep}debugger.ini"; - echo "
  16. Open $file\n"; - echo "and put a ; in front of the line that says zend_extension_manager.dir.debugger=\n"; - echo "so that it says ;zend_extension_manager.dir.debugger=
  17. \n"; - } - echo "
  18. {$iniFile} and "; - echo $x->xdebugVersion ? "change " : ( $x->zendServer ? "add at the begining of the file " : "add " ); - echo "the line
    {$iniLine}
  19. \n"; - if ( $x->sapi !== 'Command Line Interface' ) - { - echo "
  20. Restart the webserver
  21. \n"; - } - echo "
\n"; - } - echo "

\n\tIf you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.\n

\n"; -} -else -{ +header( "Location: http://xdebug.org/wizard.php" ); ?> -

- This page helps you finding which file to download, and how to configure - PHP to get Xdebug running. Please paste the full output of - phpinfo() (either a copy & paste of the HTML version, the HTML source - or php -i output) and submit the form to receive tailored - download and installation instructions. Do not paste the raw HTML (from - view-source) into the form. -

-
-

- -

-

- The information that you upload will not be stored. The script will only - use a few regular expressions to analyse the output and provide you with - instructions. You can see the code here. -

-

- -

-
- - - - -   - - diff --git a/html/wizard.php b/html/wizard.php new file mode 100644 index 00000000..7eefea31 --- /dev/null +++ b/html/wizard.php @@ -0,0 +1,137 @@ + + +   + + + + +XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION
+ + + +

Tailored Installation Instructions

+ +analyse( $_POST['data'] ); + + if ( ( $reason = $x->determineSupported() ) !== true ) + { + echo "

{$reason}

\n"; + } + else + { + $dlFile = $x->determineFile(); + $iniFile = $x->determineIniFile(); + $iniLine = $x->determineIniLine(); + + // add quotes when necessary + $x->extensionDir = strpos( $x->extensionDir, ' ') === false ? $x->extensionDir : "\"{$x->extensionDir}\""; + + if ( $x->xdebugAsPhpExt && !$x->xdebugAsZendExt ) + { + echo "

Instructions

\n"; + + echo "

Warning: You seem to have Xdebug loaded as a normal + PHP extension only. This will cause odd issues, please see the FAQ entry on it.

\n"; + } + else if ( $x->xdebugVersion && version_compare( $x->xdebugVersion, $x->xdebugVersionToInstall, '>=' ) ) + { + echo "

You're already running the latest Xdebug version

\n"; + echo "

But here are the instructions anyway:

\n"; + } + else + { + echo "

Instructions

\n"; + + if ( $x->zendServer ) + { + echo "

Warning: You + seem to be using Zend Server, which is known to cause + issues with Xdebug. It might work, but you're on your + own.

\n"; + } + } + + echo "
    \n"; + echo "
  1. Download {$dlFile}
  2. \n"; + if ( !$x->windows ) + { + echo "
  3. Unpack the downloaded file with tar -xvzf {$dlFile}
  4. "; + echo "
  5. Run: cd {$x->tarDir}
  6. \n"; + echo "
  7. Run: phpize

    +

    As part of its output it should show:

    +Configuring for:
    +...
    +Zend Module Api No:      {$x->phpApi}
    +Zend Extension Api No:   {$x->zendApi}
    +

    +

    If it does not, you are using the wrong phpize. Please follow +this FAQ entry and skip the next step. +

    \n"; + echo "
  8. Run: ./configure
  9. \n"; + echo "
  10. Run: make
  11. \n"; + echo "
  12. Run: cp modules/xdebug.so {$x->extensionDir}
  13. \n"; + } + else + { + echo "
  14. Move the downloaded file to {$x->extensionDir}
  15. \n"; + } + if ( $x->zendServer ) + { + $file = $x->windows + ? "{$x->zendServerInstallPath}{$x->dirSep}etc{$x->dirSep}cfg{$x->dirSep}debugger.ini" + : "{$x->zendServerInstallPath}{$x->dirSep}etc{$x->dirSep}conf.d{$x->dirSep}debugger.ini"; + echo "
  16. Open $file\n"; + echo "and put a ; in front of the line that says zend_extension_manager.dir.debugger=\n"; + echo "so that it says ;zend_extension_manager.dir.debugger=
  17. \n"; + } + echo "
  18. {$iniFile} and "; + echo $x->xdebugVersion ? "change " : ( $x->zendServer ? "add at the begining of the file " : "add " ); + echo "the line
    {$iniLine}
  19. \n"; + if ( $x->sapi !== 'Command Line Interface' ) + { + echo "
  20. Restart the webserver
  21. \n"; + } + echo "
\n"; + } + echo "

\n\tIf you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.\n

\n"; +} +else +{ +?> +

+ This page helps you finding which file to download, and how to configure + PHP to get Xdebug running. Please paste the full output of + phpinfo() (either a copy & paste of the HTML version, the HTML source + or php -i output) and submit the form to receive tailored + download and installation instructions. Do not paste the raw HTML (from + view-source) into the form. +

+
+

+ +

+

+ The information that you upload will not be stored. The script will only + use a few regular expressions to analyse the output and provide you with + instructions. You can see the code here. +

+

+ +

+
+ + + + +   + +