Hi Brian,

 

Thanks for your web access!

 

I found the problem which was responsible for the misfiled User list, the previous sql errors and the empty list. It was a combination out of two mistakes.

I fixed it directly at your place and committed it to the repository. (core/functions.php and index.php).

 

The second point is only a small tip for you:

 

If you give “View all” access to your guest user and all movies are entered for user “Gitrian” you will always see a list of guests movies when opening your vdb. This list is empty and you have to switch to “all” or “Gitrian” to see the entered movies. If you remove “View all” access and give the guest user only permission to see Gitrians movies than “Gitrian” is selected by default. If you give “Guest” read permission to several users but not to himself then “All” is selected by default and will result in a list of all movies which belong to an owner where Guest has read access on.

 

Thanks again for your support!

 

~ Chinamann

 

 

 

 

 

-----Ursprüngliche Nachricht-----
Von: videodb-devel-admin@lists.sourceforge.net [mailto:videodb-devel-admin@lists.sourceforge.net] Im Auftrag von Brian Sorensen
Gesendet: Samstag, 25. Juni 2005 20:20
An:
videodb-devel@lists.sourceforge.net
Betreff: Re: AW: AW: [videodb-devel] Database Problem - SQL syntax

 

Hi Chinamann (and all you others reading this mail-list)

I have an entry with a GuestID = 10000, so the update-script worked fine.

I've updated output.php and the error is gone just like you said it would.

The problem now is that there is still no movies shown in the list. The dropdown rightly says "All", but this is the only selection in the dropdown.

If I press the button all the movies is shown, and the dropdown is rightly showing both users (Gitrian & Guest)

If you are interested I can set up a ftp-webinterface so you can have access to the videodb-files (like Andi suggested).

/ Brian

----- Original Message -----
From: Chinamann
To: videodb-devel@lists.sourceforge.net
Subject: AW: AW: [videodb-devel] Database Problem - SQL syntax
Date: Thu, 23 Jun 2005 14:58:52 +0200

Hi Andi,

 

I've added the '' in "core/output.php" and the error should not occur again.

 

But this is not the real problem!

 

$_COOKIE['VDBuserid'] in output.php seems to be empty in Brains case.

Before including output.php the index.php includes functions.php.

 

Inside functions.php we check the authentication with this:

 

// check authentification data for multiuser

if (basename($_SERVER['PHP_SELF']) != 'login.php') authcheck();

 

So because index.php is not login.php we jump to authcheck()

 

There the following lines should take care, that even guests will have the cookies VDBusername, VDBuserid und VDBpassword set.

 

// autologin as guest?

if (!$result && !$config['denyguest'])

