I messed around with it for 2 days before I realized that I can create the inital admin account and sign in with PHP4, but when I enable PHP5 in the .htaccess file, it doesn't work. Any attempt to create an account or sign in just causes a reload of the page.

Strangely, if I sign in with PHP4 enabled, then switch to php5 with my session intact, drupal actually works.

Site5 tech support took a peek, pointed the finger at drupal and left it at that.

ideas?

Comments

patrickharris’s picture

I can sign in without problems with Drupal 5.1 and php 5.2. Like you, I'm enabling php5 via the .htaccess file.

mixersoft’s picture

If so, can you send me the line you used in your .htaccess? Also, did you install drupal yourself, or did you use fantastico -- not that it mattered to me.

patrickharris’s picture

use AddHandler application/x-httpd-php5 .php in your .htaccess file. I installed drupal myself.

mixersoft’s picture

I also installed drupal myself, and added 'addHandler application/x-httpd-php5 .php' to www/.htaccess using the site5 siteAdmin .htaccess editor. By making a simple call to "phpinfo();" I can verify which version is active.

I find that when php4.4.3 is active, log in works fine.
But when php5.2.0 is active, I cannot log in, and I don't even get an error message. Everythign else works fine though, if I'm still logged in from the php4 session.

Any more suggestions?

patrickharris’s picture

It's working fine for me. You could always try the old trick of clearing the browser cache (that's fixed some .htaccess problems I thought I was having in the past) ... although it doesn't sound like it will help in your case. Maybe try altering your .htaccess locally, and then uploading it, rather than using the site5 .htaccess editor?

mixersoft’s picture

after editing the .htaccess through site5's cpanel, I can run a script with phpinfo() and it verifies that php5 is working. but I'm not sure it's configured right -- I don't know what to look for.

Ryanbach’s picture

PHP 5 works for me... What do you mean by site5?

Mephistox’s picture

I'm hosted by Dreamhost and I have php 5-something enabled on my server.

Drupal 5.1 works fine for me...

mixersoft’s picture

With site5 set to php5, I can write an anonymous PHPSESSID cookies to the right domain, but I never get a new PHPSESSID cookie via a successful login. with php4 enabled, I get both.

Somehow, php4 and php5 processing of logins are different in my config, and php5 get stuck before they write the session cookie. Any ideas?

jsimonis’s picture

I've got the same problem. So we're looking for people who have their web hosting through Site5, since the specifics can vary from hosting company to hosting company.

I've added the item, and then I keep getting the message about memory exceeding the limits. But my php.ini has it set at 16mb.

Does someone maybe have a php.ini and a .htaccess that allows PHP5 and Drupal 5.x to work on Site5 web hosting?

I need to get this working, as CiviMail will only work on PHP5.

Thanks!

--
Jenni S.
http://www.nu-look.net
Portland, OR metro area
Contact Me

VM’s picture

16mb probably isnt enough, I believe I read in CiviCRM documentation that memory should be set to a minimum of 24MB

jsimonis’s picture

It was set to 24mb, but I got the same problem. Then I copied the text straight out of the recommendations from here on drupal.org, which changed them all down to 16mb instead.

--
Jenni S.
http://www.nu-look.net
Portland, OR metro area
Contact Me

VM’s picture

are you using other modules other than civiCRM ?
what if you moved it to 64 ? does it then remove memory errors ?
at what point does your install not give these errors.

the only was to get rid of a memory exhaust error is to feed it enough memory or reduce the amount of modules used. The more modules used the more memory that is required by your machine for processing.

jsimonis’s picture

The funny thing is we're not even using that many modules. But I have the feeling it's CiviCRM and CiviMail that are causing the problems.

Since it's for a U.S. Senate candidate who is officially announcing tomorrow, I'm going to wait a bit before messing with the settings again. I don't want to take the site down during the day again. I'll test the limits some more tonight and see if I can hit the magic number.

Does the "AddHandler application/x-httpd-php5 .php" have to go anywhere specific in the htaccess file?

If I can get this working, I'll post the contents from my files here so other Site5 users can get PHP5 working as well.

