I have the same problem with SM 1.2.10, php-4.1.2, apache-1.3.27 (RH7.3).

Mike Leone wrote:
Jonathan Angliss ([EMAIL PROTECTED]) had this to say on 01/01/03 at 03:33:
Hello Mike,
On Tuesday, December 31, 2002, Mike Leone wrote...


Using SM 1.2.10, on apache 1.3.26, PHP 4.1.2.

I installed the abook_import_export plugin, and it is active. However, when
I try an import a CSV file (created by Outlook), I get a frame that states

You need a valid user and password to access this page!

Yet there was no page that asked for a username and password. (besides the
normal SM login, which I had already done). I see nothing in the README that
mentions anything similar.

BTW, I do see this on the setup.php that comes with that plugin:

     <INPUT TYPE="hidden" NAME="max_file_size" value="5000">

     The documentation doesn't mention a max file size. Why 5K? Any
particular reason?
From what I've read... and seen... I've not seen a browser that
supports that tag. So unless PHP is doing something with it, then it
is pointless.


Also, I see that the actual import routine does this:

session_start();

if(!isset($username)) {
  echo "You need a valid user and password to access this page!";
  exit;
}

I presume I have no $username set? Why not, tho? I do see my username (I
have SM set to show last login time).
There is two problems here.  The first is, it assumes register_globals
is set to On.  The second is in 1.2.10 we renamed sessions.  Make sure
that the file src/global.php is included above your session_start();
Do this via:

 require_once('../src/global.php');

You might need to issue a chdir('..'); above that line to make it work
down a level, or simple just extend the require via:

 require_once('../../src/global.php');

If you are running with register_globals set to On, you can ignore the
first problem, but certainly cannot ignore the second.  If you are
running with register_globals set to Off, after session_start(); put
the following line:

 $username = $_SESSION('username');

And try again.

Register_Globals was set to On. I set it to Off.

I changed the code to:

require_once('../../src/global.php');
session_start();
$username = $_SESSION('username');
I now get this:

Fatal error: Call to undefined function: array() in
/usr/share/squirrelmail/plugins/ abook_import_export/address_book_import.php
on line 20




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to