UTstatsdb can't delete files

General forum for discussions regarding UTStatsDB
horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

UTstatsdb can't delete files

Postby horndog » Sat Jul 25, 2009 8:46 pm

Windows 2003 server SP3
Apache 2.2.11
UTstatsdb 3.06
PHP 5.2.10
Mysql 5.1.36
UT3Stats 1.04
olstats-3.01
FileZilla FTP server 0.9.32
I had to move my web site to another Box. The lack of a public redirect forced me to serve my own game file and was causing my servers to lag. I migrated my data base and setup a new Apache, php, Mysql. This is kicking my ass.
Nun of my Virtual host name work because Apache ignores their DocRoots, and to the reason of this post: My uploaded game stats files will no delete after parsing and saving. "FTP uplodad", all else work fine. I get this error from my Apache logs:

Code: Select all

PHP Notice: Undefined variable: argc in C:\\vhosts\\logs.php on line 290

Code: Select all

PHP Warning: ftp_delete() [<a href='function.ftp-delete'>function.ftp-delete</a>]: Failed to delete the file. in C:\\vhosts\\logs.php on line 523
I'm sure its a permission problem. I have the "uploads" folder set to the highest permissions possible. For system, Admin, user.

The files just accumulate in UTstatsDB root and I have to go in and delete them manually Any Idea would be appreciated.

BTW. I installed Apache and PHP on the root of my C drive instead of "program files" Like I did on my game box. It may be giving me problems. Thanks

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: UTstatsdb can't delete files

Postby horndog » Sun Jul 26, 2009 4:37 pm

UPDATE: It seam to be just one server that the logs don't delete.
And I'm getting php errors:

Code: Select all