I hope they take the suggestion that many have been saying once the move to the new data center happens -- offer servers that default to PHP5 for those of us who want them.

--
Jenni S.
http://www.nu-look.net
Portland, OR metro area
Contact Me

VM’s picture

I would make sure the addhandler is at the top of the .htaccess file so that it is the first thing parsed.

here is a page from site5.com's Wiki about php5 for those who wish to view it: http://wiki.site5.com/PHP

mixersoft’s picture

PHP5 works fine at site5. Drupal 5.1 also works fine at site5 -- except when you login with php5 enabled.

Please keep this thread alive since we haven't found a solution yet. If someone can tell me where, I can put a bunch of print statements in the login code to see where it fails with php5. but I'm not sure I can debug it.

Site5 will be no help, they are already pointing the finger at drupal.

VM’s picture

logging in works fine for me with PHP5.

my site is set to use subdomains though thus the .htaccess file in the public_html folder only contains the line from the site5 wiki and isn't added to the Drupal .htaccess file. my sites reside in subdomains set up through site5's backstage

isaac77’s picture

Sounds like a frustrating problem... in case it is helpful, I have posted the steps i took to get php5 to work with drupal 5.1 on a site5 server.

Nothing too special; the only difference i can see from what folks are posting in this thread is that i edited htaccess from the command line instead of using the site5 web interface... but i doubt that makes a difference.

patrickharris’s picture

the various servers sometimes have slightly different setups. Recently, one server had the mod_bandwidth module automatically installed & assigned a wrong priority, which was causing POST variables not to be passed to the PHP5 CGI wrapper. Until this was fixed, Drupal did not work. Apparently Site5 would not accept there was a problem (blaming the Drupal install), until it was pointed out that Drupal worked fine on another server. They then pinpointed the problem.

gracearoha’s picture

I was considering to move my site to Site5 and was told that they do not support Drupal 5.1, PHP5, or MySQL 5.

How is it possible that folks are using these versions?

victorkane’s picture

I am on site5.

They support both Drupal 5.1 (I have ten sites running) and PHP 5.2 (through a line in .htaccess).

MySQL 5 deployment has been postponed, I believe, though.

But all the rest is working fine.

Victor Kane
http://awebfactory.com.ar

VM’s picture

I'm on site 5 as well, using PHP 5 with Drupal 5.2.

They are in process of moving the datacenter, may want to read up on this in the site5 forums. After the move they will consider making PHP 5 the default of the servers.

That being said, you don't NEED PHP 5 or MYSQL 5 to run Drupal 5.x
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime

gracearoha’s picture

Thank you for the information, Victor and VeryMisunderstood.

I will look into what is happening with the move of the Site5 datacenter.

marcoBauli’s picture

one more..!

i get a 500 Internal Server Error on all pages when i move to PHP5 adding the following string to my htaccess file:

AddHandler application/x-httpd-php5 .php

am i alone?

Tecnomeme|Linkedin

soundsational’s picture

When i installed Drupal, i was running it under PHP4 then later switched to PHP5 after adding users and some modules. The site still works and now i've upgraded to 5.5 and still running fine.

I've placed:

AddHandler application/x-httpd-php5 .php

at the very bottom of my .htaccess file.

Shouldn't make a difference but have you tried upgrading Drupal to 5.5 and see what happens ???

marcoBauli’s picture

soundsational, thanks for dropping by

i updated to 5.5 and nothing, still getting the Internal Server Error once i log in....there is someone else having a similar issue at http://drupal.org/node/138398

the error only appears if i turn to PHP 5 by appending AddHandler application/x-httpd-php5 .php to the .htaccess

this is really a nasty one, a i need to upgrade before end of the month when all servers on Site5 will migrate to php5....humm

PS: @mixersoft: can i ask if did this happened to you on a fresh 5.1 install or after an update from 4.x?

Tecnomeme|Linkedin

soundsational’s picture

Very odd indeed as i didn't have to change anything in the htaccess file except for placing the Addhandler for PHP5.

