coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 install => Topic started by: borlavrin on April 06, 2006, 11:06:07 PM

Title: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 06, 2006, 11:06:07 PM
Installed on home PC windowsXP, PHP5, MySQL5
Webserver is Fastream NETFile FTP/Web Server

My results with Coppermine v1.4.4

WHAT DOES NOT WORK:
- Create Categories
- Create Albums - must have albums to upload photos

WHAT WORKS:
- Can be installed - MySQL database and tables are created
- Admin with password is created
- Configurations are accepted, such as themes or links to other websites
- New users with passwords can be added and authenticated by mail
- Login for admin and users works

BUT - categories and albums cannot be created for anyone.

Cheers,
Boris
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: Nibbler on April 06, 2006, 11:17:07 PM
Why can't you create categories and albums ?
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 06, 2006, 11:42:11 PM
After entering a name in the album window and 'apply', then the following error message is displayed and all is blank again.

Script called without the required parameter(s).
File: z:\phpapps\cpg144\delete.php - Line: 243

Be patient please, I am 77 and doing this on a home server for my granchildren.

Boris
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 07, 2006, 05:25:47 AM
Also, if I try to create a category (as admin) I get the following message:

\catmgr.php
Notice line 445: Undefined variable: description_help


Cheers,
Boris
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: Joachim Müller on April 07, 2006, 07:26:20 AM
Quote from: borlavrin on April 07, 2006, 05:25:47 AMNotice line 445: Undefined variable: description_help
turn notices_display off in coppermine's config if notices don't mean anything to you - that's a developer option only.

Does your server populate the $_GET and $_POST vars as expected? Turn on debug_mode in coppermine's config and post the debug_output you get after submitting the "create a category" form.
A link might be helpful as well.
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 07, 2006, 01:30:53 PM
The information as requested, also some additional notes.

a) The webserver is on Drive 'G'.  This works fine with phpMyAdmin and L10HC (a traffic counter)
b) Question about the $-GET and $_POST vars is beyond my capability - have sent an inquiry to the server author.

The requested link:
http://phpapps.simplymedia.ca/cpg144/index.php

Cheers,
Boris

=============


