Install Xdebug on Fedora

Source: Internet
Author: User
Tags unpack what php

Compiling

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

You compile Xdebug separately from the rest of PHP. Note, however, that's need access to the scripts ' phpize ' and ' php-config '. If your system does not has ' phpize ' and ' php-config ', you'll need to compile and install PHP from a source tarball fir St, as these script is by-products of the PHP compilation and installation processes. (Debian users can install the required tools with apt-get install php5-dev ). It is important that the source version matches the installed version as there be slight, but important, differences betw Een PHP versions. Once you has access to ' phpize ' and ' php-config ', do the following:

    1. Unpack the Tarball:tar-xzf xdebug-2.2.5.tgz. Note that you don't need to unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above.
    2. CD xdebug-2.2.5
    3. Run phpize:phpize (or/path/to/phpize if phpize is not in your path). Make sure your use of the phpize that is belongs to the PHP version, that's want to use Xdebug with. See this FAQ entry if you have some issues with finding which phpize to use.
    4. ./configure--enable-xdebug
    5. Make
    6. Make install

This step is complete, there will be a hint:

[Email protected] xdebug-2.2.5]$ sudo make installinstalling shared extensions:/usr/lib64/php/modules/+----------------------------------------------------------------------+ |  |   |  Installation Instructions |   |  =========================                                          |                                                                      |  |   | See http://xdebug.org/install.php#configure-php for instructions || About to enable Xdebug forPhp.  |                                                                      |  |   | Documentation is available online asWell: |   | -AListOf all Settings:http://xdebug.org/docs-settings.php || -AListOf all Functions:http://xdebug.org/docs-functions.php || -Profiling Instructions:http://xdebug.org/docs-profiling2.php || -Remote Debugging:http://xdebug.org/docs-debugger.php ||  |                                                                      |  |   |  Note:please Disregard the message |       |  You should add "extension=xdebug.so" to PHP.ini |   | That's emitted by the PECL installer. This does isn't work for|   |                                                            Xdebug.  |                                                                      |  | +----------------------------------------------------------------------+[email protected] xdebug-2.2.5]$ ll/usr/lib64/php/modules/ Total10988-rwxr-xr-x. 1 root root 32568 Jan 17:09 bcmath. So-rwxr-xr-x. 1 root root 24696 Jan 17:09 bz2. So-rwxr-xr-x. 1 root root 33752 Jan 17:09 calendar. So-rwxr-xr-x. 1 root root 15568 Jan 17:09 CType. So-rwxr-xr-x. 1 root root 86912 Jan 17:09 Curl. So-rwxr-xr-x. 1 root root 180608 Jan 17:09 dom. So-rwxr-xr-x. 1 root root 65496 Jan 17:09 exif. So-rwxr-xr-x. 1 root root 2713344 Jan 17:09 FileInfo. So-rwxr-xr-x. 1 root root 53624 Jan 17:09 ftp. So-rwxr-xr-x. 1 root root 120896 Jan 17:09 gd. So-rwxr-xr-x. 1 root root 15640 Jan 17:09 gettext. So-rwxr-xr-x. 1 root root 45080 Jan 22 17:09Iconv. So-rwxr-xr-x. 1 root root 40840 1 json. So-rwxr-xr-x. 1 root root 1420712 Jan 17:09 mbstring. So-rwxr-xr-x. 1 root root 45256 Jan 17:09 mcrypt. So-rwxr--r--. 1 root root 329181 Feb 23:04 memcached. So-rwxr--r--. 1 root root 288786 Feb 23:04 memcache. So-rwxr-xr-x. 1 root root 141320 Jan 17:09 mysqlnd_mysqli. So-rwxr-xr-x. 1 root root 53544 Jan 17:09 mysqlnd_mysql. So-rwxr-xr-x. 1 root root 2362280 Jan 17:09 mysqlnd. So-rwxr-xr-x. 1 root root 32896 Jan 17:09 pdo_mysqlnd. So-rwxr-xr-x. 1 root root 116240 Jan 17:09 PDO. So-rwxr-xr-x. 1 root root 29168 Jan 17:09 pdo_sqlite. So-rwxr-xr-x. 1 root root 271984 Jan 17:09 Phar. So-rwxr-xr-x. 1 root root 32880 Jan 17:09 POSIX. So-rwxr--r--. 1 root root 1075737 Feb 23:04 redis. So-rwxr-xr-x. 1 root root 15624 Jan 17:09 shmop. So-rwxr-xr-x. 1 root root 54168 Jan 17:09 simplexml. So-rwxr-xr-x. 1 root root 91368 Jan 17:09 sockets. So-rwxr-xr-x. 1 root root 51328 Jan 17:09 sqlite3. So-rwxr-xr-x. 1 root root 19880 Jan 17:09 sysvmsg. So-rwxr-xr-x. 1 root root 11496 Jan 17:09 Sysvsem. So-rwxr-xr-x. 1 root root 15720 Jan 17:09 sysvshm. So-rwxr-xr-x. 1 root root 53896 Jan 17:09 tidy. So-rwxr-xr-x. 1 root root 19712 Jan 17:09 tokenizer. So-rwxr-xr-x. 1 root root 36720 Jan 17:09 wddx. So-rwxr-xr-x 1 root root 925237 Mar 23:27 xdebug. So-rwxr-xr-x. 1 root root 32888 Jan 17:09 XmlReader. So-rwxr-xr-x. 1 root root 54080 Jan 17:09 XML. So-rwxr-xr-x. 1 root root 49152 Jan 17:09 XmlWriter. So-rwxr-xr-x. 1 root root 37104 Jan 17:09 xsl. So-rwxr-xr-x. 1 root root 62480 Jan zip.so

/wherever/you/put/it/xdebug.so is/usr/lib64/php/modules/xdebug.so.

Configure PHP to use Xdebug
  1. Add the following line to Php.ini:zend_extension= "/wherever/you/put/it/xdebug.so". For PHP versions earlier than 5.3 and threaded usage of PHP (Apache 2 worker MPM or the ISAPI module), Add:zend_ extension_ts= "/wherever/you/put/it/xdebug.so" instead. Note: In case you compiled PHP yourself and used--enable-debug you would has to use zend_extension_debug=. From PHP 5.3 onwards, all need to use of the zend_extension php.ini setting name, and not zend_extension_ts, nor Z End_extension_debug. However, your compile options (zts/normal build; debug/non-debug) still need to match with what PHP is using.
  2. Restart your webserver.
  3. Write a PHP page that calls 'phpinfo ()' Load it in a browser and look for the info on the Xdebug module. If you see it next to the Zend logos, you have been successful! You can also use the ' php-m ' if you had a command line version of PHP, it lists all loaded modules. Xdebug should appear twice there (once under ' PHP Modules ' and once under ' Zend Modules ').

Install Xdebug on Fedora

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.