Is your Drupal installed in a sub directory? and you have another web application in the root which is also using another .htaccess file? Just asking because i think any .htaccess in the root directory overrides any other .htaccess file in sub directories, i think?

Here is what my .htaccess file looks like:

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on


  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
   RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
   RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.81.2.2 2007/05/21 01:34:59 drumm Exp $

AddHandler application/x-httpd-php5 .php

This was from Drupal 5.5. As you can see nothing has changed in the .htaccess file except for adding the AddHandler at the end of it.

Which server are you on at Site5 ??? I'm on Druga and having no issues. Maybe you can get Site5 to move you to another server if possible?

marcoBauli’s picture

Yesterday tryed really almost *all* the possible: installed a fresh 5.5 Drupal, just linked it to the db and removed all other files from the server. No other applications or htaccess nowhere, everything absolutely clean: the error is still there, so it must be something in the data base (some data got corrupted someway).

Started cleaning some tables, then uploaded a different system table: at this point at least i managed to access the front page and the /user/login page, but as soon as i log in i fall back to the 500 Internal Server Error again... :(

I'm on Oannes by the way, i'll try some more today..

Personal Space|CV

marcoBauli’s picture

UPDATE: as this internal error seems a separated issue, i opened a new thread, please reply there about it. Thx

_____________________
Personal space|CV

ahankinson’s picture

I've been having the same problems - I keep getting an internal server error with PHP5 on site5 (oneiroi).

I tried narrowing it down to specific modules, but no luck. Even with all modules moved out of the 'modules' directory, it's giving me an error. I've tried adjusting the .htaccess file as well, and that did not have any effect.

I just sent in a support ticket, so hopefully we can get this resolved.

marcoBauli’s picture

ahankinson: at least we are not alone :)

Oannes here, please read all my tries above, this issue seems a tough one.. i opened a support ticket some days ago at Site5, but basically what they sad was:

1. check your .htaccess file
2. check your chmod permissions (755 for directories, 644 for files)

if this does not solve the 500 Error, then sorry but it's Drupal fault...

I moved the whole site in locale here on my Mac (PHP 5.2.3) and things work fine here, so guess must be something due to the PHP configuration on Site5 *and* some corrupted data in the database....i'll dig a little more into this later today..

UPDATE: as this error seems a separated issue, i opened a new thread, please reply there about it.

Personal Space|CV

ahankinson’s picture

They said the same thing to me too. They also gave me this line from the error logs:

[Fri Jan 11 10:29:11 2008] [error] [client 65.55.208.226] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.

marcoBauli’s picture

A quick update about tests with couple of fresh installs:

here on Oannes the login problems mentioned above do happen on Drupal 4.7.3, but *not* on Drupal 5.5...

hmm..could it be that the login issue and the infamous 500 Internal Server Error after user login are somehow correlated? Or are these 2 separated things?

Personal Space|CV

soundsational’s picture

I'm surprise you didn't notice the note on the Drupal download page:

Note: Drupal works with PHP 4 & 5. If you need support for the newest PHP 5.2, however, you must use Drupal 5.1 (and higher) or Drupal 4.7.5 (and higher)

thanks,

marcoBauli’s picture

soundsational, thanks for pointing that out,

actually login works fine on 5.5 on a clean install, but i keep getting the Internal Server Error as soon as i connect to my site's database (that's why i opened the new thread to avoid confusion between the two)

soundsational’s picture

Was this DB install from the 4.3 version? because when upgrading to a new release there could be DB changes as well which will be different. Even so, i don't think any of these DB changes would result in any Internal server error. Maybe someone can provide you with a better answer.

sorry.

marcoBauli’s picture

ok, so seems all is needed to get rid of the 500 Internal Error is to increase the memory_limit (32 should do the job).

Drupal 5 requires more memory than D4, so things were working fine for anonymous users (Drupal cache in action) but shooting the Error as soon as someone logged in (cache does not work for registered users). That was so simple ;P

About the "other" Drupal 5 login issue, maybe this post here can help.

Hope it helps, cheers,

-marco

----------------------------------
Drupal Services