Re: Select_Range Doc Issue / Compatibility Bug? / Patch for newuser_wiz / Cookie Errors with PHP 5.2.12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> First, minor documentation issue. I found that select_range requires
> compatibility but it doesn't appear to be listed on the the page for the
> plugin or on the plugin list of plugins requiring compatibility.

This has been fixed, but it's always recommended to read the README
file of any plugin you download.

> Second, the newuser_wiz plugin doesn't work with newer compatibility
> versions.  I *know* it is old but theoretically it should work.

I'm not sure what your theory is, but old broken code has to be fixed
before it will work.  ;-)

> However, it doesn't seems to work because this line in compatibility doesn't
> work:
>
> compatibility_sqextractGlobalVar('new_full_name');
>
> leading to
>
> PHP Fatal error:  Call to undefined function sqgetGlobalVar() in
> /htdocs/webmail.pccc.com/squirrelmail-1.4.19/plugins/compatibility/includes/1.5.2/global.php
> on line 999
>
> Perhaps the author of newuser_wiz used the compatibility features
> incorrectly

No, it was correct at the time.  That was for version 1.x of the
Compatibility plugin.

> but it looked to me at a minimum that compatibility code should
> be sqGetGlobalVar (note the capital G) and that the function didn't
> appear to be in scope for compatibility.
>
> Third, I have no idea of the ramifications but attached is a patch to
> newuser wiz that I've tested with SM 1.4.17 & 1.4.19 and the latest
> compatibility.
>
> I have not read the Compatibility README file and updated the plugin per
> that document, sorry.  However, if I'm right about the bug in compatibility,
> then fixing that alleviates the need to patch the plugin.

I don't know what "bug in compatibility" means exactly.  There is no
bug in the Compatibility plugin regarding this issue.  Your patch is
done the right way and is basically an update for the plugin so that
it works with Compatibility 2.x.  Thanks.

> Finally, I tried to install SM 1.4.19 and 1.4.20RC2.  We definitely saw the
> exact "you must be logged in to view this page" errors that others have
> complained about.  From reviewing my
> webserver cookies, I appeared to have cookies for / and for /src with
> 1.4.19+
>
> Reverting to 1.4.17 resolved the issue.
> However, this issue MIGHT be related to PHP 5.2.12.  There is a patch in
> 5.2.12 that deals with time that could definitely affect cookies
>  (http://bugs.php.net/bug.php?id=50930) This points to the issue with 1.5.19
> being caused by a change in PHP 5.2.12 from 5.2.11.
>
> We saw this problem manifest with phpmyadmin.  AND we appear to have 1.4.19
> working now.
>
> We are currently trying a few different things to replicate / prove the
> issue.  Will email again shortly.
>
>
> Regards,
>
> Kevin A. McGrail aka KAM
>
>
> diff -ruN newuser_wiz/wiz_submit.php /usr/src/newuser_wiz/wiz_submit.php
> --- newuser_wiz/wiz_submit.php  Fri Mar  3 10:53:19 2006
> +++ /usr/src/newuser_wiz/wiz_submit.php Sun Jan 31 20:46:06 2010
> @@ -1,28 +1,21 @@
>  <?php
>
> -chdir('..');
> -define('SM_PATH','../');
> +/* Path for SquirrelMail required files. */
> +define('SM_PATH','../../');
> +
> +/* SquirrelMail required files. */
> +require_once(SM_PATH . 'include/validate.php');
>
>  // include compatibility plugin
> -//
> -if (defined('SM_PATH'))
> -   include_once(SM_PATH . 'plugins/compatibility/functions.php');
> -else if (file_exists('../plugins/compatibility/functions.php'))
> -    include_once('../plugins/compatibility/functions.php');
> -else if (file_exists('./plugins/compatibility/functions.php'))
> -   include_once('./plugins/compatibility/functions.php');
> -
> -if (file_exists(SM_PATH . 'include/validate.php'))
> -   include_once(SM_PATH . 'include/validate.php');
> -else if (file_exists(SM_PATH . 'src/validate.php'))
> -   include_once(SM_PATH . 'src/validate.php');
> +require_once(SM_PATH . 'plugins/compatibility/functions.php');
>
> -compatibility_sqextractGlobalVar('new_full_name');
> -compatibility_sqextractGlobalVar('new_email_address');
> +sqGetGlobalVar('new_full_name' , $new_full_name);
> +sqGetGlobalVar('new_email_address' , $new_email_address);
>
>  // if new vars set, write to prefs
>  if ( isset($new_full_name) ) {
>        setPref($data_dir, $username, 'full_name', $new_full_name);
> +        #echo "<html><body>$new_full_name</body></html>\n";
>  }
>
>  if (
> eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$",$new_email_address)
> ) {
> @@ -30,6 +23,6 @@
>  }
>
>  // redirect right frame to main page
> -header('Location: ' . SM_PATH . '../src/right_main.php');
> +header('Location:  ../../src/right_main.php');
>
>  ?>


-- 
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users


[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux