Merge lp:~quam-plures-core/quam-plures/bugfix-605962 into lp:quam-plures

Proposed by EdB
Status: Merged
Merged at revision: 7508
Proposed branch: lp:~quam-plures-core/quam-plures/bugfix-605962
Merge into: lp:quam-plures
Diff against target: 89 lines (+12/-20)
2 files modified
qp_inc/tools/system.ctrl.php (+6/-14)
qp_install/index.php (+6/-6)
To merge this branch: bzr merge lp:~quam-plures-core/quam-plures/bugfix-605962
Reviewer Review Type Date Requested Status
Tilman Blumenbach (community) Approve
Review via email: mp+30038@code.launchpad.net

Description of the change

Not sure how much info carries through from a bug report to here, so this branch fixes how it won't give you anything other than qp_ as the table prefix. 2-line fix :)

I also bumped up the PHP version check from 4.something to 5.2 with a stated 5.2.13 as the minimum acceptable version. Technically it doesn't check for the .13 part, but that is the lowest officially valid version out there so there you go.

Q: do we need to bump up the MySQL version check? It currently says 4.1 but maybe we want/need to bump that up to 5.0? It's in the same file so I figure this branch would be a good time to get that done if it needs to be done.

To post a comment you must log in.
Revision history for this message
Tilman Blumenbach (tblue) wrote :

Re. PHP version: I think simply checking for PHP 5 -- at this time -- is enough (e. g. 500)
Re. MySQL: Yes, checking for at least version 5 sounds about right.

7509. By EdB

php and mysql minimum set to 5.0 each

Revision history for this message
EdB (edb) wrote :

php and mysql minimum set to 5.0 each

Revision history for this message
Tilman Blumenbach (tblue) wrote :

Should be good to go.

review: Approve
7510. By Tilman Blumenbach

Update PHP + MySQL version checks in Tools/System tab

7511. By Tilman Blumenbach

Fix incorrect PHP version number

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qp_inc/tools/system.ctrl.php'
2--- qp_inc/tools/system.ctrl.php 2010-06-14 04:27:30 +0000
3+++ qp_inc/tools/system.ctrl.php 2010-07-19 18:49:39 +0000
4@@ -184,13 +184,9 @@
5 // Version:
6 $mysql_version = $DB->get_version();
7 init_system_check( T_( 'MySQL version' ), $DB->version_long );
8-if( version_compare( $mysql_version, '4.0' ) < 0 )
9-{
10- disp_system_check( 'error', T_('This version is too old. The minimum recommended MySQL version is 4.1.') );
11-}
12-elseif( version_compare( $mysql_version, '4.1' ) < 0 )
13-{
14- disp_system_check( 'warning', T_('This version is not guaranteed to work. The minimum recommended MySQL version is 4.1.') );
15+if( version_compare( $mysql_version, '5.0' ) < 0 )
16+{
17+ disp_system_check( 'error', T_('This version is too old. The minimum recommended MySQL version is 5.0.') );
18 }
19 else
20 {
21@@ -233,13 +229,9 @@
22
23 // PHP version
24 init_system_check( T_( 'PHP version' ), PHP_VERSION );
25-if( version_compare( PHP_VERSION, '4.1', '<' ) )
26-{
27- disp_system_check( 'error', sprintf( T_('This version is too old. %1$s will not run correctly. You must ask your host to upgrade PHP before you can run %1$s.'), $app_name ) );
28-}
29-elseif( version_compare( PHP_VERSION, '4.3', '<' ) )
30-{
31- disp_system_check( 'warning', sprintf( T_('This version is old. %1$s may run but some features may fail. You should ask your host to upgrade PHP before running %1$s.'), $app_name ) );
32+if( version_compare( PHP_VERSION, '5.0.0', '<' ) )
33+{
34+ disp_system_check( 'error', sprintf( T_('This version is too old. %1$s will not run correctly. You must ask your host to upgrade PHP to version 5.0.0 or higher before you can run %1$s.'), $app_name ) );
35 }
36 else
37 {
38
39=== modified file 'qp_install/index.php'
40--- qp_install/index.php 2010-07-13 07:50:32 +0000
41+++ qp_install/index.php 2010-07-19 18:49:39 +0000
42@@ -196,12 +196,12 @@
43 // Check MySQL version
44 $mysql_version = $DB->get_var( 'SELECT VERSION()' );
45 list( $mysl_version_main, $mysl_version_minor ) = explode( '.', $mysql_version );
46- if( ($mysl_version_main * 100 + $mysl_version_minor) < 401 )
47+ if( ($mysl_version_main * 100 + $mysl_version_minor) < 500 )
48 {
49 die( '<div class="error"><p class="error"><strong>'
50 .sprintf( T_('The minimum requirement for this version of %s is %s version %s '
51 .'but you are trying to use version %s!'),
52- $app_name, 'MySQL', '4.1', $mysql_version )
53+ $app_name, 'MySQL', '5.0', $mysql_version )
54 .'</strong></p></div>' );
55 }
56 }
57@@ -209,12 +209,12 @@
58
59 // Check PHP version
60 list( $version_main, $version_minor ) = explode( '.', phpversion() );
61-if( ($version_main * 100 + $version_minor) < 401 )
62+if( ($version_main * 100 + $version_minor) < 500 )
63 {
64 die( '<div class="error"><p class="error"><strong>'
65 .sprintf( T_( 'The minimum requirement for this version of %s is %s version %s but you are '
66 .'trying to use version %s!'),
67- $app_name, 'PHP', '4.1.0', phpversion() )
68+ $app_name, 'PHP', '5.0', phpversion() )
69 .'</strong></p></div>' );
70 }
71
72@@ -292,7 +292,7 @@
73 \s*[\'"]name[\'"]\s*=>\s*[\'"].*?[\'"], ([^\n\r]*\r?\n)
74 \s*[\'"]host[\'"]\s*=>\s*[\'"].*?[\'"], ([^\n\r]*\r?\n)
75 #ixs',
76- "#app_tableprefix\s*=\s*'.*?';#",
77+ "#app_db_tableprefix\s*=\s*'.*?';#",
78 "#app_baseurl\s*=\s*'.*?';#",
79 "#app_config_is_done\s*=.*?;#",
80 ),
81@@ -302,7 +302,7 @@
82 ."\t'password' => '".str_replace( "'", "\'", $conf_db_password )."',\$2"
83 ."\t'name' => '".str_replace( "'", "\'", $conf_db_name )."',\$3"
84 ."\t'host' => '".str_replace( "'", "\'", $conf_db_host )."',\$4",
85- "app_tableprefix = '".str_replace( "'", "\'", $conf_db_tableprefix )."';",
86+ "app_db_tableprefix = '".str_replace( "'", "\'", $conf_db_tableprefix )."';",
87 "app_baseurl = '".str_replace( "'", "\'", $conf_baseurl )."';",
88 'app_config_is_done = 1;',
89 ), $conf );

Subscribers

People subscribed via source and target branches