Installing Mahara - Internal Server Error

Bug #614179 reported by sneska on 2010-08-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Undecided
Unassigned

Bug Description

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@******* and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache Server at www.porto.kreativno.rs Port 80

I follow the instructions on http://wiki.mahara.org/System_Administrator%27s_Guide/Installing_Mahara

It's Mahara 1.2, on Linux, with mySql

I don't know where can I start to reslove the problem.

Thank you in advance!

Hi,

This is probably not a bug in Mahara, although it could be a bug in our Installation Guide!

The best place to ask for help with installation is on the support forum at mahara.org:

 http://mahara.org/interaction/forum/view.php?id=2

For anyone to be of any help, we'll also need more information such as the contents of your error log, or enough information for someone else to be able to reproduce your problem reliably.

Changed in mahara:
status: New → Incomplete
sneska (sneska-markovic) wrote :

At last a receive errorlog from system admin

there are a lot of lines which looks the same, Here are onle the dofferent ones:

[Fri Aug 06 08:27:43 2010] [alert] [client 213.198.236.23] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Fri Aug 06 09:08:15 2010] [alert] [client 62.108.97.238] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Fri Aug 06 09:09:24 2010] [alert] [client 109.121.72.110] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration, referer: http://co102w.col102.mail.live.com/mail/InboxLight.aspx?ReadMessageId=ab1fcbd6-a0fd-11df-a952-00237de4af18&n=2058851241
[Fri Aug 06 09:09:24 2010] [alert] [client 109.121.72.110] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Fri Aug 06 09:13:53 2010] [alert] [client 213.244.xxx.xxx] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
  * ensure_sanity() at /VDOMAINS/jululic/www/porto/init.php:80
  * require("/VDOMAINS/jululic/www/porto/init.php") at /VDOMAINS/jululic/www/porto/index.php:32
[Fri Aug 06 09:14:43 2010] [alert] [client 213.244.xxx.xxx] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
  * ensure_sanity() at /VDOMAINS/jululic/www/porto/init.php:80
  * require("/VDOMAINS/jululic/www/porto/init.php") at /VDOMAINS/jululic/www/porto/index.php:32
[Fri Aug 06 09:17:26 2010] [alert] [client 213.244.xxx.xxx] /VDOMAINS/jululic/www/porto/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

Any ideas what I can do with this?

Andrew Nicols (dobedobedoh) wrote :

Mahara ships with an .htaccess file in the htdocs folder which uses the php_flag directives to disable a variety of strange/stupid/dangerous/etc php options.

Given the errors that you're seeing (Invalid command 'php_flag'), I would guess that you're not using mod_php and therefore that the .htaccess doesn't know how to handle the php_flag and php_value options within the .htaccess file. Are you perhaps running php with something like suexec?

From memory and a quick google, if you're not running php as a module, you can't control it with a .htaccess file and so you need to insert the php options used in the .htaccess file into your php configuration in some other manner. As to how you do that would depend on the way in which your server is set up. Once you've got those options set, you should be able to safely remove them from your .htaccess file.
If you don't remove them from the .htaccess file, you'll continue to get an '500 Internal Server Error'. If you remove them from your .htaccess file and don't add them to your php configuration YMMV. Things like register_globals could still be on, and magic quotes and these could affect how the site operates.

sneska (sneska-markovic) wrote :

Thank you, I am "googling" about .htaccess and I find advice to remove some lines from it.
When I remove these lines:

php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag magic_quotes_sybase off
php_flag magic_quotes_gpc off
php_flag log_errors on
php_flag allow_call_time_pass_reference off
php_value upload_max_filesize 50M
php_value post_max_size 50M

there is no "500 Internal Server Error", but I have another probelm:

Mahara: Site unavailable
Your server configuration does not include the curl extension. Mahara requires this for Moodle integration and to retrieve external feeds. Please make sure that curl is loaded in php.ini, or install it if it is not installed.

However, tehnical support (where my site is hosted) said that server configuration includs the curl extension.

Maybe I did something wrong with these deleted lines?
What can I do now?

Andrew Nicols (dobedobedoh) wrote :

I suspect again that it may be something like suexec getting in the way. IIRC it's possible to have a different php.ini for each vhost/customer and curl may not be correctly included on your personal php.ini. The problem with this though is that it's very method and configuration specific. One configuration will be vastly different to another and it could be that your host is not running suexec php but some other configuration of php which is preventign the php_flags from being set.

Since we've established that this isn't a bug in Mahara, the forums may be a better place for discussion on the problems that you're experiencing. More people frequent the forums than the bug tracker so you're more likely to get a timely response from there.

The support forum on mahara.org (http://mahara.org/interaction/forum/view.php?id=2) is probably the best place to ask these questions.

I'll keep this bug open for now because it may be that we need to modify the installation documentation or the .htaccess file in some way. Perhaps, if you do post in the forums, you could add a link to your forum post?

Changed in mahara:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.