Hi, I'm trying to use a forum to automatically create forums. I have a list of possible forums and then when someone clicks on one it checks if it exists. If it doesn't it creates ones. Everything seems to be working perfectly except when I try to get to the automatically created forums it says: "Access Denied." I go into the database and compare a forum that works (created by hand) to the broken forum and can't find a single difference. Anything come to mind? Perhaps this will help: http://www.schoolscandals.com/create_test/check.php (view source)
I've been racking my brains trying to figure this one out but I've come up with nothing. The boards seem to be alright.
That you are getting Access Denied suggests that there are something wrong with the groups permissions, that the user isn't in any of the given groups, but it's even set to 4, so even guests should be able to read it.
Are the forums showing up on ubbthreads.php? It's on the postlist.php script that you get Access Denied right?
BTW, you are sure that you are using the correct Board keywords? Those wore pretty long. Just have to ask.
Go ahead and paste the contents of what is created in your boards table when that script is run like Astaran stated.
Although like Gardener I think it is an authentication error. You might want to change your blank authentication in your scripts to ones like in postlist or ubbthreads.
Things look a little off with the first one created by your script. However it is easy to tell the problem
Your script is not setting the Bo_Read_Perm
In a regular forum this is set when you create the forums and edit which groups have access. Your script is creating the forum but no one has access. Try editing the forums from the admin area and giving the groups access and see if the access deny error dissapears. You will notice the groups are listed like this in your attachment
-1-2-3-4-
Under the attachment your script created forum is lacking these.
Now back to looking at the code to see why things aren't set.
I looked at the code and the values are listed in testf.php
You might try defining them above then placing the value call in the line. It looks like the ones defined above the query are set when the board is created yet the ones you just place values on the line are not being passed.
The read_perms seems to be set in the database, the only strange thing I can see is that there seems to be a newline in the title of the board created by the script. Maybe this is throwing it off?
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.