Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
squirrelmail + PHP 5.4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Psi15
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2003
Posts: 86
Location: Vienna

PostPosted: Fri Aug 02, 2013 9:01 am    Post subject: squirrelmail + PHP 5.4 Reply with quote

Hi!

I'm currently developing a PHP 5.4 application, but squirrelmail works only properly with PHP 5.3. Is it possible to configure Apache somehow to use different versions of PHP on differenct directories?

thx

Philipp
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 488
Location: Gainesville, FL, USA

PostPosted: Tue Aug 06, 2013 5:42 am    Post subject: Reply with quote

When they made PHP slottable, I had my doubts it would work well. They seem to have pulled it off. Actually, I've been able to cheat at the command line and execute the non-eselected PHP by running /usr/lib64/php5.x/bin/php, but I don't know that's a really good practice. Maybe you could do some trickery in the Apache configuration to something crazy to make the two versions work at the same time, but my bet is that 1) you'd have to modify the source for one of the versions of PHP so that its Apache SAPI would expose a different module name, a different soname, and a different handler name, and 2) you'd either need come up with a crazy new file extension for your second type or add per-directory AddHandler directives. All in all, it would be pretty nasty. This fanciful version of 70_mod_php5.conf illustrates one possibility;
Code:
<IfDefine PHP5>
        # Load the module first
        <IfModule !mod_php5.c>
                LoadModule php5_module    modules/libphp5.so
                LoadModule php54_module    modules/libphp54.so
        </IfModule>

        # Set it to handle the files
        <IfModule mod_mime.c>
                AddHandler application/x-httpd-php .php .php5 .phtml
                AddHandler application/x-httpd-php54 .php54
                AddHandler application/x-httpd-php-source .phps
        </IfModule>

        DirectoryIndex index.php index.phtml
</IfDefine>

you could try some other monstrosity. I didn't test any of this, and I don't want to try.

OR you could read the writing on the wall and get ready for the exit of PHP 5.3. The SquirrelMail maintainers have done that and they have patches for PHP 5.4 (and even PHP 5.5) in their development branch. There's a testing version of the prelease 1.4.32 in Portage, but judging from the changelog and what I see on the http://www.squirrelmail.org/ site, that version either lacks PHP 5.4 support or has only an early version of it. If I were thinking of SquirrelMail on PHP 5.4, I sure would grab that upstream patch. Making your own local overlay for that is not very tricky. (Come back and ask if you'd like help with that.)
Back to top
View user's profile Send private message
Psi15
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jan 2003
Posts: 86
Location: Vienna

PostPosted: Tue Aug 06, 2013 6:29 am    Post subject: Reply with quote

good idea - downloaded the current SVN version of squirrelmail
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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