USER:
------------------
Array
(
    [ID] => 386bbe087595d78b2a29403f6907ab5a
    [am] => 1
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => admin
    [groups] => Array
        (
           
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 07, 2006, 03:56:10 PM
Your question:
Does your server populate the $_GET and $_POST vars as expected?

This is the author's reply.

Cheers,
Boris


Hello,

In short this is the code that fills the variables:

void __fastcall
httpServerThread::UnknownCGIOrISAPIServerVariableProc(TWebConnection
*webClient, String Variable, String &AnswerStr)
{
        if(Terminated)
                return;

        httpServerClientClass *httpClient =
(httpServerClientClass*)webClient;
        Variable = UpperCase(Variable);

        if(Variable == "USER_NAME" || Variable == "AUTH_NAME" || Variable ==
"AUTH_USER")
                AnswerStr = httpClient->username;
        else if(Variable == "USER_PASSWORD" || Variable == "AUTH_PASSWORD")
                AnswerStr = httpClient->password;
        else if(Variable == "AUTH_TYPE" || Variable == "HTTP_AUTHORIZATION")
        {
                if(httpClient->username != "Guest")
                        AnswerStr = "Basic";
                else
                        AnswerStr = "";
        }
        else if(Variable == "ACCEPT_CHARSET" || Variable ==
"HTTP_ACCEPT_CHARSET")
                AnswerStr = httpClient->RequestAcceptCharset;
        else if(Variable == "HTTP_ACCEPT_ENCODING")
                AnswerStr = httpClient->RequestAcceptEncoding;
        else if(Variable == "HTTP_ACCEPT")
                AnswerStr = httpClient->RequestAccept;
        else if(Variable == "HTTP_FROM")
                AnswerStr = httpClient->GetPeerAddr();
        else if(Variable == "HTTP_USER_AGENT")
                AnswerStr = httpClient->RequestUserAgent;
        else if(Variable == "HTTP_CONTENT_LENGTH")
                AnswerStr = IntToStr(httpClient->RequestContentLength);
        else if(Variable == "HTTP_CONNECTION")
                AnswerStr = httpClient->RequestConnection;
        else if(Variable == "HTTP_CONTENT_TYPE")
                AnswerStr = httpClient->RequestContentType;
        else if(Variable == "HTTP_REFERER")
                AnswerStr = httpClient->RequestReferer;
        else if(Variable == "HTTP_ACCEPT_LANGUAGE")
                AnswerStr = httpClient->RequestAcceptLanguage;
        else if(Variable == "ACTIVE_SESSIONS")
        {
                AnswerStr = IntToStr(HTTPServer->ClientCount);
        }
        else if(Variable == "APPL_MD_PATH")
                AnswerStr = "/NFRoot/" + IntToStr(GetCurrentThreadId()) +
"/" + httpClient->Path;
        else if(Variable == "APPL_PHYSICAL_PATH")
                AnswerStr = httpClient->LastFilePath;
        else if(Variable == "SERVER_SOFTWARE")
                AnswerStr = serverString;
        else if(Variable == "SERVER_NAME")
        {
                AnswerStr = httpClient->actualDomain;

                if(!AnswerStr.Length())
                        AnswerStr = httpClient->GetXAddr();
        }
        else if(Variable == "HTTP_HOST")
        {
                AnswerStr = httpClient->actualDomain;

                if(!AnswerStr.Length())
                        AnswerStr = httpClient->GetXAddr();

                AnswerStr += ":" + httpClient->GetXPort();
        }
        else if(Variable == "SERVER_PORT")
                AnswerStr = HTTPServer->Port;
        else if(Variable == "SERVER_VERSION")
                AnswerStr = version;
        else if(Variable == "INSTANCE_META_DATA" || Variable ==
"INSTANCE_META_PATH")
                AnswerStr = "/NFRoot/" + IntToStr(GetCurrentThreadId());
        else if(Variable == "PATH_INFO" || Variable == "SCRIPT_NAME")
        {
                AnswerStr = httpClient->Path;

                addForeSlash(AnswerStr);
        }
        else if(Variable == "URL")
                AnswerStr = httpClient->Path;
        else if(Variable == "PATH_TRANSLATED" || Variable ==
"SCRIPT_FILENAME")
                AnswerStr = httpClient->LastFilePath;
        else if(Variable == "HTTP_RAW")
                AnswerStr = httpClient->allRawHeader;
        else if(Variable == "ALL_HTTP" || Variable == "HTTP_ALL")
        {
                AnswerStr = httpClient->allRawHeader;
                TReplaceFlags flags;
                flags << rfReplaceAll;

                AnswerStr = StringReplace(AnswerStr, "\r\n", "\0", flags);
        }
        else if(Variable == "CONTENT_LENGTH")
                AnswerStr = httpClient->RequestContentLength;
        else if(Variable == "CONTENT_TYPE")
                AnswerStr = httpClient->RequestContentType;
        else if(Variable == "GATEWAY_INTERFACE")
                AnswerStr = "ISAPI/6.0";
        else if(Variable == "UNDEFINED")
                AnswerStr = Variable;
        else if(Variable == "SERVER_PROTOCOL")
                AnswerStr = httpClient->Version;
        else if(Variable == "REQUEST_METHOD")
                AnswerStr = httpClient->Method;
        else if(Variable == "REMOTE_ADDR" || Variable == "REMOTE_HOST")
                AnswerStr = httpClient->GetPeerAddr();
        else if(Variable == "COOKIE" || Variable == "HTTP_COOKIE")
                AnswerStr = httpClient->RequestCookies;
        else
                AnswerStr = "";
}
//---------------------------------------------------------------------------

I am not sure all of you would understand this but here it goes anyway... So
simple, I see no problem! ;)

Regards,

Gorkem Ates
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: Joachim Müller on April 07, 2006, 04:20:11 PM
Quote from: borlavrin on April 07, 2006, 01:30:53 PM
b) Question about the $-GET and $_POST vars is beyond my capability - have sent an inquiry to the server author.
I was refering to the section
Quote from: borlavrin on April 07, 2006, 01:30:53 PM
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [cid] => 0
    [parent] => 0
    [name] => Mom and Dad
    [description] =>
    [thumb] => 0
)
Did you copy this from the page after submitting the form as suggested?

I'm not sure about the webserver "Fastream NETFile", never heard of it.
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 07, 2006, 04:50:17 PM
Yes, immediiately after.

The webserver is from here:
http://www.fastream.com/netfileserver.htm

Cheers,
Boris
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 08, 2006, 12:48:38 PM
Please interpret for me the result so far.

When I entered category "Mom and Dad", it shows up on the debug listing but looking at the MySQL database table, the "cpg143_categories" is blank.  At what point do you thing the value is being dropped?  Where is the listing source?

Thanks,
Boris

*****************************
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
   [cid] => 0
   [parent] => 0
   [name] => Mom and Dad
   [description] =>
   [thumb] => 0
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: Joachim Müller on April 09, 2006, 09:09:52 AM
Quote from: borlavrin on April 07, 2006, 03:56:10 PM
In short this is the code that fills the variables:
You'll have to apply this code to the webserver setup. We have no idea how it is being operated. This is not a coppermine issue - make your server populate the server vars and you'll be fine. We can't recommend anything else.
I don't understand why you use that particular commercial webserver app. The industry standard is apache, it is free, well documented, comes in many flavors (per-packaged with other needed apps like PHP, mysql) and definitely works with coppermine.
Title: Re: Ver 1.4.4 Cannot create Categories or Albums
Post by: borlavrin on April 09, 2006, 12:48:10 PM
Your help is appreciated. I was trying to avoid your conclusion - not easy having to learn a new system at my age.  I tried apache 15 years ago and it nearly brought me to my knees.

Thanks,
Boris