# PHPMyAdmin Session problem

## davidfowler2000

Hi. Ive just installed phpmyadmin with apache2, mysql 4 and php 5.

Whenever i go to http://blah/phpmyadmin, it comes up with a red banner saying

```
Cannot load session extension. Please check your PHP configuration.
```

I havn't a scooby how to go about fixing this so all help is appreciated

-David

----------

## steveb

I think this is a PHP5 issue. If you can, then try with phpMyAdmin with PHP4 and you will probably not see this error any more.

cheers

SteveB

----------

## davidfowler2000

Cheers. Works fine with PHP 4

----------

## steveb

 :Smile: 

----------

## Dieter@be

you need the sessions use flag

(add +sessions for dev-lang/php in package.use)

if you have an error with function preg_replace() on line 37, then you need the use flag pcre

seems like the ebuild comes without some important modules per default, i had to recompile 3 times now, and i'm still missing stuff...

and it's hard to figure out

----------

## davidfowler2000

To be honest, php5 isnt an issue for me. The only thing i'm going to be hosting is a bulletin board for a friend.

Next challenge is to get ProFTPd to use mysql as it's user source.

Cheers

-David

----------

## kommissar

 *davidfowler2000 wrote:*   

> 
> 
> Next challenge is to get ProFTPd to use mysql as it's user source.

 

Be sure that you compile it with the mysql use flag as well.  If need be 

echo "net-ftp/proftpd mysql >> /etc/portage/package.use"

----------

## cyb0rg51

 *Dieter@be wrote:*   

> you need the sessions use flag
> 
> (add +sessions for dev-lang/php in package.use)
> 
> if you have an error with function preg_replace() on line 37, then you need the use flag pcre
> ...

 

I'm having that exact error right now.. I'm still a newbie to gentoo and i don't really know how to add USE flags other then adding it into the make.defaults profile. Can you tell me how to get PHP to work with pcre and preg function?

Have php 5, apache2 and mysql4

EDIT: im an idoit, after looking over the gentoo doc i guess i shouldn't have been chaning that file

----------

## Dieter@be

type this as root

```
nano -w /etc/portage/package.use
```

if there is a line that starts with "dev-lang/php", make sure it contains the flags you need (eg sessions or pcre or whatever)

if there is no such line, create it

for example, mine looks like this

 *Quote:*   

> 
> 
> #dev-db/mysql innodb berkdb
> 
> dev-lang/php spl iconv tokenizer posix xml dba session calendar pcre crypt jpeg png gd -berkdb mysql ftp soa$
> ...

 

(dont mind the $, its nano's way of telling there is more text on the right)

----------

## cyb0rg51

i dont seem to have a package.use file. 

/etc/portage/

inside portage is a .keep and thats it. 

Is package.use same as or similar to make.conf?

----------

## kommissar

 *cyb0rg51 wrote:*   

> i dont seem to have a package.use file. 
> 
> /etc/portage/
> 
> inside portage is a .keep and thats it. 
> ...

 

Just create the file by typing nano -w /etc/portage/package.use and editing / saving it (as root user).  By default there isn't one.

----------

## Albert_Alligator

Well, I'm having to remove PHP5 and anything to do with it from all my servers as it is the boondoggle for every web based program I have. What's strange is that this only happened after upgrading to php-5.1.1

I'm going back to dev-php/php instead since that seemed to work for me.

Al

----------

## toralf

 *davidfowler2000 wrote:*   

> Hi. Ive just installed phpmyadmin with apache2, mysql 4 and php 5.
> 
> Whenever i go to http://blah/phpmyadmin, it comes up with a red banner saying
> 
> ```
> ...

 Do you defined PHP5

```
tfoerste@n22 ~ $ grep PHP5 /etc/conf.d/apache2

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D DOC -D [b]PHP5[/b] -D DAV -D SVN -D SVN_AUTHZ -D DAV_FS"

```

 ?

----------

