Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fatal error, phppgadmin
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bignate
n00b
n00b


Joined: 23 Aug 2003
Posts: 35
Location: harrisburg PA

PostPosted: Thu Jun 16, 2005 5:55 pm    Post subject: fatal error, phppgadmin Reply with quote

I have been trying without success to install phppgadmin today.

When I navigate to http://localhost/phppgadmin/

I get:

Fatal error: Call to undefined function session_name() in /var/www/localhost/htdocs/phppgadmin/libraries/lib.inc.php on line 76

I installed it with Portage/webapp-config (w/o vhosts in my USE flags), I tried both unmasked and masked versions. I am using a masked version of mod_php (I need it for work).

dev-php/mod_php-5.0.4
dev-db/phppgadmin-3.5.3
dev-db/postgresql-8.0.1-r

I have looked trough the config file and googled, but can't seem to put my finger on the problem. I was hoping someone might have an idea.

TIA
_________________
...because geek is as geek does...
BigNate
Back to top
View user's profile Send private message
tukachinchila
Apprentice
Apprentice


Joined: 11 Mar 2005
Posts: 274
Location: Oregon

PostPosted: Fri Jun 17, 2005 12:26 am    Post subject: Reply with quote

The 'session_name()' function is a part of PHP4 and PHP5, so the problem is with your installation of PHP5. As a workaround (since you don't really need to define the session name), try commenting out (using //, not #) line 76 of /var/www/localhost/htdocs/phppgadmin/libraries/lib.inc.php, and line 10 of /var/www/localhost/htdocs/phppgadmin/logout.php.

The function 'session_start()' which is on line 77 and line 11 in the above files respectively will set the session name to the PHP default instead of setting it to 'PPA_ID'. It should work in theory anyway, but you may get a similar error with the session_start() function. If that's the case, then phppgadmin will probably not work with PHP5 currently.
Back to top
View user's profile Send private message
bignate
n00b
n00b


Joined: 23 Aug 2003
Posts: 35
Location: harrisburg PA

PostPosted: Fri Jun 17, 2005 7:42 pm    Post subject: Reply with quote

Ok, interesting. Thanks. I tried that and it did in fact error out with the session_start() func. However, my coworker is successfully running it on gentoo with PHP5 (though it's php-5.0.3, which may or may not matter). Hmm, well back to digging. Thanks for the heads up, I may be able to get somewhere here.
_________________
...because geek is as geek does...
BigNate
Back to top
View user's profile Send private message
bignate
n00b
n00b


Joined: 23 Aug 2003
Posts: 35
Location: harrisburg PA

PostPosted: Sat Jun 18, 2005 6:40 pm    Post subject: Reply with quote

I am not sure how, but after changing a million things and recompiling mod_php, postgres and phppgadmin a few dozen times it somehow came up. I wish I could narrow it down better since it might happen to someone else, but I really can not remember all the different things I have done, nor which one of them ultimately worked. Thanks for the help tukachinchila.
_________________
...because geek is as geek does...
BigNate
Back to top
View user's profile Send private message
Filo_kg
n00b
n00b


Joined: 25 May 2003
Posts: 15
Location: Poznan/Poland

PostPosted: Thu Jul 28, 2005 9:35 pm    Post subject: Reply with quote

The solution is very simple - you must emerge mod_php with "+session" USE flag. Please chande the topic to [SOLVED].
Back to top
View user's profile Send private message
bignate
n00b
n00b


Joined: 23 Aug 2003
Posts: 35
Location: harrisburg PA

PostPosted: Thu Jul 28, 2005 10:14 pm    Post subject: Reply with quote

uh...if it were that simple I would have posted that as a fix. I didn't mark it [SOLVED] because I don't recall how I did it, as my earlier post states. The first thing I tried was adding session to my USE flags, and it didn't work. Please try not to presume what others have done.
_________________
...because geek is as geek does...
BigNate
Back to top
View user's profile Send private message
Filo_kg
n00b
n00b


Joined: 25 May 2003
Posts: 15
Location: Poznan/Poland

PostPosted: Thu Jul 28, 2005 11:25 pm    Post subject: Reply with quote

bignate wrote:
Please try not to presume what others have done.

I can only say that I had the same problem as you and I've solved it by adding this flag. What is more it is logical that without persistent sessions handling compiled in php has problems with finding session_name and session_start functions. I'm just trying to help. Marking the topic is completely up to you.
Back to top
View user's profile Send private message
Shienarier
Apprentice
Apprentice


Joined: 16 Jun 2003
Posts: 278

PostPosted: Fri Sep 23, 2005 9:47 pm    Post subject: Reply with quote

Perhaps the application in question simply doesn't support PHP5 yet.
Back to top
View user's profile Send private message
opensas
Guru
Guru


Joined: 24 Nov 2004
Posts: 408
Location: Buenos Aires - Argentina

PostPosted: Wed Nov 16, 2005 7:36 am    Post subject: Reply with quote

I'm also trying to use phppgadmin with php 5.0.5-r4

I've followed the guide at http://gentoo-wiki.com/Apache_Modules_mod_php to install apache and php 5 (I don't have mod_php emerged, I emerged dev-lang/php)

I stumbled with the same session problems, until I added
=dev-lang/php-5.0.5-r4 -berkdb -gdbm session
to /etc/portage/package.use

Now I'm getting the following warning:

Code:

/var/www/localhost/htdocs/phppgadmin/conf/config.inc.php
 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/localhost/htdocs/phppgadmin/conf/config.inc.php:1) in /var/www/localhost/htdocs/phppgadmin/libraries/lib.inc.php on line 77
 
 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/localhost/htdocs/phppgadmin/conf/config.inc.php:1) in /var/www/localhost/htdocs/phppgadmin/libraries/lib.inc.php on line 77


Any idea???

Saludos

Sas

PS: I also had to edit /var/lib/postgresql/data/pg_hba.conf
Code:

#local   all         all                               trust
#edited for phppgadmin
local   all         all                               md5

But I don't think it has anything to do with my problem...
Back to top
View user's profile Send private message
opensas
Guru
Guru


Joined: 24 Nov 2004
Posts: 408
Location: Buenos Aires - Argentina

PostPosted: Wed Nov 16, 2005 8:27 am    Post subject: Reply with quote

Well, I tried with phpPgAdmin 4.0 (PHP 5.0.5-pl3-gentoo), and it works fine (but it's not even in thr portage tree yet)

I had to edit /var/lib/postgresql/data/pg_hba.conf and set the local access back to trust mode.

Saludos

Sas

PS: I've learnt in these forums that upgading to the latest version IS NOT a solution. So I hope someone can solve this thing...
Back to top
View user's profile Send private message
doodb
n00b
n00b


Joined: 24 Jan 2006
Posts: 1

PostPosted: Tue Jan 24, 2006 1:29 pm    Post subject: Reply with quote

scuse me for my bad english (i'm french)
USE="session apache2 cgi cli -threads dba gd" emerge --ask dev-lang/php
if you use apache 1.x replace apache2 by apache
i used this and it works whith postgresql and phppgadmin (php5)
good luck
see you...
dood
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum