Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO Install PHP5
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
branana
n00b
n00b


Joined: 03 Sep 2004
Posts: 29

PostPosted: Sun Aug 21, 2005 10:09 pm    Post subject: Reply with quote

By following this HOWTO, I can confirm that it indeed does not process any .php files. ie, the mod_php is NOT installed even by using USE="apache2" flag, (i skipped the cgi and cli) parts.
Code:

LoadModule php5_module modules/libphp5.so
AddType applications/x-httpd-php .php

Indeed work and having it in httpd.conf does not generate an error.

Adding
Code:

-D PHP5

to the APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D USERDIR"
line in /etc/conf.d/apache2
does generate a warning when using /etc/init.d/apache2 start that says

php5 module is already started

To those expecting this to replace mod_php: it does not work. Requesting *.php will only A) display it as the source code, B) prompt you to download the *.php file.
Back to top
View user's profile Send private message
ScriptBlue
n00b
n00b


Joined: 27 Jul 2005
Posts: 21
Location: New York City, New York, US

PostPosted: Fri Aug 26, 2005 12:47 am    Post subject: Reply with quote

Yes it is an replacement for mod_php, it is a module. I'd really appreciate if you would not show your imcompetance off here, and scare people from using PHP5. If you do not believe me http://www.scriptblue.com/phpinfo.php
Use AddHandler
Back to top
View user's profile Send private message
psylence
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2004
Posts: 113
Location: Midwest, USA

PostPosted: Fri Aug 26, 2005 3:39 am    Post subject: Reply with quote

Working great here, tho the fastbuild flag hosed it, had to build w/o.
Back to top
View user's profile Send private message
ralscha
n00b
n00b


Joined: 26 Aug 2005
Posts: 2

PostPosted: Fri Aug 26, 2005 6:03 pm    Post subject: Problem on 2005.1 Reply with quote

Hi

Three weeks ago I installed PHP 5.1 on a 2005.0 without any problems following the description from ScriptBlue.

Today i tried the same on a 2005.1 system and get this message:

Code:
emerge -p dev-lang/php           

These are the packages that I would merge, in order:

Calculating dependencies   
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: missing keyword)
- dev-lang/php-5.1.0_rc1 (masked by: missing keyword)



Now I'm a bit lost. I already tried different entries in package.keywords and package.unmask but nothing works.
Has anybody an idea what i could do.
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Fri Aug 26, 2005 7:14 pm    Post subject: Reply with quote

I didn't follow this howto AT ALL, lol, but had no problems just emerging the packages that are currently available in portage, no overlay needed (not too sure if this means this is 'broken' or not, but it works for me - altough I am using apache-1.3 here, so if you want apache2 just lose the apache stuff from the following configs), all I had to do was 'emerge apache mod_php', and edit apache.conf to add the php config stuff (AddType)


/etc/portage/package.keywords :
Code:
 
#PHP5 (5.1)
>=dev-php/php-5.0.0 ~x86
>=dev-php/mod_php-5.0.0 ~x86
dev-php/PEAR-PEAR ~x86
#mysql 4.1
>=dev-db/mysql-4.1 ~x86
>=dev-perl/DBD-mysql-2.9004 ~x86
#apache-1.3 stuff:
>=net-www/apache-1.3
net-www/gentoo-webroot-default ~x86
net-www/mod_ssl ~x86


/etc/portage/package.unmask :
Code:
dev-db/mysql
dev-perl/DBD-mysql
>=dev-php/mod_php-5.0
>=dev-php/php-5.0
dev-php/PEAR-PEAR


/etc/portage/package.mask :
Code:
>=net-www/apache-2.0
Back to top
View user's profile Send private message
ralscha
n00b
n00b


Joined: 26 Aug 2005
Posts: 2

PostPosted: Sun Aug 28, 2005 4:34 pm    Post subject: Re: Problem on 2005.1 Reply with quote

Found the solution. I forgot to add ~overlay in ACCEPT_KEYWORDS



Calculating dependencies
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: missing keyword)
- dev-lang/php-5.1.0_rc1 (masked by: missing keyword)[/code]
Back to top
View user's profile Send private message
ragarwal
n00b
n00b


Joined: 21 Apr 2005
Posts: 20

PostPosted: Mon Aug 29, 2005 5:09 am    Post subject: Re: Problem on 2005.1 Reply with quote

If I try to add "~overlay" in ACCEPT_KEYWORDS, emerge gives me a warning about ~overlay is not an acceptable keyword, but is ready to proceed anyway.

Should I just ignore this warning and go ahead with with php installtion? Also, how in the world would I now install mod_php ??? F F F F F

It is annoying that the HOWTO dosen't even mention this ~overlay for ACCEPT_KEYWORDS thing. No help in Gentoo forums about mod_php either. I am starting to wonder if Gentoo is just a testbed for people who like to see compiler messages scroll by.

All I really want is to run vpopmail with a decent interface (horde/IMP).. and php5 situation is really got me frustrated. I hope I don't have to go back to a DeadRat installtion :( ... That would suck. I was getting addicted to this Gentoo beer thingy... :(

ralscha wrote:
Found the solution. I forgot to add ~overlay in ACCEPT_KEYWORDS



Calculating dependencies
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: missing keyword)
- dev-lang/php-5.1.0_rc1 (masked by: missing keyword)[/code]
Back to top
View user's profile Send private message
DNAspark99
Guru
Guru


Joined: 03 Sep 2004
Posts: 321

PostPosted: Mon Aug 29, 2005 6:04 am    Post subject: Re: Problem on 2005.1 Reply with quote

ragarwal wrote:
If I try to add "~overlay" in ACCEPT_KEYWORDS, emerge gives me a warning about ~overlay is not an acceptable keyword, but is ready to proceed anyway.

Should I just ignore this warning and go ahead with with php installtion? Also, how in the world would I now install mod_php ??? F F F F F

It is annoying that the HOWTO dosen't even mention this ~overlay for ACCEPT_KEYWORDS thing. No help in Gentoo forums about mod_php either. I am starting to wonder if Gentoo is just a testbed for people who like to see compiler messages scroll by.

All I really want is to run vpopmail with a decent interface (horde/IMP).. and php5 situation is really got me frustrated. I hope I don't have to go back to a DeadRat installtion :( ... That would suck. I was getting addicted to this Gentoo beer thingy... :(

ralscha wrote:
Found the solution. I forgot to add ~overlay in ACCEPT_KEYWORDS



Calculating dependencies
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: missing keyword)
- dev-lang/php-5.1.0_rc1 (masked by: missing keyword)[/code]



try my method posted above. ignore the overlay, and the rest of this 'howto'. just use those /etc/portage/package.* configs, works for me, easy php5, no problems
Back to top
View user's profile Send private message
Rukie
l33t
l33t


Joined: 26 Jan 2004
Posts: 692
Location: SE Wi, Home of cheese and cowtippers.......

PostPosted: Mon Aug 29, 2005 10:10 pm    Post subject: Reply with quote

Instead of installing apache,l php, mysql all seperate.... I find it much easier to just use http://www.xampp.org :p Takes 2 min to install and comes with a whole bunch of extensions :-D

But thats just me....

P.S. Xampp (Lampp for linux) comes with both php4 and php5 that can be switched with just a couple keystrokes for php5 testing and php4 stability (and older programs!)

(Even tho its not in portage... its extremely easy to setup)
_________________
Gentoomania! Support the Open Source!
http://www.rukie.ath.cx
Back to top
View user's profile Send private message
Skippo82
n00b
n00b


Joined: 04 Jan 2004
Posts: 8

PostPosted: Fri Sep 02, 2005 8:18 pm    Post subject: Reply with quote

What i did:

add apache2, php, php4 to /etc/make.conf

1. emerge apache2 --> make the configuration with webmin(change module in webmin to apache2), because its easy
2. emerge php
3. emerge mod_php
4. edit the file /etc/apache2/conf/apache2.conf --> add 2 lines: LoadModule php4_mod extramodules/libphp4.so
AddType application/x-httpd-php .php .php4
5. edit the file /etc/conf.d/apache2 --> put "-D PHP4" option to the line APACHE_OPTS
6. restart with /etc/init.d/apache2 restart
7. write index.htm in my apache root directory, connect to my server over dyndns.org and it worked fine.

thought, this was very easy, built up my own apache-server in about 1 day (with emerging and breaks)
_________________
AMD-XP 2600+/ASUS A7N8X/768MB-RAM/NVIDIA Grafic RIVA TNT 2/
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Sun Sep 04, 2005 12:49 pm    Post subject: Reply with quote

has this been merged into portage yet? if not, when will it be?
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
nautiazn85
n00b
n00b


Joined: 05 Aug 2005
Posts: 37

PostPosted: Mon Sep 05, 2005 6:45 am    Post subject: Reply with quote

I was reading one of the developer blogs and it should be a part of portage already. However don't quote me.

I really wanted to prove everybody wrong and build a strong stable server out of a gentoo box... but it's difficult to build a gentoo webserver when applications like php5 take forever to appear in Portage.

Right now I'm looking at Debian and FreeBSD for my serer. However I'm looking more at Debian since it's a Christian Company... and I dunno how well the "beastie" logo will fare for us. If only FreeBSD would change their mascot... I really like the OS on a server environment too.
Back to top
View user's profile Send private message
andreask
Apprentice
Apprentice


Joined: 09 Sep 2003
Posts: 282
Location: Aachen, Germany

PostPosted: Mon Sep 05, 2005 9:19 am    Post subject: Reply with quote

latest GWN - Simultaneous PHP4/PHP5 support in Gentoo
latest Posting on gentoo.dev: Packages for mixed PHP4/PHP5 environment added to Portage
planet.gentoo.org: PHP Overlay Packages Now In Portage

Documentation from Gentoo PHP project page:

Upgrade HOWTO: http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/HowToUpgrade
FAQ: http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/CommonQuestions
Retiring the old packages: http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/RetiringTheOldPackages
Back to top
View user's profile Send private message
andreask
Apprentice
Apprentice


Joined: 09 Sep 2003
Posts: 282
Location: Aachen, Germany

PostPosted: Mon Sep 05, 2005 9:30 am    Post subject: Reply with quote

Rukie wrote:
Instead of installing apache,l php, mysql all seperate.... I find it much easier to just use http://www.xampp.org :p Takes 2 min to install and comes with a whole bunch of extensions :-D

Xampp (Lampp for linux) comes with both php4 and php5 that can be switched with just a couple keystrokes for php5 testing and php4 stability (and older programs!)

(Even tho its not in portage... its extremely easy to setup)


Please note that XAMPP is not meant for production use and should really only be used in a development environment:

XAMPP README wrote:
As mentioned before, XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be open as possible and allowing the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.

http://www.apachefriends.org/en/xampp-linux.html#381
Back to top
View user's profile Send private message
ddd
n00b
n00b


Joined: 28 Dec 2004
Posts: 46

PostPosted: Tue Sep 06, 2005 5:09 pm    Post subject: Reply with quote

I have installed PHP5 by this guide, and all worked fine for a 1 month.

But now, I can update my syste:

Code:

# /usr/bin/emerge -upv world

These are the packages that I would merge, in order:

Calculating world dependencies   
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: package.mask)
# Stuart Herbert <stuart@gentoo.org> (1 Sep 2005)
# Masked until all packages from the overlay are in

- dev-lang/php-5.0.4 (masked by: package.mask)
- dev-lang/php-5.1.0_beta-r3 (masked by: package.mask)

