View Issue Details

IDProjectCategoryView StatusLast Update
0001240XdebugInstallationpublic2015-12-29 19:50
ReporteryounessAssigned Toderick 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSUbuntuOS Versionubuntu 14.04
Product Version2.4.0rc3 
Target VersionFixed in Version 
Summary0001240: Unable to get working Xdebug with php7.0.1
DescriptionI've compiled PHP7 myself, and I download the last version of Xdebug.

I've used as installation method the Installation From Source,
after Xdebug.so move and the add zend_entension="path_to_xdebug/xdebug.so" to php.ini when I try to restart php-fpm it's giving an error:
- undefined symbol: complier_globals
Steps To Reproduce#required softwares
apt-get install -y libfcgi-dev libfcgi0ldbl libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev \
libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-dev

ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && ln -s /usr/lib/insserv/insserv /sbin/insserv

#php download and compile
mkdir -p /usr/php7
mkdir /usr/local/src/php-build
cd /usr/local/src/php-build
read -r -p "requires software and directory finish, Press space to continue..." key

wget http://de1.php.net/get/php-7.0.1.tar.bz2/from/this/mirror -O php-7.0.1.tar.bz2
tar jxf php-7.0.1.tar.bz2
wget http://pecl.php.net/get/pthreads-3.1.5.tgz
tar zxvf pthreads-3.1.5.tgz
cd php-7.0.1 && mv ../pthreads-3.1.5 ../pthreads && mv ../pthreads ext/pthreads
read -r -p "php and extensions download and uncompress finish, Press space to continue..." key

./buildconf --force
./configure --help | grep pthreads
read -r -p "reconfigure force finish, Press space to continue..." key

./configure --enable-debug --enable-xdebug --prefix=/usr/php7 --with-libdir=/lib/x86_64-linux-gnu/ --with-zlib-dir --with-freetype-dir --enable-mbstring \
--with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --disable-rpath \
--enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl \
--enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli \
--with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr \
--enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp \
--with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm --enable-maintainer-zts \
--enable-pthreads=shared -with-tsrm-pthreads

read -r -p "Php compile configure finish, Press space to continue..." key
make

read -r -p "Php compile finish, Press space to continue..." key
make install

cp /usr/local/src/php-build/php-7.0.1/php.ini-production /usr/php7/lib/php.ini
cp /usr/php7/etc/php-fpm.conf.default /usr/php7/etc/php-fpm.conf
cp /usr/php7/etc/php-fpm.d/www.conf.default /usr/php7/etc/php-fpm.d/www.conf
#sudo sed -i "s/;pid =.*/pid = run/php-fpm.pid/" /usr/php7/etc/php-fpm.conf

read -r -p "Php install finish, Press space to continue..." key
cp /vagrant/ubuntu_server_requires/php7-fpm /etc/init.d/php7-fpm
chmod 755 /etc/init.d/php7-fpm && sudo insserv php7-fpm

read -r -p "Php fpm configuration finish, Press space to continue..." key
cp /vagrant/ubuntu_server_requires/php7-fpm.service /etc/systemd/system/php7-fpm.service
cp /vagrant/ubuntu_server_requires/php7-fpm.service /etc/init.d/php7-fpm.service
sudo update-rc.d php7-fpm.service defaults
#systemctl daemon-reload
echo "zend_extension=opcache.so" >> /usr/php7/lib/php.ini
echo "<?php echo phpinfo();?>" >> /var/www/index.php
echo "extension=pthreads.so" >> /usr/php7/lib/php-cli.ini
/etc/init.d/php7-fpm start
sudo ln -s /usr/php7/bin/php /sbin/php

# xdebug install
wget http://xdebug.org/files/xdebug-2.4.0rc3.tgz
tar -xzf xdebug-2.4.0rc3.tgz
cd xdebug-2.4.0RC3/
phpize
./configure --enable-xdebug
make
cp modules/xdebug.so /usr/lib/xdebug.so
 
echo 'zend_extension="/usr/lib/xdebug.so"' >> /usr/php7/lib/php.ini
echo 'xdebug.remote_enable=1' >> /usr/php7/lib/php.ini
echo 'xdebug.remote_host=127.0.0.1' >> /usr/php7/lib/php.ini
TagsNo tags attached.
Operating System
PHP Version7.0.0-7.0.4

Activities

youness

2015-12-25 07:13

reporter   ~0003371

Sorry for the inconvenient but my problem is already solved I had to PHP version running on the same machine that was the problem, thanks and have a good day.

derick

2015-12-29 19:50

administrator   ~0003372

This is not a bug. Please refer to the support mailinglist for further related questions.

You run your default "phpize" - instead, you need to run the one that you just installed into the /usr/php7 prefix. This means that the wrong PHP headers are being picked up (the ones without ZTS mode), and hence "compiler_globals" does not exist.

You can fix this by calling the correct phpize. You can either prepend "/usr/php7/bin" to the path (preferred), or, just call the right phpize correctly with "/usr/php7/bin/phpize".

Issue History

Date Modified Username Field Change
2015-12-25 05:49 youness New Issue
2015-12-25 07:13 youness Note Added: 0003371
2015-12-29 19:50 derick Note Added: 0003372
2015-12-29 19:50 derick Status new => resolved
2015-12-29 19:50 derick Resolution open => no change required
2015-12-29 19:50 derick Assigned To => derick