SourceForge has been redesigned. Learn more.
Close

Posting problem

Clader
2004-09-29
2013-04-08
  • Clader

    Clader - 2004-09-29

    I've got everything more or less working from a read only point of view.

    My nntp server does not require any login or authentication. I can read and browse all of the available news groups.

    However when i try to reply to a post the post form says:
          Fail to join the group:
          newsgroup

    Also there is only one radio button next to "Newsgroups"

    Lastly when actually trying to post anything, either as a reply, or an original post, once the post button is hit, the following error is displayed:

    Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /var/www/html/webnews/webnews/post_message.php on line 30

    Any ideas?

    Thanks.

     
    • Terence Yim

      Terence Yim - 2004-09-30

      For the posting problem, if your NNTP server doesn't require authentication, you can set "$auth_level = 1" in the "config/web-news.cfg.php" file. This effectively tell Web-News not to popup the login box.

      Moreover, from the error message, I guess it's the problem of the HTTP session. You may first check if the PHP is configurated to support HTTP session (default would be on, but you have to set the directory for storing the session data). Also, you may try to close all your browser first and open a browser window again to destory the session cookie.

      For the radio button next to the newsgroup, there should be a label next to it to indicate which newsgroup you are going to post your message to (since Web-News can be configurated to support cross-posting). I think it again is affected by the session problem which make the label not able to show.

      The error message you encountered when you try to post an article is also because of the session problem, since the script cannot read the newsgroup name from the session, which cause problem.

       
      • Clader

        Clader - 2004-09-30

        I have set the $auth_level = 1 in the config, and this seems to work fine in that I'm not prompted for a login when clicking to the reply or comment screens.

        I took a look at my [session] section of /etc/php.ini and it seems that HTTP session is enabled.

        Here is the Session section from viewing a phpinfo.php:

        Session Support  enabled 
        Registered save handlers  files user 

        Directive Local Value Master Value
        session.auto_start Off Off
        session.bug_compat_42 On On
        session.bug_compat_warn On On
        session.cache_expire 180 180
        session.cache_limiter nocache nocache
        session.cookie_domain no value no value
        session.cookie_lifetime 0 0
        session.cookie_path / /
        session.cookie_secure Off Off
        session.entropy_file no value no value
        session.entropy_length 0 0
        session.gc_divisor 100 100
        session.gc_maxlifetime 1440 1440
        session.gc_probability 1 1
        session.name PHPSESSID PHPSESSID
        session.referer_check no value no value
        session.save_handler files files
        session.save_path /tmp /tmp
        session.serialize_handler php php
        session.use_cookies On On
        session.use_only_cookies Off Off
        session.use_trans_sid Off Off

        Anything jump out at you?

        Thanks in advance!

         
        • Terence Yim

          Terence Yim - 2004-09-30

          Your configuration seems ok. Have you tried to close all browser windows and open the page again? Also, can you tell me which version of PHP are you using??

          Please make sure the "register_global" option in the "php.ini" is turned off and "track_vars" is turned on (which are the default values).

           
    • Clader

      Clader - 2004-09-30

      Clearing cookies doesn't seem to have any effect.  I even tried hitting the page from a completely diff machine which had never hit it before with the sam result.

      register_global is off and track_vars is on (by default)

      PHP version is 4.3.2 (cgi)
      HTTP version is Apache/2.0.46 (sept 13 build)
      OS is Redhat Enterprise Linux ES release 3

      Thanks
      ~Calder

       
      • Clader

        Clader - 2004-09-30

        I just checked the /tmp directory, and it seems that with every click through the news groups a new session file is created with all the various data for that page.  Is that how it's supposed to work, or should there be just one file per "session" that gets re-used?  The number of files seems to build up quite quickly. 
        Just wondering if this is normal.

        Thx. 

         
        • Terence Yim

          Terence Yim - 2004-10-01

          It supposed to be only 1 file per user session. If you discovered than a new file is created in each click, this means that the browser you use doesn't send the session cookie back to the PHP server. Have you checked with the browser cookies settings?

           
          • Clader

            Clader - 2004-10-01

            I started looking into the session/cookie problem.  I'm running several other php apps (phpmyadmin, etc) and they seemed to be able to send cookies just fine to the same browser that was having problems with web-news.

            As it turns out, in webnews.cfg.php, I had inadvertently set the $session_name variable to a string with spaces in it.  Getting rid of the white space solved the problem and posting now works fine.

            Thank to everyone for the help and guidance with this problem!!

            ~Calder

             
            • Terence Yim

              Terence Yim - 2004-10-02

              It's good to know that you've solved the problem.

               
    • chanchan

      chanchan - 2005-05-23

      i set the $session_name as clader, it list the newsgroup name in post message box finally.
      but when i press post button, it show "Fail to post the article".
      can anyone suggest the solution?

       
      • Terence Yim

        Terence Yim - 2005-05-23

        Does your NNTP server allow posting message?? Does your NNTP require user login before posting??

        You can let Web-News ask the user to input username and password when doing message posting by setting the "$auth_level = 2" in the webnews.cfg.php file.

         

Log in to post a comment.