You are here:  » Admin Password

Support Forum



Admin Password

Submitted by jajaj on Tue, 2012-10-23 06:01 in

Hi David

I am absolutely thrilled with the the websites I have set up to work with Price Tapestry and have already seen some commissions, so thanks for all your great work and support with your program.

Just one difficulty I have encountered is the setting up of a password for admin. I was able to do this through cpanel, except for one site whose host does not have this facility.

I therefore followed the instructions in one of your threads for setting up a login password through config.advanced.php

However, when I enter my password, the login page is seen to be trying to connect, but then re-sets itself to a blank login field and does not give me access to the admin page. Removing the password from config.advanced.php allows me access again.

Any help you are able to give me with this problem would be much appreciated.

Many thanks.

Kindest regards

Judie

Submitted by support on Tue, 2012-10-23 08:44

Hi Judie,

Thank you for your comments!

I've not come across problems with the simple cookie based login previously but the first thing I would suggest is to make the cookie credentials (domain and path) explcit rather than leaving them to be implied. In admin/login.php, look for the following code at line 21:

setcookie("admin",md5($remoteAddr.$config_adminPassword));

...and REPLACE with

setcookie("admin",md5($remoteAddr.$config_adminPassword),0,$config_baseHREF."admin/","www.yoursite.com");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by jajaj on Tue, 2012-10-23 14:08

Hi David

Thanks for your reply.

The only admin.php files I can find are associated with WordPress, which I am not using, (as I found it very fiddly!) I therefore decided it was easier to stick with my own designs.

I have checked the original download to make sure I haven't accidentally deleted admin.php from it, but there is no admin.php file there either. In the admin folder, there are only the following: admin_footer.php; admin_header.php and admin_menu.php

Outside the folders, brands is the first .php file.

Am I missing the obvious? It won't be the first time, lol.

Kindest regards

Judie

Submitted by support on Tue, 2012-10-23 14:18

My apologies Judie - the file is:

admin/login.php

(corrected above)

Cheers,
David.
--
PriceTapestry.com

Submitted by jajaj on Tue, 2012-10-23 15:03

Hi David

I have tried what you have suggested and checked that the files have up-dated through FTP, but have the same problem.

The password is being accepted, as there is no red error message 'authentication failed', but still no access to admin -just a reset blank login field.

Thanks for you help with this!

Judie

Submitted by support on Tue, 2012-10-23 15:26

Hi Judie,

That's really strange - for some reason the cookie isn't being set and / or propagated. Please could you revert to the distribution version of admin/login.php, then attempt login again, and then if possible use your Browser's settings / privacy options to view cookies; and see if you have received a cookie with the name "admin" for "yourdomain.com"?

In FireFox, it's Edit > Preferences > Privacy > Show Cookies

Then you can type yourdomain.com in the filter to view cookies set by yourdomain.com - and you should see "admin".

Let me know whether you are seeing the cookie - that will guide me on what to suggest next..

Cheers,
David.
--
PriceTapestry.com

Submitted by jajaj on Tue, 2012-10-23 16:34

Hi David

Should I still replace the code at line 21 in the distribution version of the admin/login.php file?

Also not very familiar with Firefox and cannot find the path you suggest, (In FireFox, it's Edit > Preferences > Privacy > Show Cookies)

Thanks!

Judie

Submitted by support on Tue, 2012-10-23 16:42

Hi Judie,

Rather than continue to speculate would you like me to check this out on your server for you? In the first instance, please could you email me a link to your installation that is having the problem, and the current admin password that you have configured in config.advanced.php - I'll check it all out from my end and then follow up by email...

Thanks!

David.
--
PriceTapestry.com