FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » log files and external scripts problem (logging files should always be in place)
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
log files and external scripts problem [message #162446] Wed, 12 May 2010 12:25 Go to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Another problem I found in the process of running the mail import
is that the script has need of permissions to write to a logging
file. If the file does not exist then the permissions acquired
running the maillist.php will try to create the /var/www/FUDforum/errors/sql_errors file. If these permissions conflict with
the permissions of the account running FUDforum then the
forum code gets errors and cannot read it's own log file.

Also when the file is removed and recreated any previous permissions granted to these files are also removed.

As such, all necessary log files should always be in place even
if they contain no data.

Below is the output from procmail that contains the error that I am referencing.
------------------------------------------------------------------
procmail: Executing "/var/www/FUDforum/scripts/maillist.php,2"
PHP Warning: pg_query(): Query failed: ERROR: value too long for type character varying(100) in /var/www/FUDforum/include/theme/default/db.inc on line 93
PHP Warning: error_log(/var/www/FUDforum/errors/sql_errors): failed to open stream: Permission denied in /var/www/FUDforum/include/core.inc on line 157
procmail: Assigning "LASTFOLDER=/var/www/FUDforum/scripts/maillist.php 2"
Re: log files and external scripts problem [message #162448 is a reply to message #162446] Wed, 12 May 2010 15:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
It makes sense. Can you prepare a fix for us?
Re: log files and external scripts problem [message #162451 is a reply to message #162448] Thu, 13 May 2010 11:37 Go to previous messageGo to next message
lbrigman124 is currently offline  lbrigman124   United States
Messages: 26
Registered: March 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
naudefj wrote on Wed, 12 May 2010 12:08
It makes sense. Can you prepare a fix for us?


I will try. After making the /var/www/FUDforum/errors/sql_errors file with the correct permissions, I got only one message through
before I get the same error again.

Now I'm stumped.

Also there really should be some isolation. The maillist.php
imports all the of the web interface, themes, etc. It really
should only need the permissions and database schema to insert
into the proper forum.

I'm trying to figure out why the error is occurring in the first place.
PHP Warning: pg_query(): Query failed: ERROR: value too long for type character varying(100) in /var/www/FUDforum/include/theme/default/db.inc on line 93
Re: log files and external scripts problem [message #162459 is a reply to message #162451] Fri, 14 May 2010 16:54 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
It may help to disable safe_mode in php.ini. It causes a lot of strange behaviours and will eventually be removed from PHP anyway.

If all else fails, you can create an intermediate root script (script A) to copy messages and chown them. Script B can then import them with the forum's user.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: ldap user login
Next Topic: Replacement and Censorship System
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Oct 18 11:01:53 EDT 2017

Total time taken to generate the page: 0.00655 seconds