{

    // get script folder for cookie path

    $subdir = substr($_SERVER['PHP_SELF'], 0,

        strrpos($_SERVER['PHP_SELF'],'/')) . '/';

    $result = runSQL('SELECT name, passwd FROM '.TBL_USERS.'

                        WHERE id = '.$config['guestid']);

    setcookie('VDBusername', $result[0]['name'], null, $subdir);

    setcookie('VDBpassword', $result[0]['passwd'], null, $subdir);

    setcookie('VDBuserid', $config['guestid'], null, $subdir);

    $result = true;

}

 

So after this, there should never happen a $_COOKIE['VDBuserid'] == ‘’.

 

I tried to force the same error here in my test vdb environment but the $_COOKIE['VDBuserid'] is always filled with the guests uid and not empty.

 

@Brian: Could you check your database, if you have an entry inside your config-table which looks like this?:

 

opt     |  value

----------------

guestid |  10000

 

Maybe the upgrade script failed or am I blocked in mind?

 

~ Chinamann

 

 

 

 

-----Ursprüngliche Nachricht-----
Von: videodb-devel-admin@lists.sourceforge.net [mailto:videodb-devel-admin@lists.sourceforge.net] Im Auftrag von Andreas Goetz
Gesendet: Donnerstag, 23. Juni 2005 09:12
An: videodb-devel@lists.sourceforge.net
Betreff: RE: AW: [videodb-devel] Database Problem - SQL syntax

 

Chinamann,

 

Would adding '' help to solve the problem? Obviously we can't rely on having

a user id?

 

Andreas Goetz

cpuidle@gmx.de

http://www.cpuidle.de

 

 

-----Original Message-----

From: videodb-devel-admin@lists.sourceforge.net

[mailto:videodb-devel-admin@lists.sourceforge.net] On Behalf Of Brian

Sorensen

Sent: Donnerstag, 23. Juni 2005 09:06

To: videodb-devel@lists.sourceforge.net

Subject: Re: AW: [videodb-devel] Database Problem - SQL syntax

 

Hi again

 

The SQL error comes everytime I enter the site in a new browser-window.

 

I have only one user in my VideoDB (beside Guest) and all the movies is

attached to that user.

 

When a guest enter the site the person is logged in as a guest and the list

is showíng the Guest's movies (which is none)

 

You can check out the site at gitrian.dk/dvd

 

/ Brian

 

 

 

----- Original Message -----

From: Chinamann <chinamann@der-freak.de>

To: videodb-devel@lists.sourceforge.net

Subject: AW: [videodb-devel] Database Problem - SQL syntax

Date: Mon, 20 Jun 2005 19:21:57 +0200

 

>

> Hi Brian,

>

> I tried to fix the sql error problem you received first. It's now

> inside the cvs tree, but you don't have to update, because the fix

> should only help the next person wich is upgrading.

>

> The other problem you reported, that you have to switch to ALL to see

> you movies, is because they are owned by no user. (The old way to make

> them visible by guest.)

>

> No it's a good time to make a backup of your database :-)

>

> If backup is done continue reading here:

>

> To make it more comfortable you can login as your admin and activate

> the "Show tools" checkbox inside you general configuartion tab. Next

> you have to go to the "Tools" tab and call the "Transfer ownerless movies

to a user"

> contrib module. There you are able to transfer those movies to one of

> you users (for example guest).

> Afterwards you have to go to Configuartion->UserManagement->Guest

> Permissions and give the Guest-User readaccess to the Users files you

> transferted the moves before.

>

> For example if you transferred them to user "Guest" you have to set

> "Guest"s Permissions to access his it's own movies...

>

> Regards,

>

> Chinamann

>

>

>

>

>

> -----Ursprüngliche Nachricht-----

> Von: videodb-devel-admin@lists.sourceforge.net

> [mailto:videodb-devel-admin@lists.sourceforge.net] Im Auftrag von

> Brian Sorensen

> Gesendet: Samstag, 18. Juni 2005 19:26

> An: videodb-devel@lists.sourceforge.net

> Betreff: [videodb-devel] Database Problem - SQL syntax

>

> Hi

>

> I have just upgraded to the latest csv version, and the first time I

> enter the site this error pops up:

>

> You have an error in your SQL syntax; check the manual that

> corresponds to your MySQL server version for the right syntax to use

> near '' at line 1 SELECT permissions FROM users WHERE id = ;

>

> If I afterwards do a refresh the error dissapear and the site is

> showing almost normally.

>

> The only difference is that I am only seeing the videos of the Guest

> (which is none), and I have to select All in the dropdown.

>

> What have I missed ?

>

> / Brian

>

>

>

> --

> ___________________________________________________________

> Sign-up for Ads Free at Mail.com

> http://promo.mail.com/adsfreejump.htm

>

>

>

> -------------------------------------------------------

> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

> from IBM. Find simple to follow Roadmaps, straightforward articles,

> informative Webcasts and more! Get everything you need to get up to

> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click

> _______________________________________________

> videodb-devel mailing list

> videodb-devel@lists.sourceforge.net

> https://lists.sourceforge.net/lists/listinfo/videodb-devel

>

>

>

> -------------------------------------------------------

> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

> from IBM. Find simple to follow Roadmaps, straightforward articles,

> informative Webcasts and more! Get everything you need to get up to

> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click

> _______________________________________________

> videodb-devel mailing list

> videodb-devel@lists.sourceforge.net

> https://lists.sourceforge.net/lists/listinfo/videodb-devel

 

 

--

___________________________________________________________

Sign-up for Ads Free at Mail.com

http://promo.mail.com/adsfreejump.htm

 

 

 

-------------------------------------------------------

SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

from IBM. Find simple to follow Roadmaps, straightforward articles,

informative Webcasts and more! Get everything you need to get up to

speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick

_______________________________________________

videodb-devel mailing list

videodb-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/videodb-devel

 

 

 

-------------------------------------------------------

SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

from IBM. Find simple to follow Roadmaps, straightforward articles,

informative Webcasts and more! Get everything you need to get up to

speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click

_______________________________________________

videodb-devel mailing list

videodb-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/videodb-devel


--

___________________________________________________________
Sign-up for Ads Free at Mail.com
http://www.mail.com/?sr=signup