PDA

View Full Version : speaking of phpWebSite... 2 issues


grendel
7-6-02, 11:33 PM
Here are 2 pretty little problems for (hopefully) someone to tackle...

// 1 // I'm running phpWebSite (pWS) on a subdirectory (soon to be a subdomain, pending solution), and I want to also implement this on another directory in the domain. These 2 sites will need to be using different templates, and are completely distinct from one another, so just changing the paths to the appropriate files won't work (if that would work anyway).

Now, first, I need to figure out how to do this. I would need to create the tables using a different prefix for the second site, the way I understand it... but I have no clue how to go about doing that. Like, with pWS, you pretty much just put it on the server, and start it up, and it takes care of everything. Something tell me, though, that if I do that in the second directory, it wouldn't work, seeing as the same database is being used, and it will try to install the system using the defaults, overwriting the previous site. Am I missing it completely?

// 2 // User accounts. I'm trying to setup the user account feature, but I'm getting nowhere! Basically, here's the deal:

*I can create accounts through Admin
*I can create a 'new account' through the Sign Up
*the system will email me to provide a password for the account that I just created
*the system will email me to resend the password for an account that is setup through Admin
BUT...
*every single time I try to login, I get an Invalid Login error.
This happens whether the account was made through Admin, or through the Sign Up process. Case is not an issue, as it is correct.

It almost seems that the system isn't allowing ANY user accounts to be stored, although I would think that 'Admin' would be listed in with any user accounts, and it works fine... That's the weird thing: other than user accounts, it all works just like it's supposed to.

Any ideas on either of these probs??? TIA

sophiespo
7-7-02, 01:04 AM
hey..

I tried installing phpWebsite a long time ago, I had the same problem with the user accounts that you did, so I gave it up as a bad job. I didnt have time to search around for a bug fix... Im sure if you find some phpWebsite support forums there will be a solutions there...

As with the problem about having two different pws on your site, its all about table prefixes. Ill have a look at pws and get back to you on how to do it, k? (Ill look now).

sophiespo
7-7-02, 01:33 AM
OK! The table prefx thing. Open up config.php, go down to where it says DATABASE CONFIG and it should say something like:
$table_prefix="";
all you have to do for the two separate installs is change that prefix. So for one, you can have:
$table_prefix="pws_1";
and the second you could have:
$table_prefix="pws_2";
Thats all you have to change.

grendel
7-7-02, 02:55 AM
Damn, Sophie, you're good! Thanks billions!
:)

I'll play around with that setting then... I was quite scared that I was going to have to mess around with the actual database itself...

So, I change that prefix in the config file for the SECOND site that I'm setting up, right? (seems like that would make sense, but rather than screw up royally, I'll risk the ridicule... heh)

I've been looking around for help with the user account problem. I am soooo glad that it's not only happened/happening to me, too... I was quickly losing the confidence to mess with it.

There is very little documentation for pWS, which is a little silly considering that a freakin' university team developed it... oh well. I'm gonna hit usenet tonight/tomorrow to see if I can track anything down...

Thanks very much for the help!
:D

grendel
7-7-02, 04:16 AM
OK, Sophie..guess what... I figured out what the problem was with the logins! I drilled down into the config file to see where that variable that you mentioned was located, and right near it is this entry:

# If you do not want a remote user database
# do not change anything in this section.
$user_dblocation = 1;
# Set to 1 for diff[e]rent user database or 0 for local database.

On a whim, I changed this value to 0, and then re-tried to create a user account. It let me in perfectly first time, and seems to be flawless now. I've logged out, cleared cookies and cache, restarted the browser session, and it remembers who I am and what settings I changed. So, WOOHOO! :D

grendel
7-7-02, 04:17 AM
oh yeah...

that table prefix variable...

in my config file, that variable is empty.

just quotes, and nothing in between them.

is that normal?? lol

sophiespo
7-7-02, 05:53 AM
Congrats on the user issue! :)

For the table prefixes, it has an empty string for the default prefix because it assumes you dont really want to use a prefix. You have to add one in there. So just enter pws_ or whatever you want to use. Its best to make sure the underscore is the last character, so that the tables will look like pws_table1 etc.

grendel
7-7-02, 02:06 PM
thanks Sophie...

Assuming that I've been using this thing, apparently without a table prefix, what would happen if I add one into that config file? Would it end up screwing with what I have so far? Would there be any additional tweaking that I would have to do to keep it working?

Bradley
7-7-02, 06:21 PM
Yes it would.

Leave the existing one as is, and when you create the new one just name it phpws_ or whatever.

grendel
7-9-02, 04:29 PM
Thanks and props to Sophie and FastLane...
:)

The second site is up and running on phpWebSite, and, here's the REAL kicker...

so is the first one!!

Woohoo! I'm so damn stoopid sometimes... All that was necessary was to change one little line in the config.php file (the one that specifies the table prefix, naturally), and away it went!!

So, thanks for the answers, and for helping me get over my fear of screwing it up. Heh.

Take care 'til next time!