# Another PHP question!!!!   (Nooooooooo)  :)

## jigma

This isn't you standard boring...'It doesn't work'

(I hope)

Anyway I want to use netacct to measure my traffic but it need some PEAR modules.

This stumped me for a wee bit ( I am a ex Redhat where EVERYTHING is just there)

So I found the method to install the pear modules using the command line tool...however the Ebuild for PHP 4.2.1-r1 doesn't make the command line interface for php.

So I really want to know what the best method for altering a package that has been emerged.

The way I see it there are 3 options:

1.  Extract the source files and copy the ./configure options from the ebuild file and just change the ones I need to change (--enable-cli) and do a manual ./configre & make and then copy the php CLI binary to /usr/bin

2. Change the ebuild file on my computer and emerge php

3. Submit a bug report

What does one do???

----------

## Nitro

 *jigma wrote:*   

> 
> 
> The way I see it there are 3 options:
> 
> 1.  Extract the source files and copy the ./configure options from the ebuild file and just change the ones I need to change (--enable-cli) and do a manual ./configre & make and then copy the php CLI binary to /usr/bin
> ...

 

Do step 2.  Modify the ebuild.  The ebuild is very bias towards becoming a module for the apache ebuild, so you will have to do quite a bit of hacking.  Main thing to turn off 

Or, you could wait.  I've been pushing for CLI and CGI php ebuilds.  Soon, we will have a dev-php category and this will include those ebuilds as well as the current.

On a side note, do you have a /usr/lib/php?  I do on my system, and it has all the PEAR modules there, but then again I have a customized php ebuild.

----------

## jigma

Pear is installed.../usr/local/lib/PEAR

BUT

Not all the modules. I specifically need the Cache.php file...which isn't there.

I do have the pear files on an old redhat install...do you think I could just copy Cache.php into the PEAR directory????

Cheers for the info on the dev build.

----------

## Nitro

 *jigma wrote:*   

> Pear is installed.../usr/local/lib/PEAR

 

Whoa! How'd it get in /usr/local? You manually compile?

 *jigma wrote:*   

> 
> 
> Not all the modules. I specifically need the Cache.php file...which isn't there.
> 
> I do have the pear files on an old redhat install...do you think I could just copy Cache.php into the PEAR directory????

 

That's wierd -- I don't have a cache.php either.  I've never really used PEAR though either, so I'm not sure if it depreciated or what.

I hunted it down and found it here: http://pear.php.net/package-info.php?pacid=40

Try that, and tell me how it goes.  :Smile: 

----------

## jigma

Opps...my bad

it is actually /usr/lib            :Embarassed: 

/usr/local/lib rolls of the tongue better   :Wink: 

http://pear.php.net/package-info.php?pacid=40

results in

Error: DB Error: connect failed: [nativecode=Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)]  

Not sure what is going on there.

----------

## Nitro

 *jigma wrote:*   

> Opps...my bad
> 
> it is actually /usr/lib           
> 
> /usr/local/lib rolls of the tongue better  
> ...

 

That doesn't sound like a Cache.php problem.  Sounds like something else is choking.  If you are using the mysql ebuild your socket is /var/run/mysqld/mysqld.sock.  Check your config files for the script you are using.

----------

## jigma

that isn't a cache.php problem

what is that page meant to do...why is it trying to connect to my local MySQL server???

the socket is in /var/run/mysqld

and there is no socket in /tmp

why would a remote web page try and get into my local MySQL server anyways though??

----------

## Nitro

LOL, I thought that was your server barking at you after you installed the script.  Looks like the MySQL server @ pear.php.net is dead; not yours.  It must have died right after I found the link.  Try again later. <shrugs>

----------

