Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem with User Authentication

Explorer ,
Nov 16, 2006 Nov 16, 2006
One Login page - two fields: User, Password.

After some problems with no "User Authentication" options in the server behavior, I finally managed to get a patch installed that gives me the option.

This wizard was very straightforward and I have simply used the two form fields to compare with relevant fields in the user table.

When I preview it, I get a fatal error message -

Fatal error: Call to undefined function: session_start() in /srv/www/htdocs/richard/TMP6vx0c8tmwi.php on line 3

I have no idea why this is happening

Code attached for reference.

Anyone else had this problem?

Using DWmx6.1 php on mysql
TOPICS
Server side applications
551
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 17, 2006 Nov 17, 2006
RichardOMarketing wrote:
> '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli'
> '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork'
> 'i586-suse-linux' .
>
> "disable-session"!!! - does this mean I'm stuffed or is there a way round it?

That is an incredibly limited installation of PHP. Not only do you not
have access to sessions, MySQL has also been disabled, so you can't do
anything with a database.

To authenticate users, you'll need to use HTTP ...
Translate
Contributor ,
Nov 16, 2006 Nov 16, 2006
Change from:
$MM_redirectLoginSuccess = "/search.php";
$MM_redirectLoginFailed = "/notloggedin.php";

To this:
$MM_redirectLoginSuccess = "search.php";
$MM_redirectLoginFailed = "notloggedin.php";

Without a '/'.

I could be wrong on that one. If it is still wrong and problem, hopefully someone else help correct this. Please do let us know if that works or not. Hope that works somehow. Let us know. I will check back with this forum and look into it later. Also could you post a link to that webpage you are working with.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 16, 2006 Nov 16, 2006
Richard,

Are you working with Windows XP platform, no? I assume that you are, right?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 16, 2006 Nov 16, 2006
Thanks for replying deaf web designer. - Didn't work I'm afraid - exactly the same error message.

I am using an XP platform although I am using a Linux testing server with mysql

This is probably the reason for the /

This is predominantly an Intranet site so I can't offer a URL I'm afraid at this stage.

Tricky one!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 16, 2006 Nov 16, 2006
Uhm, I happen to notice that it is possible to have problems with Linux/Unix servers. Because of captailized letter.

So, you might want to look at all words, letters are all set to lowercase letters, because Linux/Unix web servers are case senstive. You might want to take a look at it.

I also realize that you are also working with DW MX version 6.1. It has been some versions to current DW8. I don't know if that is the factor that contribute a problem you are having. But I doubt it, though.

Let's hope that someone else chime in and offer a better suggestion or tip to your problem.

Cheers, DWD
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2006 Nov 16, 2006
RichardOMarketing wrote:
> When I preview it, I get a fatal error message -
>
> Fatal error: Call to undefined function: session_start() in
> /srv/www/htdocs/richard/TMP6vx0c8tmwi.php on line 3

session_start() is part of the core PHP functionality.

Which version of PHP is your server running?

Run phpinfo() and find out if the configuration page contains a section
headed "session". If so, does "Session Support" say "enabled"?

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 17, 2006 Nov 17, 2006
Thanks David

I have run the phpinfo - version 4.3.10

Looking throught he info, there is no reference to session under the core php configuration section. However, in the top header, under configure command, this is what I get.

./configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'i586-suse-linux' .

"disable-session"!!! - does this mean I'm stuffed or is there a way round it?

Many thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 17, 2006 Nov 17, 2006
RichardOMarketing wrote:
> '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli'
> '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork'
> 'i586-suse-linux' .
>
> "disable-session"!!! - does this mean I'm stuffed or is there a way round it?

That is an incredibly limited installation of PHP. Not only do you not
have access to sessions, MySQL has also been disabled, so you can't do
anything with a database.

To authenticate users, you'll need to use HTTP authentication:

http://www.php.net/manual/en/features.http-auth.php

I've never used it myself, but the documentation says your must be using
PHP as an Apache module. That's what the --with-apxs2 is all about, so
you should be OK.

My biggest concern in your position is the lack of support for MySQL.
You really need to get that server upgraded to use PHP 5 and enable MySQL.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2006 Nov 20, 2006
This is great David - Many thanks

Our IT guru is not sure whether php v5 will run on the current Linus version and he is waiting for the final release of Linux 10.2.

In the meantime, I have checked out the lnk as you suggested and it works fine although I am now trying to find some validation script including the comparison select query from the database table 'users', which contains, as you would expect, Username, Password and priviledges.

I tried looking on the php.net site but couldn't find it - any ideas of a URL that would be helpful?

I guess that the validation script would have to be put into the headers for each page.

P.S. - Mysql seems to be working fine...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2006 Nov 20, 2006
LATEST
RichardOMarketing wrote:
> Our IT guru is not sure whether php v5 will run on the current Linus version
> and he is waiting for the final release of Linux 10.2.

It should run on a current version of Linux, but your IT guru is correct
about the need to make sure that the right libraries are installed. I
remember that I had to move to a new Linux server for PHP 5 to be
installed, but that was more than two years ago!

> I tried looking on the php.net site but couldn't find it - any ideas of a URL
> that would be helpful?

Sorry. I always use session authentication, so I've never needed to use
the HTTP authentication functions. I read about it in Jason Gilmore's
"Beginning PHP and MySQL 5" (Second edition), published by Apress.

> I guess that the validation script would have to be put into the headers for
> each page.

I think that's correct.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines