Can't access remote admin -- localhost conflict?

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Can't access remote admin -- localhost conflict?

Post by skysaw »

So I develop my lovely PMF installation locally. Then I go to upload....

My client's webhost insists that the mysql db have a username equal to the client's account "username" (that's a placeholder, not the real account username), but which I'll call "theirname," and their server name resolves as "localhost." I didn't know this username rule when developing this installation of PMF, so had a username in PMF I'll call "myname".

I imported my db successfully and uploaded the files. I ran installer.php. After the last step I got mysql error messages saying "myname@localhost" was no good, and the PMF installation wouldn't display. After some fiddling around (including simply putting "theirname" in place of "myname" in data.php), the installation is now up and running remotely. So here's what I can now run successfully -- at least in terms of being able to view the site -- in data.php:

On my computer (localhost):

server = localhost
username = myname

On the remote server (what they call localhost)

server = localhost
username = theirname

The problem is, I can get into admin on my computer, but when I go to the admin page on the remote installation, I get 403 forbidden. Is it possible that this is occurring because of the identical remote server name -- or is it purely a CHMOD thing? Or something else?

I have, BTW, set privileges according to the suggestions in the documentation at paragraph 2.b, which is why I wonder if it's something other than a CHMOD issue. OTOH, I'm getting the same 403 messages after deleting cookies, so I don't see how the 403 can be a response to me in particular, which makes me wonder whether it is some sort of general privileges issue.

Thanks,

Ed[/i]
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

how do you access the admin section?

With

www.example.org/faq/admin/

or

www.example.org/faq/admin

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Post by skysaw »

I get the same result either way.

Ed
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

and if you add index.php as well?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Post by skysaw »

Yep, same thing. BTW, I'm also getting this message on the 403 page:

Code: Select all

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Ed
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

how do the permissions look like? I think the files are not readable for the webserver.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Post by skysaw »

I've followed this suggestion from the documentation (2.b):
you should keep the chmod 777 for the following files and directories even after the succesful installation:

* the files data.php and config.php in the directory inc/
* the directory attachments/
* the directory data/
* the directory images/
* the directory pdf/
* the directory xml/
I wonder if this is where I may have messed things up. After I installed the DB, I uploaded the customized files from my hard disk. Then I was only able to view the templates, without the php-generated content. So, being both lazy and afraid that I was not going to be able to re-create the customization (which is not just in templates, but also in the en lang file and some php files -- you and I corresponded on this already), I just uploaded install.php from my original PMF download. Then after changing the username in data.php, I was able to view the remote installation just fine -- but was locked out of admin. Could that be it? IF I do have to reinstall remotely, how do I then get the customization? Wouldn't some of the files have crucially different settings?

Ed
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I would do the following:

1. Install a fresh phpMyFAQ on the remote host.

2. Copy your template files and changed php files from local to remote

3. Insert the database data from local to remote.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Post by skysaw »

Yikes! I was afraid you were going to say that. I wish I'd kept a log of which files I changed, other than the templates. Do you happen to know of any (free) utility that will do a byte comparison of similarly named files in parallel directory structures? (I'm running WinXP.) Something like that (or some other method) would at least allow me to also do a new local install, then compare the files to find which I did change.

BTW, I queried you earlier on running two instances of PMF on one site, and you advised that I could run them both from one database, using prefixes to distinguish. How straightforward is that? I can't recall -- during the second PMF installation, do I just get an opportunity to set the new prefix? And point to the existing database? And then just proceed from there to customize within the new install's separate directory?

Ed
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
skysaw wrote:Yikes! I was afraid you were going to say that. I wish I'd kept a log of which files I changed, other than the templates. Do you happen to know of any (free) utility that will do a byte comparison of similarly named files in parallel directory structures? (I'm running WinXP.) Something like that (or some other method) would at least allow me to also do a new local install, then compare the files to find which I did change.
you can use WinDiff for that.
skysaw wrote:BTW, I queried you earlier on running two instances of PMF on one site, and you advised that I could run them both from one database, using prefixes to distinguish. How straightforward is that? I can't recall -- during the second PMF installation, do I just get an opportunity to set the new prefix? And point to the existing database? And then just proceed from there to customize within the new install's separate directory?
You can set the table prefix during installation. There's a input field for that and the prefix will be stored in the file data.php.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
skysaw
Posts: 21
Joined: Wed Jan 04, 2006 7:56 am

Post by skysaw »

Done and done on the reinstall. Thanks much for your help. How have I lived without WinDiff until now?

Ed
Post Reply