For more information, see MASKED PACKAGES section in the emerge man page or
section 2.2 "Software Availability" in the Gentoo Handbook.
!!!    (dependency required by "dev-php/PEAR-PEAR-1.3.6" [ebuild])


!!! Problem with ebuild dev-php/PEAR-PEAR-1.3.6
!!! Possibly a DEPEND/*DEPEND problem.

!!! Depgraph creation failed.
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Tue Sep 06, 2005 7:05 pm    Post subject: Reply with quote

nautiazn85 wrote:
I was reading one of the developer blogs and it should be a part of portage already. However don't quote me.

I really wanted to prove everybody wrong and build a strong stable server out of a gentoo box... but it's difficult to build a gentoo webserver when applications like php5 take forever to appear in Portage.

Right now I'm looking at Debian and FreeBSD for my serer. However I'm looking more at Debian since it's a Christian Company... and I dunno how well the "beastie" logo will fare for us. If only FreeBSD would change their mascot... I really like the OS on a server environment too.


php5 has been in portage forever.

just not this new thing, where you should be able to have php4 and php5 installed the same time..

personally, i just want php5, and not php4
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
soulwarrior
Guru
Guru


Joined: 21 Oct 2002
Posts: 331

PostPosted: Wed Sep 07, 2005 11:05 am    Post subject: Reply with quote

ddd wrote:
I have installed PHP5 by this guide, and all worked fine for a 1 month.
But now, I can update my syste:


The overlay for PHP is no longer needed, as dev-lang/php now appeared in the official portage tree.
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Wed Sep 07, 2005 11:08 am    Post subject: Reply with quote

i just installed the new php package yesterday, instead of the now removed php5 package, it works fine,
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
imotlaw
n00b
n00b


Joined: 25 May 2005
Posts: 38
Location: Washington DC Area

PostPosted: Sat Sep 17, 2005 4:53 am    Post subject: Re: branana's Doom-Saying Reply with quote

I could be waaaaay off base here, but the problem branana was describing (Sun, Aug. 21st, this thread) is the exact same one I had; of course, the problem was that (being a n00b and never having administered my own apache server before) I forgot that apache isn't going to read just any php file I request (for example, by default, if I send a browser to "file:///home/walter/Php/hello.php" it's going to say something akin to "No such number, no such zone").

What you have to do (and I know that basically everyone else who's reading this already knows this, it's just that branana was so, ummm, let's call it unfriendly, that his post didn't get a serious answer) is (1) figure out the directory from which apache is starting to look for files (on my system the default was /var/www/localhost/htdocs); (2) decide if you like that setting; (3) if you do, place any php files you want processed there, and if you don't, change the setting by adding "DocumentRoot /place/where/you/want/yourfiles" to your /etc/apache2/httpd.conf file, and place your php files in that directory.

So, in the unlikely event that branana is still reading, maybe that will work. If it doesn't, feel free to post your problem (along with relevant data and without the editorialzing) and we'll all keep trying. And maybe this will help some other novice like me who's never used apache before.

BTW, to the whole php herd, thanks for all the hard work and coping with the limited appreciation. We're all (well, most of us) gratetful.
Back to top
View user's profile Send private message
tragor
Apprentice
Apprentice


Joined: 21 May 2003
Posts: 168
Location: Freiburg i.Br., Germany

PostPosted: Tue Sep 20, 2005 5:38 pm    Post subject: Can't emerge Reply with quote

Hi,

I am probably missing something here... But I followed the instructions up to 4) and have now a edited make.conf with

Code:
ACCEPT_KEYWORDS="~x86"


and a /etc/portage/package.keywords with

Code:

dev-lang/php ~x86


and a /etc/portage/package.use with

Code:

dev-lang/php cli cgi apache2 sockets session sysvipc


When it comes to 5) I allways get:

Code:

Calculating dependencies
!!! All ebuilds that could satisfy "dev-lang/php" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/php-4.4.0 (masked by: missing keyword)
- dev-lang/php-5.1.0_rc1 (masked by: missing keyword)


What have I done wrong?

Thanks in advance,
tragor
Back to top
View user's profile Send private message
andreask
Apprentice
Apprentice


Joined: 09 Sep 2003
Posts: 282
Location: Aachen, Germany

PostPosted: Tue Sep 20, 2005 6:01 pm    Post subject: Reply with quote

The packages are in portage now, try to follow the "Upgrading PHP" Guide.
Back to top
View user's profile Send private message
Boosty
n00b
n00b


Joined: 12 Aug 2005
Posts: 22
Location: The Netherlands

PostPosted: Mon Sep 26, 2005 11:49 pm    Post subject: Reply with quote

I just tried a fresh hourly version of the new overlay but I'm having some problems with PEAR.

A emerge -pv PEAR-PEAR (or when emerging something that has PEAR as a USE flag), I get:
Code:
[ebuild  N    ] dev-php/PEAR-PEAR-1.4.1  0 kB
[ebuild  N    ] dev-php/PEAR-Archive_Tar-1.3.1-r1  0 kB
[ebuild  N    ] dev-php/PEAR-Console_Getopt-1.2-r1  0 kB
[ebuild  N    ] dev-php/PEAR-XML_RPC-1.4.3  0 kB

Now, when I emerge, PEAR won't install because
Code:
Files listed in the manifest do not exist!


This is true, because the ebuild expects
PEAR-1.3.6 instead of 1.4.1, PEAR-XML_RPC-1.4.2 instead of 1.4.3, etc.
and only has digests for those files.

So; I masked PEAR-1.4.1, so emerge takes 1.3.6.
But when I mask PEAR-XML_RPC-1.4.3, emerge starts complaining.

package.mask:
Code:
>=dev-php/PEAR-PEAR-1.4.1
>=dev-php/PEAR-XML_RPC-1.4.3


emerge -pv PEAR-PEAR
Code:
!!! All ebuilds that could satisfy ">=dev-php/PEAR-XML_RPC-1.4.2" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-php/PEAR-XML_RPC-1.4.3 (masked by: package.mask)

Note that it sais that 1.4.2 is masked by 1.4.3.

I've tried unmasking 1.4.2 by putting it in package.unmask, but that didn't help.

What should I do about this?
_________________
The nice thing about standards is that there are so many of them to choose from.
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Tue Sep 27, 2005 2:16 pm    Post subject: Reply with quote

Do not mask PEAR-XML_RPC, since that one is stable and in the Portage tree. Only mask >=dev-php/PEAR-PEAR-1.4.0 since it's the one from the overlay, and it's still highly experimental and Sebastian's working on it (in fact it's in the overlays /experimental category).
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
robintw
n00b
n00b


Joined: 22 Oct 2005
Posts: 41

PostPosted: Fri Jan 13, 2006 7:47 pm    Post subject: Reply with quote

Hi all,

I've followed the tutorial in the first post of this thread and have the following problem. If I try and access the file test.php in my webservers root directory (http://robinwilson.homelinux.com/test.php if you want to try it) it works fine and gives me the output of phpinfo(). When I try to access http://robinwilson.homelinux.com/blog/ however, or http://robinwilson.homelinux.com/ - both of which have index.php's it fails and firefox asks to download the php file.

Does anyone have any idea why this is happening? I thought it wasn't working at all - until I tried phpinfo() and it worked. It seems very strange to me...any thoughts?

Thanks,

Robin
Back to top
View user's profile Send private message
alexlm78
Veteran
Veteran


Joined: 08 Dec 2003
Posts: 1265
Location: Guatemala,Guatemala

PostPosted: Fri Jan 13, 2006 9:48 pm    Post subject: Reply with quote

Very usefully, thannks a lot. :!:
_________________
"This is a different kind of world, you need a different kind of software"

Linux User# 315201
100% Chapin hecho en Guatemala
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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