Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [SOLVED]Unable to Login as User/Admin & browser does not accept script's cookies  (Read 5036 times)

0 Members and 1 Guest are viewing this topic.

SemoTech

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

OK, running CPG 1.4.3 as an upgrade from 1.3.2. All new 1.4.3 files copied and overwrote 1.3.2, no mods!

I just spent about 2 hours reading all the posts about the "Warning your browser does not accept script's cookies" and "You don't have permission to access this page" issues and still no luck being able to login properly as a user or manage the gallery as admin.

I "seem" to log in correctly as I receive the "Welcome username ..." message, but then I am taken back to the index.php page as a guest with no admin access!!!!
Same thing happends with any standard user login. (they do not gain access to private albums and stay as guest)

Tried the following with no success:

* checked the password encryption settings through phpMyAdmin - verified it's set to 0 and passwords are NOT encrypted
* checked the config.inc.php file for correct settings as well as no spaces after ?>
* tried both Firefox 1.5.0.1 & IE 6.0.2900 SP2 on TWO separate machines while ensuring that cookies are fully accepted
* tested another upgraded site from my machine and that one also runs cpg143, but I can log in just fine there so it cannot be a browser problem.
* re-copied ALL the cpg143 files
* made sure there are no mods installed (except the 1.4.3 security update)
* ran "update.php" multiple times and got the same combination of "OK" and "Already Done" with no errors
* cookie path variable in config table was always set to "/"
* cookie name variable in config table was always set to "cpg143" (even tried changing it after purging cookies from both browsers and still no luck)
* server/machine time difference not an issue as alternate cpg143 site that functions is on the same server
* i get no errors in any files (except for the red "Warning your browser does not accept script's cookies" warning on login page of course)

I am at a total loss!!!   PLEASE HELP!

BTW, any way NOT to use these blasted cookies and exclusively use session ID's like phpBB does?

The gallery address is here:  http://stefan.semotech.com/albums/index.php
« Last Edit: February 24, 2006, 03:28:16 am by Nibbler »
Logged

Nibbler

  • Guest

Check for a blank line at the start/end of include/functions.inc.php
Logged

SemoTech

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

UNBELIEVABLE, IT WORKED!!!   THANK YOU!!!

What a STUPID, STUPID problem!

PHP/CPG really needs better error checking for this kind of bullshit.

My sincere thanks!
Logged

Nibbler

  • Guest

It's called output buffering. Apparently you have it disabled on your server.
Logged

SemoTech

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Is this a php.ini setting?

Also, any reason the darn red message about not accepting cookies appears ONLY on this site and not on the other one running the same version and on the same server?

Thanks!
Logged

Nibbler

  • Guest

Presumably the other gallery did not have the blank line.

http://php.net/outcontrol
Logged

SemoTech

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Hmm, ok, I did a phpinfo and got:

output_buffering   no value   no value

Then I did a "locate php.ini" and got this:
Code: [Select]
/usr/lib/php.ini
/usr/local/lib/php.ini
/usr/local/lib/php.ini.new
/usr/local/cpanel/3rdparty/lib/php.ini
/usr/local/cpanel/3rdparty/etc/php.ini
/scripts/php.ini
/var/cpanel/version/php.ini-2
/home/cpapachebuild/buildapache/php-4.3.11/pear/tests/php.ini
/home/cpapachebuild/buildapache/php-4.3.11/php.ini-recommended
/home/cpapachebuild/buildapache/php-4.3.11/php.ini-dist
/home/temp/installd/buildapache/php-4.3.11/pear/tests/php.ini
/home/temp/installd/buildapache/php-4.3.11/php.ini-recommended
/home/temp/installd/buildapache/php-4.3.11/php.ini-dist

Which one should I edit and add "output_buffering 1" to?

Also, could this adversely affect all the other sites?

Thanks!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

there may be multiple versions of php.ini on your server, but only one of them is actually taken into account. To find out, which one it is, run phpinfo() once more and search the output for "php.ini" - should should you the path under "Configuration File (php.ini) Path".
Logged

ejohnstone

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

I have a question on this thread.
I believe that all my users get this message "about script .. cookies" only the first time they logged in.
They can log in successfully, and never get this message again.

Two thoughts
a) my include/functions.inc.php script does NOT have an empty line at the start or end, but it is a dos file, running on a linux server.
Based on this discussion I wonder if there is an eol issue here, and I wonder if I should do a dos2unix on all these files

b) I ran php.info, and sure enough "output_buffer" is set to no value.  Should I reqest my server admin to set this to 1?  Is this significant?
Logged

ejohnstone

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Here's a follow up
1) there was one empty line between the last bracket '}' and the end of the file ?>

I removed this, and new users still got the "script ... cookies" message upon their first login

2) I did 'dos2unix' on include/functions.inc.php (reset chmod 644 on this file)  and still the same problem

Then I found this discussion

http://forum.coppermine-gallery.net/index.php?topic=26452.msg122103#msg122103

As a result, I simply set this message to '' in lang/english.php

This eliminated this harmless message, upon first login
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.