Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need the imageantialias() to work on the server I built. I have complied PHP before but for some reason I can't do it any more. I ran these steps to try:

  1. apt-get source php5
  2. apt-get build-dep php5
  3. cd php5-*
  4. nano debian/rules
  5. find this line --with-gd=shared,/usr --enable-gd-native-ttf \ and remove ,/usr
  6. save and exit
  7. nano debian/setup_mysql.sh
  8. search for Start the daemon
  9. add –user=root after the mysqld
  10. save and exit
  11. dpkg-buildpackage –rfakeroot -us –uc -d

then it runs for a long time and then it ends here:

make[1]: Leaving directory `/usr/src/php5-5.3.10/cgi-build'
    sed -i -e 's/-d output_buffering=1 -d open_basedir="" -d safe_mode=0/-d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d memory_limit="-1"/' \
           /usr/src/php5-5.3.10/pear-build/usr/bin/pear && \
    sed -i -e 's/-d output_buffering=1 -d safe_mode=0/-d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d memory_limit="-1"/' \
           /usr/src/php5-5.3.10/pear-build/usr/bin/pecl && \
    sed -i -e 's/-d memory_limit="-1"//' \
           -e 's/-d output_buffering=1 -d open_basedir="" -d safe_mode=0/-d output_buffering=1 -d open_basedir="" -d safe_mode=0 -d memory_limit="-1"/' \
           /usr/src/php5-5.3.10/pear-build/usr/bin/peardev
    sed -i -re "s#('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR)#\1 . '/pear'#" /usr/src/php5-5.3.10/pear-build/usr/share/php/PEAR/Config.php
    patch -s -d /usr/src/php5-5.3.10/pear-build/usr/share/php/ -p1 -i /usr/src/php5-5.3.10/debian/patches/PEAR-Builder-print-info-about-php5-dev.patch
    touch build-pear-stamp
    mkdir -p temp_session_store
    # start our own mysql server for the tests
    /bin/sh debian/setup-mysql.sh 2963 /usr/src/php5-5.3.10/mysql_db
make: *** [test-results.txt] Error 1
    dpkg-buildpackage: error: debian/rules build gave error exit status 2

I tried it without modifying the setup-mysql.sh as well but the same thing happens. I'm not really sure why this isn't working. I know the last time I did this I had a lot of trouble. Also I've tried this on two separate 12.04 servers with the same problem.

share|improve this question
    
there are some of the things I've looked up mapopa.blogspot.com/2012/06/… –  Stephen Jesse Jun 2 '13 at 1:04
    
Why are you going to all this trouble? You could just install Red Hat/CentOS and have it working in as long as it takes to download the php-gd package. –  Michael Hampton Jun 2 '13 at 3:08
    
Can you explain why you remove ,/usr from the --with-gd=shared option? what is the purpose? –  dawud Jun 2 '13 at 8:06
    
I use ubuntu for the most part because it just works for me. I have to remove the /usr part I think because it points the the package that ubuntu supplies and that doesn't include the imageantialias() function, I need to use the one that is bundled with php –  Stephen Jesse Jun 2 '13 at 11:22

1 Answer 1

Just thought I'd put this out there for anyone else having this same issue. I had to fix this same problem on a Ubuntu server and this article (credit goes to the person that wrote it) actually covers the solution.

In short:

The Error:

make: *** [test-results.txt] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

The solution (as covered in the above article):

This is caused because the mysql server refuses to run under root

$ sudo vim debian/setup-mysql.sh

In this file comment the line starting the server, and copy the command, adding the “–user=root” parameter:

# Start the daemon
#$mysqld > $datadir/run.log 2>&1 &
#add root user
$mysqld --user=root > $datadir/run.log 2>&1 &

Then finally:

$ sudo dpkg-buildpackage -rfakeroot
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.