Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The .htaccess file only contains php settings for modules mod_php4.c and sapi_apache2.c. With increasing php5 users, probably a <IfModule mod_php5.c> section should be added.
PS. If I can help with this please let me know.
Comment | File | Size | Author |
---|---|---|---|
#14 | _47711_htaccessphp5.patch | 1.49 KB | Morbus Iff |
#10 | htaccess_mod_php5_0.patch | 1.25 KB | drewish |
#5 | htaccess_mod_php5.patch | 1.1 KB | drewish |
Comments
Comment #1
Morbus IffWhich version of Apache are you using? I only have PHP 5 installed under an Apache 2 box.
Do you happen to know if the PHP module name changes depending on Apache 1 or 2?
Comment #2
jpulles CreditAttribution: jpulles commentedThe server version returned by '/server-info/' says 'Apache/2.0.55 (Win32) PHP/5.1.2'.
The php module is loaded by apache with the statement
LoadModule php5_module "c:/program files/php-5.1.2/php5apache2.dll"
The module name is mod_php5.c. This should depend on the php version, although in case of Apache 1.x you need to load php5apache.dll.
I assume is used for the Apache 1.x. I don't know if this changes for php 5?
Comment #3
drewish CreditAttribution: drewish commentedLooking at the PHP documentation shows the following example for configuration changes:
But, there's a couple of comments saying that you need for Apache2 on both FreeBSD and Windows. So, I've added another block to catch PHP5 on Apache1.
Anyone care to test the attached patch?
Comment #4
Morbus IffNo patch attached.
Comment #5
drewish CreditAttribution: drewish commentedstupid attachment discarding preview....
Comment #6
Morbus IffI believe "sapi_apache2" was ONLY used in PHP4 under Apache 2, so we can't really label that one as being PHP5. If they merged the modulename to just mod_php5.c, for both Apache 1 and 2, that'd be the most ideal (and based on their documentation, that's what it looks like). I don't have time to make a patch now, but I'd like to see one that does mod_php4.c first, then the sapi_apache2.c, and then mod_php5.c, along with documentation stating that "the first is for PHP 4 under Apache 1, the second for PHP 4 under Apache 2, and the third for PHP 5 under either version".
Comment #7
jpulles CreditAttribution: jpulles commentedIf you want you can assign it to me. It doesn't look to difficult, but it would be my first patch for drupal :-)
Comment #8
Morbus IffAwesome for your interest, openwereld. As for issue assignation, it is only used when you assign an Issue to *yourself* - to say "I will most assuredly take command of this issue and see it through to the bitter, bitter end." It is never used by one developer assigning it to another developer (who may not have a care in the world about the actual problem). So, if you'd like to make a patch for it, and follow it through religiously, have a blast! Go ahead and make one and "Assign" the issue to yourself. Note, of course, as drewish did, you certainly don't HAVE to assign the issue to yourself - doing so is more of a "no one touch this - I got it. No, really. All mine. MINE! AHAHHAHAhahAH!" sorta thing.
Comment #9
jpulles CreditAttribution: jpulles commentedThis simple bug report is probably not worth this long discussion but still. Thanks for your explanation though on the 'assignation issue'. I had missed that a patch was already attached in response #5.
Comment #10
drewish CreditAttribution: drewish commentedhere's a patch based on Morbus Iff's suggestions.
Comment #11
markus_petrux CreditAttribution: markus_petrux commentedJust a comment.
Drupal needs PHP to run, and all those commands set the same exact PHP settings, so why use IfModule? Why not leave the supplied .htaccess with:
Comment #12
Morbus IffBecause PHP is not *always* run as a module - it could be running as a CGI, through FastCGI, or something else entirely, in which case, those directives in the .htaccess file would cause a 500 Internal Server Error (since Apache wouldn't recognize them as part of it's loaded list of commands).
Comment #13
markus_petrux CreditAttribution: markus_petrux commentedAh, I haven't thought about that. Thanks
Comment #14
Morbus IffMade some minor style changes.
Comment #15
Steven CreditAttribution: Steven commentedCommitted to HEAD.
Comment #16
(not verified) CreditAttribution: commented