forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: turksus on April 08, 2005, 05:51:46 pm

Title: URL
Post by: turksus on April 08, 2005, 05:51:46 pm
http://www.turksus.com/~6352.6497//cgi-bin/php.dat?theme=eyeball

http://www.turksus.com/~6352.6497//cgi-bin/php.dat?lang=turkish

whenever i go to lang or theme, it is going to wrong url. EXAM above.but when i put the right url manually to explorer it works, can someone please help me
Title: Re: URL
Post by: kegobeer on April 08, 2005, 07:08:56 pm
What is php.dat?  Coppermine doesn't have any file like that.
Title: Re: URL
Post by: Tranz on April 08, 2005, 07:11:43 pm
I think this has to do with a server (mis?)configuration.
Title: Re: URL
Post by: turksus on April 08, 2005, 07:16:36 pm
i think i have to change to target somehow it is going to wrong driction
is there anyway i can do it manually?
Title: Re: URL
Post by: kegobeer on April 08, 2005, 08:04:35 pm
Use phpMyAdmin to change the ecards_more_pic_target in the cpg132_config table.
Title: Re: URL
Post by: Nibbler on April 08, 2005, 08:12:30 pm
You need to fix the $PHP_SELF variable in init.inc.php to point somewhere sensible.
Title: Re: URL
Post by: turksus on April 08, 2005, 08:27:50 pm
how do i do that and where to
i am sorry i don't have any expr. with php

thanks for trying to help me by the way
Title: Re: URL
Post by: turksus on April 08, 2005, 09:25:05 pm
You need to fix the $PHP_SELF variable in init.inc.php to point somewhere sensible.

when you somewhere sensible like where
and how do i change that?
Title: Re: URL
Post by: Nibbler on April 08, 2005, 09:31:24 pm
http://forum.coppermine-gallery.net/index.php?topic=8335.msg76046#msg76046
Title: Re: URL
Post by: turksus on April 08, 2005, 10:43:54 pm
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : str_replace("htdocs/","",$HTTP_SERVER_VARS['SCRIPT_NAME']);

i found that in ---init.inc.php--
but what do i put htdocs instead family that other person had
did not work
do i need to put family there?
what do i need to replaced with

thanks for your paitance
Title: Re: URL
Post by: Nibbler on April 08, 2005, 11:00:05 pm
Try
Code: [Select]
str_replace("~6352.6497//cgi-bin/php.dat","path",$HTTP_SERVER_VARS['SCRIPT_NAME']);
where 'path' is the folder your gallery is installed to.

Also add

Code: [Select]
$_SERVER['PHP_SELF'] = $PHP_SELF;
just afterwards.
Title: Re: URL
Post by: turksus on April 08, 2005, 11:20:15 pm
"~6352.6497//cgi-bin/php.dat","path",
i think that's where the problem is
it should not be "~6352.6497//cgi-bin/php.dat" (but you know better)
when i type manually to expolorer
http://www.turksus.com/cpg132/index.php?lang=turkish
it does it corret everthing is fine
but from the drop down menu
it is going to wrong direction(i think)
http://www.turksus.com/~6352.6497//cgi-bin/php.dat
and
i know it is too much but when you say path what does it look like?

thank you very much
turksus
Title: Re: URL
Post by: Nibbler on April 09, 2005, 12:11:07 am
path would be 'cpg132/' for you. The code says to replace

"~6352.6497//cgi-bin/php.dat"

with

"cpg132/"

so

http://www.turksus.com/~6352.6497//cgi-bin/php.dat?lang=turkish

becomes

http://www.turksus.com/cpg132/?lang=turkish
Title: Re: URL
Post by: turksus on April 09, 2005, 09:31:18 am
i did this in include/init.inc.php
str_replace("~6352.6497//cgi-bin/php.dat","cpg132/",$HTTP_SERVER_VARS['SCRIPT_NAME']); $_SERVER['PHP_SELF'] = $PHP_SELF;

and also

$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : str_replace("~6352.6497//cgi-bin/php,dat","cpg132/",$HTTP_SERVER_VARS['SCRIPT_NAME']); $_SERVER['PHP_SELF'] = $PHP_SELF;

it is still doing the same thing
Title: Re: URL
Post by: Nibbler on April 09, 2005, 03:08:33 pm
You put php - comma - dat instead of php - dot - dat I think.
Title: Re: URL
Post by: turksus on April 10, 2005, 07:47:43 am
this is as it is
$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : str_replace("~6352.6497//cgi-bin/php.dat","cpg132/",$HTTP_SERVER_VARS['SCRIPT_NAME']); $_SERVER['PHP_SELF'] = $PHP_SELF;
but still does not work any idea
thanks
Title: Re: URL
Post by: Nibbler on April 10, 2005, 02:28:16 pm
Can you PM me an FTP login ?
Title: Re: URL
Post by: turksus on April 11, 2005, 03:12:17 pm
DID YOU GET MY PM
Title: Re: URL
Post by: Nibbler on April 11, 2005, 03:20:25 pm
Yes, and I replied that the account you gave me does not have the correct permissions to edit the files.
Title: Re: URL
Post by: turksus on April 12, 2005, 01:59:16 pm
i use my provider's ftp and edit--i don't why you could not edit
is there anything else i could do?
can i send you the whole file(init.inc.php)