0

As a Linux beginner I'm currently a bit confused building my own PHP from source.

I have a Ubuntu with a LAMP-Stack where all packages comes from a Repository. (PHP as FastCGI)

Now I'm trying to set up a second PHP-Version and actually it works well but I have a few questions.

First of all some specs: Ubuntu 10.04 (I need this older Version) PHP 5.3.2-1ubuntu4.2.5 (Repo)

For my own PHP-Version I use the following "./configure" parameters (Reduced to the essential):

--prefix=/opt/php5310 
--with-config-file-path=/opt/php5310/etc 
--with-config-file-scan-dir=/opt/php5310/conf.d 
--with-libdir=lib64 
--with-mysql=/usr/bin/mysql
...

First of all executing "sudo make test" show up a few failed tests (about 10-14). Unfortunately I can't find any information what I have to do or what excactly goes wrong but "sudo make install" works nevertheless.

Is it normal that not all tests passed?

Then I noticed (phpinfo) the "imagick" extension was not loaded.

Looking at the "extension_dir" shows why.

On the Repo-Version: extension_dir = /usr/lib/php5/20090626

On my own Version: extension_dir = /opt/php5310/lib/php/extensions/no-debug-non-zts-20090626

(This folder doesn't even exist)

When I put this inside the php.ini:

extension_dir = /usr/lib/php5/20090626

It's working but is it the right way or just a creepy workaround?

And what about "--with-libdir=lib64" doesn't it belong to "extension_dir"?

On my System /usr/lib64 is a symlink to /usr/lib.

And last but not least my Repo-Version has a folder "/etc/php5/cgi/conf.d" with many ".ini" files e.g. "curl.ini", "gd.ini" and so on.

My Solution was:

"--with-config-file-scan-dir=/opt/php5310/conf.d

And then create the "conf.d" Folder and copy everthing from "/etc/php5/cgi/conf.d" to "/opt/php5310/conf.d" to be not dependent on the PHP Repo-Version. Would this be a correct solution for multiple PHP-Versions or should it be a symlink or

"--with-config-file-scan-dir=/etc/php5/cgi/conf.d

Thank you for your help

Manuel
  • 382
  • 1
  • 2
  • 16

1 Answers1

0

Failing tests generally means failing functionality. Of course, for something as large as PHP you may never touch that functionality. It may be that your best bet here is to search for the names of the tests which failed to see if anyone has had the same issue (and how to fix it or disable the functionality), and to find the source of the tests in PHP and understand why they failed.

l0b0
  • 55,365
  • 30
  • 138
  • 223
  • Do you mean the output under "Failed Test Summary"? Can't find any good information e.g. "Test krsort() function : usage variations - sort strings [ext/standard/tests/array/krsort_variation5.phpt]" – Manuel Jul 11 '14 at 12:40