Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPG 1.2 & 1.3.2 issues with PHP 5.0.1  (Read 5883 times)

0 Members and 1 Guest are viewing this topic.

keltec

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« on: September 17, 2004, 09:26:54 am »

Hi all,

I seem to be having an issue with my gallery running on PHP 5.0.1.  It seems however, that my issues are documented in a number of threads already with the workaround being move to 4.3.x.  The issues I'm having are:

1.  When going to the login page, It says my script does not accept cookies.
1.1 When I login, it just goes back to the login page
2.  When I click on any of my galleries it just goes back to the main page
3.  When I removed the install.lock file and tried to reinstall the install.php page reloads.
4.  If I try to register a new user, I get the disclaimer and when I click on 'agree', it goes back to the disclaimer page.

From what I can gather, noone has really looked at the issue, nor tried to really resolve it, other than the suggested workaround.

Thankfully I have my new production server hosted locally (in dev mode) for now, running IIS6 / Win2k3 Server, PHP5.0.1, with my production site running on my ISP's Linux / BSD Machine.  All PHP configure options are pretty much the same, however, I have two questions for any of you dev's out there...

1.  Is this issue being looked at?  Clearly it looks like some sort of coding issue between Coppermine and PHP 5.0.x (I'm running .1), which was suggested by a user on this board...  And if it is being looked at, what is the projected timeline for a fix? [Cause seriously I don't wanna go back to 4.3.8 and I don't think that's hard ask either?! heheh].

2.  Would anyone like me to do any testing to help debug the potential problem?
« Last Edit: September 22, 2004, 09:11:16 pm by GauGau »
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #1 on: September 17, 2004, 11:30:33 am »

Well I can add that I run CPG 1.4.0 CVS on PHP 5.0.1 flawlessly - It is a FC2 box with PHP5.0.1, MySQL 4.1.3 and Apache 1.3

Let us begin by "script does not accept cookies"  open you login.php and somewhere there will be a line like
Code: [Select]
if (!isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {Just above it write
Code: [Select]
print_r($CONFIG);
print_r($_COOKIE);

See what you come up with.... if the cookie is not being set then trace back as to where the cookie is set (init.inc.php?) and see whats wrong if anything
Logged
SANIsoft PHP applications for E Biz

keltec

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #2 on: September 20, 2004, 09:08:45 am »

Hey mate,

Yeah the config looks aok and the cookie session var looks like it's there.

Code: [Select]
Array
(
    [keltec_data] => YToyOntzOjI6IklEIjtzOjMyOiIyNTM1MjI1MzcxOGQwMjFlZWJlNGU4MGI2MWZlMjkyNiI7czoyOiJhbSI7aToxO30=
)


I haven't pasted the config for security reasons, but it looks like the cookie handling is ok... hmmm any idea's?

Jase.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #3 on: September 20, 2004, 09:50:03 am »

In that case you need to figure out why
Code: [Select]
!isset($_COOKIE[$CONFIG['cookie_name'] . '_data']) is returning true in your case
Logged
SANIsoft PHP applications for E Biz

keltec

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #4 on: September 20, 2004, 06:37:01 pm »

Okies all to resolve my own problem (and the problem many of you have been facing with this), its quite a simple task... After a bit of pushing in the right direction and looking at a basic mail script that wasn't working, I turned to some thing that must be different in the ini files between 4 and 5 and I found it.

for CPG to work on PHP5.01 properly, make sure you have the following enabled in your PHP.INI file:

Code: [Select]
register_globals = on
register_long_arrays = on

Hope this helps.

Jase.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #5 on: September 21, 2004, 06:48:46 am »

I am sure register_globals need not be set to on and should not be left on as it is considered a huge security risk.

While register_long_arrays should be on it still does not explain the reason why !isset($_COOKIE[$CONFIG['cookie_name'] . '_data']) returned true
Logged
SANIsoft PHP applications for E Biz

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #6 on: September 21, 2004, 06:51:55 am »

I turned off register_globals and my gallery works fine.
Logged

keltec

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #7 on: September 22, 2004, 10:08:18 am »

Yup you're right.

I turned off Register_Globals and everything still managed to work

Register_Long_Arrays turned off though and the problem comes back.  So its got something to do with this option then.  Would it be that the cookie data is stored in an array?  I don't know enough about PHP to give you an answer to that question... Sorry!

...
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #8 on: September 22, 2004, 10:25:51 am »

OK - so I would say that it is a configuration other than the default (default, as per the manual, being register_global off and register_long_array on) which causes the problem
QED
Logged
SANIsoft PHP applications for E Biz

keltec

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #9 on: September 22, 2004, 10:44:12 am »

Yup... definitely.  The PHP5-default.ini states register_long_arrays = off, when for CPG they should be on.

Jase.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG 1.2 & 1.3.2 issues with PHP 5.0.1
« Reply #10 on: September 22, 2004, 11:18:57 am »

Logged
SANIsoft PHP applications for E Biz
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.