• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

Roundcube Installation Error

Hi guys,

I am currently trying to install roundcube onto my server (www.roundcube.net), I read the readme file, and followed all the instructions, and when I try load it up, I get the Internal Server Error 500.

I checked the server error logs and it returned: Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

Any ideas of what I could check to try get this working?

Thanks guys!
0
Cyber-Drugs
Asked:
Cyber-Drugs
  • 7
  • 5
1 Solution
 
Richard QuadlingSenior Software DeverloperCommented:
Without wanting to install roundcube, can you talk us through what YOU did. Not what the installation file said to do, as you would probably need to make changes to suite your environment.
0
 
Cyber-DrugsAuthor Commented:
Of course!

This is everything I did, in this exact order:

1/ Downloaded roundcube
2/ Decompressed roundcube into a folder
3/ Uploaded the contents of the folder to www.myserver.com/mail/ Directory
4/ Set the folders 'temp' and 'logs' to 777 Permission
5/ Created a new database in PHPMyAdmin for Roundcube
6/ Ran 'mysql.initial.sql' in PHPMyAdmin, which successfully created tables
7/ Renamed config/db.inc.php.dist to config/db.inc.php
8/ Renamed config/main.inc.php.dist to config/main.inc.php
9/ Attempted to view www.myserver.com/mail/index.php

I hope that helped a bit more, if you need more information, please just ask.

Cheers!
0
 
Richard QuadlingSenior Software DeverloperCommented:
Did you get a filename and a line number in the error?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Richard QuadlingSenior Software DeverloperCommented:
The error comes from the .htaccess file.

In includes ...

php_flag display_errors Off

Hmmm.

This is in the PHP manual ...

Running PHP as an Apache module
When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files (e.g. httpd.conf) and .htaccess files. You will need "AllowOverride Options" or "AllowOverride All" privileges to do so.

With PHP 4 and PHP 5, there are several Apache directives that allow you to change the PHP configuration from within the Apache configuration files. For a listing of which directives are PHP_INI_ALL, PHP_INI_PERDIR, or PHP_INI_SYSTEM, have a look at the List of php.ini directives appendix.

Note:
With PHP 3, there are Apache directives that correspond to each configuration setting in the php3.ini name, except the name is prefixed by "php3_".

php_value name value
Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. To clear a previously set value use none as the value.

Note:
Don't use php_value to set boolean values. php_flag (see below) should be used instead.


php_flag name on|off
Used to set a boolean configuration directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives.

php_admin_value name value
Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or virtualhost directives. To clear a previously set value use none as the value.

php_admin_flag name on|off
Used to set a boolean configuration directive. This can not be used in .htaccess files. Any directive type set with php_admin_flag can not be overridden by .htaccess or virtualhost directives.

Example 7.2. Apache configuration example
copy to clipboard
<IfModule mod_php5.c>
 php_value include_path ".:/usr/local/lib/php"
 php_admin_flag safe_mode on
</IfModule>
<IfModule mod_php4.c>
 php_value include_path ".:/usr/local/lib/php"
 php_admin_flag safe_mode on
</IfModule>
<IfModule mod_php3.c>
 php3_include_path ".:/usr/local/lib/php"
 php3_safe_mode on
</IfModule>
Caution:
PHP constants do not exist outside of PHP. For example, in httpd.conf you can not use PHP constants such as E_ALL or E_NOTICE to set the error_reporting directive as they will have no meaning and will evaluate to 0. Use the associated bitmask values instead. These constants can be used in php.ini



So, according to the, it SHOULD be OK. What version of Apache?
0
 
Richard QuadlingSenior Software DeverloperCommented:
display_errors is a PHP_INI_ALL type. Can be set ANYWHERE.


Hmmm.

I wonder if your servers httpd.conf file has ...

php_admin_flag display_errors xxx

In which case, can you temporarily remove the php_flag line from your .htaccess file and see if that works?
0
 
Cyber-DrugsAuthor Commented:
Information of the server (I don't own it, I merely bought hosting from Site5.com):

OS: Linux
Kernel Version: 2.4.31
Apache Version: 1.3.34 (Unix)
Perl Version: 5.8.7
PHP Version: 4.4.1
MySQL Version: 4.1.14-standard

They also gave me access to PHP5, I merely need to change the .htaccess, or rename the *.php files to *php5 for it to run via PHP5, if that helps at all?
0
 
Richard QuadlingSenior Software DeverloperCommented:
Can you place the following content into ...

www.yoursite.com/info.php
www.yoursite.com/info.php4
www.yoursite.com/info.php5

----content----
<?php phpinfo(); ?>
----content----

That's just 1 line.

Make sure you do NOT have a .htaccess in the directory where you placed the 3 files.

Now run each one.

If you get a FULL page (rather than just the above 1 liner), then the specific extension is supporting PHP.

What you need to look for is "display_errors" anywhere on the pages.

If you see a value other than default, then SOMEWHERE the value is set and this is probably causing the problem.

0
 
Cyber-DrugsAuthor Commented:
info.php - 5.1.2 Full page  - Display Errors: Local ON - Master ON
info.php4 - 4.4.1 Full page  - Display Errors: Local ON - Master ON
info.php5 - 5.1.2 Full page - Display Errors: Local ON - Master ON

0
 
Richard QuadlingSenior Software DeverloperCommented:
Right. So you cannot replace the value using .htaccess. You will need to remove the display_error line in .htaccess for that site.
0
 
Cyber-DrugsAuthor Commented:
I removed it and still had the error page appear, and now in the error_log I get this :

Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration

This is the contents of the .htaccess file (before removing the line you mentioned)

AddDefaultCharset      UTF-8
php_flag      display_errors      Off
php_value      upload_max_filesize      2m

<FilesMatch "(\.inc|\~)$|^_">
  Order allow,deny
  Deny from all
</FilesMatch>

Order deny,allow
Allow from all
0
 
Richard QuadlingSenior Software DeverloperCommented:
Remove the php_value line too.

Basically, these values have been set elsewhere and CANNOT be overwritten by YOUR .htaccess.
0
 
Cyber-DrugsAuthor Commented:
That seemed to have done the trick, cheers!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now