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: editing album properties or adding comments - parse errors in include/mailer.inc  (Read 4526 times)

0 Members and 1 Guest are viewing this topic.

kalyan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

I am having problems changing the album properties or adding comments
to photos in my standalone coppermine 1.4.3 installation, even as
admin.

In both cases (changing album properties or adding comments in the
comments window) I get the following error:

Parse error: parse error, unexpected T_ARRAY, expecting T_STRING in
/home/vhosts/kavitha.orgfree.com/cpm143/include/mailer.inc.php on line 2169

I have only very rudimentary knowledge of php to fix the error.
please help
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

include/mailer.inc.php is corrupted. Download a fresh copy of your cpg version and replace that file with new file.
Logged
Chief Geek at Ranium Systems

kalyan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

> include/mailer.inc.php is corrupted. Download a fresh copy of your cpg
> version and replace that file with new file.

Where can I get a copy of the non-corrupted mailer.inc.php file?
I have used the one that came as part of the cpg 143 package.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

It is possible that the file got corrupted in uploading. Reupload the same file. Also attach the same file in your next post so that we can take a look at it.
Logged
Chief Geek at Ranium Systems

kalyan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

I downloaded the cpg143 again and uploaded the relevant mailer.inc.php
file. Results are same. I continue to get the parse errors around line 2169.

I am enclosing herewith parts of the mailer.inc.php file in the range where
the parsing error is cited, around the fline starting with
   function Send($from)

---
   /**
     * Gets help information on the keyword specified. If the keyword
     * is not specified then returns generic help, ussually contianing
     * A list of keywords that help is available on. This function
     * returns the results back to the user. It is up to the user to
     * handle the returned data. If an error occurs then false is
     * returned with $this->error set appropiately.
     *
     * Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
     *
     * SMTP CODE SUCCESS: 211,214
     * SMTP CODE ERROR  : 500,501,502,504,421
     * @access public
     * @return string
     */
    function Help($keyword="") {
        $this->error = null; # to avoid confusion

        if(!$this->connected()) {
            $this->error = array(
                    "error" => "Called Help() without being connected");
            return false;
        }

        $extra = "";
        if(!empty($keyword)) {
            $extra = " " . $keyword;
        }

        fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);

        $rply = $this->get_lines();
        $code = substr($rply,0,3);

        if($this->do_debug >= 2) {
            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }

        if($code != 211 && $code != 214) {
            $this->error =
                array("error" => "HELP not accepted from server",
                      "smtp_code" => $code,
                      "smtp_msg" => substr($rply,4));
            if($this->do_debug >= 1) {
                echo "SMTP -> ERROR: " . $this->error["error"] .
                         ": " . $rply . $this->CRLF;
            }
            return false;
        }

        return $rply;
    }

    /**
     * Starts a mail transaction from the email address specified in
     * $from. Returns true if successful or false otherwise. If True
     * the mail transaction is started and then one or more Recipient
     * commands may be called followed by a Data command.
     *
     * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
     *
     * SMTP CODE SUCCESS: 250
     * SMTP CODE SUCCESS: 552,451,452
     * SMTP CODE SUCCESS: 500,501,421
     * @access public
     * @return bool
     */
    function array($from) {
        $this->error = null; # so no confusion is caused

        if(!$this->connected()) {
            $this->error = array(
                    "error" => "Called Mail() without being connected");
            return false;
        }

        fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF);

        $rply = $this->get_lines();
        $code = substr($rply,0,3);

        if($this->do_debug >= 2) {
            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
        }

        if($code != 250) {
            $this->error =
                array("error" => "MAIL not accepted from server",
                      "smtp_code" => $code,
                      "smtp_msg" => substr($rply,4));
            if($this->do_debug >= 1) {
                echo "SMTP -> ERROR: " . $this->error["error"] .
                         ": " . $rply . $this->CRLF;
            }
            return false;
        }
        return true;
    }
---
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

I am attaching a fresh copy of mailer.inc.php with this post. Download the file remove the .txt extenstion and upload it to your server. Check whether this works for you.

Also post the link to your site and non admin test  user account with ability to add comments.

P.S: I am sorry, i won't be able to help you through emails (kalyan sent me an email).
« Last Edit: January 14, 2006, 12:19:04 pm by Abbas Ali »
Logged
Chief Geek at Ranium Systems

kalyan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

Well, I replaced the mailer.inc.php file with the one that you (Abbas Ali) has provided.
Error problems remain the same. I cannot edit album properties nor add comments
even as admin.  So I do not know if the error message is correct.

My cpg is at
  http://kavitha.orgfree.com/cpm143/index.php

I have created a visitor account (username: guest, password: guest)
with add comments enabled. I have also enabled debug info. display mode.

I tried to insert comments signing as this user. I get an empty db_input.php 
output page. Please have a look
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems

Yes it gives blank page. Can't tell what's happening without debugging.

Just a wild guess - may be it has something to do with frames.
Logged
Chief Geek at Ranium Systems

kalyan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

I am not sure if the frames are causing problems (I am using a web host with forced ads!)
I would appreciate receiving some guidelines on how to debug. Can I post a debug report
being displayed in my cpg?

I have a related question:
I have been told that sometimes "gzip" can cause problems. Do you know if CPG uses
gzip and how I can disable "gzip" if it is used?

When I installed CPG I had problems in uploading jpg image files (related to some
bug in PHP 4.4.1 release). I used the suggestions given in the cpg forum at
  http://forum.coppermine-gallery.net/index.php?topic=23342.0
to edit picmgmt.inc.php file. It worked nicely.


Logged

Joachim Müller

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

coppermine doesn't support output compression, if that's what you're asking.
Logged
Pages: [1]   Go Up
 

Page created in 0.045 seconds with 19 queries.