# in need of libphp5.so



## frosty-456 (Dec 1, 2010)

isnt it possible for some one to get me their libphp5.so so i can download ? i installed php and all the dependancies but i use pkg_add because i dont have internet apparently. so i cant do make, make install. so is it possible i get that file and simply put it where its supposed to be? my apache wont start because it cant find it. suggestions?


----------



## SirDice (Dec 1, 2010)

You'll need to build PHP from ports. The package doesn't contain the apache module.


----------



## winyl (Mar 2, 2012)

*need libphp5.so*

I need libphp5.so for my FreeNAS instalation based on FreeBSD 9. I know I need to compile it from ports but it can't be done on FreeNAS. Many commands are missing. I would have to add them, then remove after. Or install full FreeBSD for compilation of only one file. I someone would send me libphp5.so apache module I would be thankful. I installed everything from packages, PHP is 5.3.8 with suhoshin patch, apache 2.2.1, in ports I see PHP 5.3.10.

Thanks in advance.


----------



## winyl (Mar 2, 2012)

Can a package be made out of ports PHP and Apache.If so, how?


----------



## SirDice (Mar 2, 2012)

winyl said:
			
		

> Can a package be made out of ports PHP and Apache.If so, how?



`# make package` See ports(7).


----------



## winyl (Mar 5, 2012)

*Recompiled from ports PHP - Thread Safety fail*

I installed php 5.3.8 (what do you now it was 5.3.8 after all) package I made from ports but now apache throws out message more or less:


```
libphp5.so compiled with no thread safety, you have to recompile PHP.
 Aborting Startup
```

Now what? How do I enable thread safty on PHP port? I did not see any option for that in *make config*. And I thought it was going to be simple. :/

So anyone: how do I enable thread safty on PHP in ports?


----------



## SirDice (Mar 5, 2012)

Rebuild lang/php5 and turn on LINKTHR.


----------



## winyl (Mar 5, 2012)

I have noticed PHP port uses apache22 port when compiling. I am using apache22-worker-mpm package. Any way of makeing PHP port compile using apache22-worker-mpm port?


----------



## winyl (Mar 5, 2012)

I have to doublecheck that but I turned it on in make config and compiled. Ok I will recompile it again with it checked and see the results.


----------



## winyl (Mar 5, 2012)

When compiling PHP it also asks me about apache22 make config. Any options I should turn on or off for apache22?


----------



## SirDice (Mar 5, 2012)

Not sure if it would impact PHP but it won't hurt to turn on THREADS.


----------



## winyl (Mar 5, 2012)

Ok. Libthread was on PHP and threads on apache. But I got: 


```
[crit]Apache is runnig threded MPM and your PHP is not using thread safety. You have to recompile PHP.
Preconfiguration failed.
```

It was the message I got the first time. It just got out of my memory somewhat garbled. 

I had installed apache22-worker-mpm but make complains it conflicts with the apache22 package and has to be deinstalled because they don*'*t make toghether. I need the threded MPM so..

How do I compile PHP module for apache22-worker-mpm so apache won*'*t complain about thread safety?


----------



## SirDice (Mar 6, 2012)

Does the lang/php5 try to build/install www/apache22 even though www/apache22-worker-mpm is installed?

It should just use that port instead of the standard one if it's already installed.


----------



## winyl (Mar 6, 2012)

I try to see into it. I had apache22-worker-mpm installed on top of apache22, maybe that*'*s what confused ports scripts. I will try to make apache22-worker-mpm and then php with theads activated. Maybe this will help.


----------



## winyl (Mar 6, 2012)

Cleaned Apache and PHP installs. Apache22-worker-MPM compiled and installed and compiled PHP5 after, but still the same message from apache about libphp5.so not beeing threadsafe. I have no clue what to try next.


----------



## winyl (Mar 7, 2012)

*Reinstalled ports tree, had no better idea*

I reinstalled ports tree, had no better idea. And started compiling from clean ports tree.
Made apache22-worker-mpm first.
Ports will ask about config of m4,gdb,pcre,libxml,pearl(maybe missed sthing) on every config screen you have to select with THREADS if threre is such option. Apach22 wit MPM will make. Know pass make install, make does not do install default (maybe apache22 does make default install but apache22-worker-MPM does not).

Now made PHP5. And voila apache it not complaining about thread safty. 
But it complains about missing session module when I try to load phpmyadmin, arhh.
Session module is in modules dir and has an entry in php.ini. But it has to be compiled in libphp5.so,right?

Do I have to add that module in some PHP config file before compiling?


----------



## SirDice (Mar 7, 2012)

winyl said:
			
		

> Do I have to add that module in some PHP config file before compiling?


Try reinstalling www/php5-session.


----------

