r78259 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78258‎ | r78259 | r78260 >
Date:17:25, 12 December 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove bogus session_path checks. Reverts r67465, r63813, r75256, r64717.
Modified paths:
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -277,22 +277,6 @@
278278 * Start the PHP session. This may be called before execute() to start the PHP session.
279279 */
280280 public function startSession() {
281 - $sessPath = $this->getSessionSavePath();
282 -
283 - if( $sessPath != '' ) {
284 - if( strval( ini_get( 'open_basedir' ) ) != '' ) {
285 - // we need to skip the following check when open_basedir is on.
286 - // The session path probably *wont* be writable by the current
287 - // user, and telling them to change it is bad. Bug 23021.
288 - } elseif( !is_dir( $sessPath ) || !is_writeable( $sessPath ) ) {
289 - $this->showError( 'config-session-path-bad', $sessPath );
290 - return false;
291 - }
292 - } else {
293 - // If the path is unset it'll default to some system bit, which *probably* is ok...
294 - // not sure how to actually get what will be used.
295 - }
296 -
297281 if( wfIniGetBool( 'session.auto_start' ) || session_id() ) {
298282 // Done already
299283 return true;
@@ -312,23 +296,6 @@
313297 }
314298
315299 /**
316 - * Get the value of session.save_path
317 - *
318 - * Per http://www.php.net/manual/en/session.configuration.php#ini.session.save-path,
319 - * this may have an initial integer value to indicate the depth of session
320 - * storage (eg /tmp/a/b/c). Explode on ; and check and see if this part is
321 - * there or not. Should also allow paths with semicolons in them (if you
322 - * really wanted your session files stored in /tmp/some;dir) which PHP
323 - * supposedly supports.
324 - *
325 - * @return String
326 - */
327 - private function getSessionSavePath() {
328 - $parts = explode( ';', ini_get( 'session.save_path' ), 2 );
329 - return count( $parts ) == 1 ? $parts[0] : $parts[1];
330 - }
331 -
332 - /**
333300 * Get a hash of data identifying this MW installation.
334301 *
335302 * This is used by config/index.php to prevent multiple installations of MW
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -38,7 +38,6 @@
3939 Restart the installation process.',
4040 'config-no-session' => 'Your session data was lost!
4141 Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.',
42 - 'config-session-path-bad' => 'Your <code>session.save_path</code> (<code>$1</code>) seems to be invalid or unwritable.',
4342 'config-your-language' => 'Your language:',
4443 'config-your-language-help' => 'Select a language to use during the installation process.',
4544 'config-wiki-language' => 'Wiki language:',

Follow-up revisions

RevisionCommit summaryAuthorDate
r801901.17: MFT first batch of installer changes: r78043, r78231, r78259, r78300, r...catrope20:47, 13 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63813Show an error if session.save_path is broken. Of course if session.auto_start...demon12:10, 16 March 2010
r64717session path extraction fixedfreakolowsky19:06, 7 April 2010
r67465(bug 23021) Mediawiki should not warn if the sesion path is not writable and ...demon14:03, 6 June 2010
r75256Fix r63813, r64717 (session path detection in new installer). Surprise surpri...demon16:02, 23 October 2010

Comments

#Comment by Catrope (talk | contribs)   12:42, 13 December 2010

So this feature is just dropped from the installer then? Should this be backported to 1.17?

#Comment by 😂 (talk | contribs)   21:59, 12 January 2011

Yes.

Status & tagging log