# Solved: Installation Problems (PHP5, FreeBSD 6.2)



## Omega_Shadow (Aug 2, 2004)

Hi all. Long time no see.

I have a problem I cant quite figure out on my own concerning the install of php5-extensions on FreeBSD 6.2

After I start "make" it goes though its paces but stops with errors:


```
[[email protected] /usr/ports/lang/php5-extensions]# make
===>   php5-extensions-1.1 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/bcmath.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/bz2.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/calendar.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/ctype.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/curl.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/dba.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/dbase.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/dom.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/exif.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/fileinfo.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/filter.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/fribidi.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/ftp.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/gd.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/gettext.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/gmp.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/hash.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/iconv.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/imap.so - found
===>   php5-extensions-1.1 depends on file: /usr/local/lib/php/20060613/interbase.so - not found
===>    Verifying install for /usr/local/lib/php/20060613/interbase.so in /usr/ports/databases/php5-interbase
===>   php5-interbase-5.2.4_1 depends on executable: phpize - found
===>   php5-interbase-5.2.4_1 depends on file: /usr/local/bin/autoconf-2.61 - found
===>   php5-interbase-5.2.4_1 depends on shared library: fbclient.2 - not found
===>    Verifying install for fbclient.2 in /usr/ports/databases/firebird2-client
===>  Building for firebird-client-2.0.3_1
==> Please do not build firebird as 'root' because this may cause conflicts with SysV semaphores of running services.
*** Error code 1

Stop in /usr/ports/databases/firebird2-client.
*** Error code 1

Stop in /usr/ports/databases/php5-interbase.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
```
Well, from reading this I can tell that interbase.so needs to be installed. And in order for interbase.so to be installed I need firebird2-client installed. With firebird2-client throwing a fit being installed as root I figured I would just jump out of root and try installing it as a normal user.


```
[[email protected] /usr/ports/lang/php5-extensions]# su omega_shadow
$ cd /usr/ports/databases/firebird2-client
$ make
===>  Building for firebird-client-2.0.3_1
[ -f /usr/ports/databases/firebird2-client/work/ipcs.pre.build ] || /usr/bin/ipcs -s | /usr/bin/tail -n +3 |  /usr/bin/grep -F `/usr/bin/id -un` | /bin/cat > /usr/ports/databases/firebird2-client/work/ipcs.pre.build
cannot create /usr/ports/databases/firebird2-client/work/ipcs.pre.build: Permission denied
*** Error code 2

Stop in /usr/ports/databases/firebird2-client.
```
Long story short, it absolutely will not allow me to install it as root. But when I switch to any other user it denies me permission. So what the hell do I do? I have to get this installed.

=====EDIT=====
BTW, I did try changeling the permissions on the folder and all the files in /usr/ports/databases/firebird2-client. It doesn't help. During the install it has to chmod and ./configure. Two things that a normal user can't do anyway.


----------



## lotuseclat79 (Sep 12, 2003)

The only way possible would be for a regular user install in the user's directory space - is that possible? Kind of like installing Firefox in your user directory and not to be accessible for any other user in the system (is what I'm trying to say).

The other foundational php software(s) may have to be reworked this way if that is the solution.

OTOH, I would look at the environment variables for root and for the regular user. It seems to me that there must be a way for root to install the use of the software for all the users in the system. There may be something that you installed in the dependency tree that is installed for the regular user that prevents root, or visa versa - is what I would look for to explain this behavior.

An alternative may be to create a group that both root and the regular user community belong to - like the dialout group allows all members to issue the wvdial command. I would checkout the permissions on /usr/local/lib/php for starters at the group level and see if that is different from what groups are in play to build.

-- Tom


----------



## RobLinux (Nov 7, 2007)

Can't you use a named makefile target to just build the software eg) make firebird-client, and then do something like "make install" as root later?


----------



## Omega_Shadow (Aug 2, 2004)

I thought about that. But as you both notice, the program simply "refuses" to be installed by the user "root" because doing so would conflict with other services. I have not been able to install it under any other user. I am running out of time and running out of ideas


----------



## RobLinux (Nov 7, 2007)

So you do it in 2 stages.

Build the softare, by explicit target as normal user.
Then run make, as root and do the install.

The 2nd failure was caused by attempted install without root access, not compile / link errors.


----------



## Omega_Shadow (Aug 2, 2004)

apparently you were not reading my posts

I type "make install" as root it tells me not to
I type "make install" as user it tells me I can't
There is no "two stages" to do because it doesnt alow me to get past stage one anyway you look at it.

It does not mater now anyway because I have figured out a work around. Not one I liked, but one I had to use. I had to chmod 777 and chown the entire firebird2-client directory and files. After that, it compiled as a normal user then asked for root access to install. This is solved


----------



## RobLinux (Nov 7, 2007)

I did read your post, your log showed you just typed in "make", not "make install"!

What you aren't doing is finding a build target, but just taking the default (most likely ALL) make target. As I don't have your system, I can't tell you exactly what make target to choose, but there's normally one, to compile and link the programs, and sometimes test suites to check them before you install.


----------