[Sun Jul 26 17:55:24 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 886 [Sun Jul 26 17:55:24 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 887 [Sun Jul 26 17:55:24 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 932 [Sun Jul 26 17:55:24 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 933 [Sun Jul 26 17:57:51 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 886, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 17:57:51 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 887, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 17:57:51 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 932, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 17:57:51 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 933, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 18:20:45 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 886 [Sun Jul 26 18:20:45 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 887 [Sun Jul 26 18:20:45 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 932 [Sun Jul 26 18:20:45 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 933 [Sun Jul 26 18:24:01 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 886 [Sun Jul 26 18:24:01 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 887 [Sun Jul 26 18:24:01 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 932 [Sun Jul 26 18:24:01 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 933 [Sun Jul 26 18:25:22 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 886, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 18:25:22 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 887, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 18:25:22 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 932, referer: http://horndogshouse.com/index.php?stats=matches [Sun Jul 26 18:25:22 2009] [error] [client 166.203.91.18] PHP Warning: Call-time pass-by-reference has been deprecated in C:\\vhosts\\serverquery.php on line 933, referer: http://horndogshouse.com/index.php?stats=matches
I saved the uploaded logs that didn't get deleted..

Panther
Site Admin
Posts: 500
Joined: Sat Dec 08, 2007 12:51 am
Contact:

Re: UTstatsdb can't delete files

Postby Panther » Sun Jul 26, 2009 9:38 pm

The notice about argc can be ingored. Notices should normally be turned off by default on a production server.
Also, the PHP variable "allow_call_time_pass_reference" is normally set to on by default. If you turn this back on then you won't get the warnings either.

As for the error deleting the file, this certainly appears to be a permission user. Try manually logging into the FTP server using an FTP client with the same user and password you've configured in UTStatsDB and see if you can delete the files.

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: UTstatsdb can't delete files

Postby horndog » Sun Jul 26, 2009 10:18 pm

The notice about argc can be ingored. Notices should normally be turned off by default on a production server.
Also, the PHP variable "allow_call_time_pass_reference" is normally set to on by default. If you turn this back on then you won't get the warnings either.

As for the error deleting the file, this certainly appears to be a permission user. Try manually logging into the FTP server using an FTP client with the same user and password you've configured in UTStatsDB and see if you can delete the files.
I thought I had "allow_call_time_pass_reference=on" but I uncommented the instructions section instead of looking farther. Fixed.
As far as notices being turned off this is what is on your instruction docs: error_reporting = E_ALL & ~E_NOTICE How should I turn Notices off?

My FTP server is on my game server and my redirect and website is on another network box. So I can't use that to test permissions although thats a good idea. The funny thing is I'm only having this problem with only one UT2004 server. Two others work fine and the files get saved and upload files get deleted. My UT3 server uploads fine and the files get saved and upload files get deleted. I have all my stats logs uploaded and parsed automaticly when the game ends. I'll see what happens now with "allow_call_time_pass_reference=on"
Is set right. The default was off.

I hate Windows permissions. I guess this should be on a Linux server.
Thanks

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: UTstatsdb can't delete files

Postby horndog » Mon Jul 27, 2009 12:57 am

Update2:
I just checked my FTP logs and it reports the file deleted:
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> 227 Entering Passive Mode (192,168,1,81,11,201)
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> RETR Stats_7000_2009_07_26_21_05_39.log
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> 150 Connection accepted
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> 226 Transfer OK
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> DELE Stats_7000_2009_07_26_21_05_39.log
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> 250 File deleted successfully
(000271) 7/26/2009 21:12:26 PM - ut2stats (192.168.1.67)> QUIT
But in the root of utstatsdb is the file:
LogUploadsStats_7000_2009_07_26_21_05_39.log
Uploads is the name of my upload directory in UTstatsDB
As I said before this only happens to this one server. The Stats are posted and a file with the right name is saved.
Could It be the the file itself does not have the rights to be deleted. Is that even possible?
This ftp'ing the stats files is new to my site.



EDIT:
This is another ftp log of an empty stats log file from my UT3 server when a UT2004 server uploads after a game:
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> RETR Stats-7777-20090726.204759.log
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> 150 Connection accepted
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> 226 Transfer OK
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> DELE Stats-7777-20090726.204759.log
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> 500 Failed to delete the file.
(000274) 7/26/2009 21:13:18 PM - ut3stats (192.168.1.67)> QUIT
The ftp server seams to report the right status.
EDIT 2: This has nothing to do with the uploaded files. This log is for the files on the game server that are deleted or not deleted.
Sorry. The files on the web site are deleted by php.
[Mon Jul 27 04:18:51 2009] [error] [client 192.168.1.81] PHP Warning: ftp_delete() [<a href='function.ftp-delete'>function.ftp-delete</a>]: Failed to delete the file. in C:\\vhosts\\logs.php on line 523
Only the logs from that one server.

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: UTstatsdb can't delete files

Postby horndog » Tue Jul 28, 2009 12:16 am

Case solved. Mod_Alias and Mod_Vhost_alias doesn't play well together. I commented out Mod_Alias and things started to behave. My Vhost Doc Roots started working and the logs were deleted properly. Servers ran all day and no stats files in the UTstatsDB root. Now the only thing left is fixing the php_warnings spamming my vhost error logs. Thanks Panther, maybe this will be usefull to some one.

horndog
Posts: 40
Joined: Mon Mar 23, 2009 11:39 am
Location: 127.0.0.1
Contact:

Re: UTstatsdb can't delete files

Postby horndog » Wed Jul 29, 2009 6:18 am

This is in the php.ini of php5.2.10
; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).

allow_call_time_pass_reference = on
I guess warnings can't be shut off. My vhost error log is filled with:
[Wed Jul 29 07:48:50 2009] [error] [client 192.168.1.81] PHP Warning: ftp_delete() [<a href='function.ftp-delete'>function.ftp-delete</a>]: Failed to delete the file. in C:\\vhosts\\utstatsdb\\logs.php on line 532
[Wed Jul 29 07:58:14 2009] [error] [client 192.168.1.81] PHP Warning: ftp_delete() [<a href='function.ftp-delete'>function.ftp-delete</a>]: Failed to delete the file. in C:\\vhosts\\utstatsdb\\logs.php on line 532
My guess is: my utstatsdb is setup for two different games (ut2004 and UT3) with two different log directories and two different ftp accounts to upload. When one game automatically uploads a log after a match usually the other game has none. and there is the error when there is no log to delete. I got the latest "log.php" with no difference. I hope you can use this information.


Return to “UTStatsDB”