# php problems

## Azzuron

Well, i had php4.2.1-rc3 installed for a long time here and i couldnt get anything to work...but now that i got apache up finaly, PHP doesnt work. I do a test page with <? phpinfo(); ?>. nothin it just shows the source. so i figured there was an updated php so i installed it, after the fact it was installed, now it says not to use this package as it has NO security compiled in? whats all that? I need help what should i do... i really have no idea whats goin on really. im semi new to linux, and very new to webservers and such. i just dont know why....gentoo would release a php that had no security in it  :Neutral:  thats just completly stupid. Thanks for advice guys.

----------

## rac

Moving to Networking & Security...

What version of php do you have installed now?  The Changelog seems to indicate that 4.2.2 contains a security update.  New file upload code introduced in 4.2 had a memory handling bug that caused security problems: the details are in this CERT advisory.

You need to make sure you have a handler defined for PHP scripts, and that mod_php is installed and loaded.  See the Apache Server Documentation for more details.

----------

## delta407

 *rac wrote:*   

> You need to make sure you have a handler defined for PHP scripts, and that mod_php is installed and loaded.  See the Apache Server Documentation for more details.

 

Bah. The mod_php ebuild does all the configuration (if you run ebuild ___ config like it tells you to), except for one thing -- check /etc/conf.d/apache and make sure "-D PHP4" is on the APACHEOPTS line and that it is uncommented. From there, everything should work.

----------

## Azzuron

well, i was following the desktop guide...i did everything he said, and the ebuild commands failed. i tried to change out the version numbers and checked paths...but they just up and failed...Ill have to look at this again tomarrow. thanks for the replys ill see what i can do..and let you know what happens. thanks

----------

## Azzuron

This is what is stickin me up from the desktop guide...

```
Asmodeus php-4.2.2 # ebuild php-4.2.2.ebuild config

/usr/sbin/ebuild.sh: pkg_config: command not found
```

I have pkgconfig merged. (Ive done it twice now) and i cant find anything on this specific error in english that tells you why it cant be found.

----------

## rac

As a quick & dirty workaround, could you try: 

```
# cd /usr/bin

# ln -s pkg-config pkg_config
```

----------

## Azzuron

awesome, thanks. that fixed the reference issue...

 *Quote:*   

> Asmodeus php-4.2.2 # ebuild php-4.2.2.ebuild config
> 
> Must specify package names on the command line
> 
> 

 

I am installing mod_php now, as said above... hoping maybe that will just magicly make things happen. and one last thing... i need to install postfix for php to be able to send e-mail right? Thanks again guys. sorry to be such a bother. i really apreciate your time and efforts.

----------

## Azzuron

PHP works  :Smile:  mod_php did the deal. Thanks guys! very helpful you are. keep up the good work.

----------

## Stormmind

I am now emerging "php". Will I get mod_php as well or

do I have to specificly emerge "mod_php"?

Cheers,

/Storm

----------

## mksoft

 *Stormmind wrote:*   

> I am now emerging "php". Will I get mod_php as well or
> 
> do I have to specificly emerge "mod_php"?
> 
> Cheers,
> ...

 

Yes, php is the binary/CGI intepreter, mod_php is the apache module. Look at the this:

```
$ emerge -s php$

Searching...

[ Results for search key : php$ ]

[ Applications found : 2 ]

*  dev-php/mod_php

      Latest version Available: 4.2.2

      Latest version Installed: 4.2.2

      Homepage: http://www.php.net/

      Description: Apache module for PHP

*  dev-php/php

      Latest version Available: 4.2.2

      Latest version Installed: [ Not Installed ]

      Homepage: http://www.php.net/

      Description: PHP Shell Interpreter
```

----------

## Azzuron

so i can unmerge "PHP" if i keep "mod_php"?

----------

## mksoft

Sure, if you don't need it (php) and gonna use only mod_php, you can unmerge php.

----------

