maniaplanet / manialive

PHP controller for the ManiaPlanet Dedicated Server
GNU Lesser General Public License v3.0
9 stars 4 forks source link

issue with php.exe and with logging. #6

Closed magnetik closed 10 years ago

magnetik commented 10 years ago

From petri.ja...@gmail.com on December 31, 2010 13:15:15

I tried dedimania-plugin with windows and ran to problems.

obviously i didn't read properly first time, i forgot to include php.exe to phpPath, this means the program started the folder over and over again. I think it woulde be good to have a check like is_file($phpPath) and if not then just close program with error... or autosense php executable...

ok, got it fixed (opening the folder over and over again), then i ran into problems with Logger.php, see details...

config.ini ;------------------ ; ManiaLive ;------------------

; the default path is 'php.exe' on windows and 'php' on linux phpPath = f:\trackmania_dedicated\xampp\php\php.exe

; the default is %application%/logs logsPath = f:\trackmania_dedicated\sn12\mlLog

; whether to write console output into a file, default is Off ; runtimeLog = On

ERRORS:

Notice: Trying to get property of non-object in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 31

Notice: Trying to get property of non-object in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 33

Notice: Trying to get property of non-object in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 34

Warning: mkdir(): Invalid argument in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 34

Notice: Trying to get property of non-object in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 40

Notice: Trying to get property of non-object in F:\Trackmania_dedicated\sn12\libraries\ManiaLive\Utilities\Logger.php on line 41

Original issue: http://code.google.com/p/manialive/issues/detail?id=6

magnetik commented 10 years ago

From floschn...@gmail.com on December 31, 2010 04:20:47

seems like there is a bug in the logger, will take a closer look.

Status: Accepted
Owner: floschnell

magnetik commented 10 years ago

From melot.philippe on December 31, 2010 06:00:36

The problem looks like to be in the configuration loader. Have you tried to quote the value in your ini file. Because the \ char could be at the base of this problem. Your config file should looks like:

;------------------ ; ManiaLive ;------------------

; the default path is 'php.exe' on windows and 'php' on linux phpPath = 'f:\trackmania_dedicated\xampp\php\php.exe'

; the default is %application%/logs logsPath = 'f:\trackmania_dedicated\sn12\mlLog'

; whether to write console output into a file, default is Off ; runtimeLog = On

Cc: melot.philippe

magnetik commented 10 years ago

From petri.ja...@gmail.com on December 31, 2010 23:09:03

I tried with hyphens with no luck, i tried also replacing backslashes with slashes --> like unix style, it says the same.

magnetik commented 10 years ago

From floschn...@gmail.com on January 03, 2011 01:41:28

I am currently trying to reproduce that bug ... could you please attach your full configuration file?

magnetik commented 10 years ago

From petri.ja...@gmail.com on January 03, 2011 01:56:01

allright. here it is:

i'm running windows 7 64bit with latest paches. Trackmania dedicated is located at f:\trackmania_dedicated\sn12\ manialive is directly extracted to f:\trackmania_dedicated\sn12\ xampp is the latest beta with default settings: xampp-win32-1.7.4-beta4-VC6.7z

run.bat

@echo off set INSTPHP=f:\trackmania_dedicated\xampp\php\ rem *****

PATH=%PATH%;%INSTPHP%;%INSTPHP%\extensions

php.exe bootstrapper.php --dedicated_cfg=dedicated_cfg.txt --manialive_cfg=config.ini pause


config.ini

;------------------ ; ManiaLive ;------------------

; the default path is 'php.exe' on windows and 'php' on linux phpPath = 'f:/trackmania_dedicated/xampp/php/php.exe'

; the default is %application%/logs logsPath = "f:/trackmania_dedicated/sn12/mlLog"

; whether to write console output into a file, default is Off ; runtimeLog = On

;------------------ ; Dedicated Server ;------------------

server.host = 'localhost'

server.port = 5012

; standard user level is SuperAdmin server.user = 'SuperAdmin'

server.password = '(removed)'

; when a connection can't be established after the given amount ; of time, it will timeout and manialive will shutdown. ; server.timeout = 1

;------------------ ; Admins ;------------------

; Add admins, that shall be able to control your server from game. admins.logins[] = 'reaby' admins.logins[] = 'max1995' admins.logins[] = 'willie-maykit' admins.logins[] = 'nouseforname'

;------------------ ; Plugins ;------------------

; Add plugins to load. ; plugins.load[] = 'Examples\WindowExample' ; plugins.load[] = 'Examples\PluginExample' plugins.load[] = 'MLEPP\Database'

plugins.load[] = 'MLEPP\CustomChat' plugins.load[] = 'MLEPP\Core' plugins.load[] = 'MLEPP\AdminPanel' plugins.load[] = 'MLEPP\ChatEmotes' plugins.load[] = 'MLEPP\ForceMods' plugins.load[] = 'MLEPP\JoinLeaveMessage' plugins.load[] = 'MLEPP\RandomMessage' plugins.load[] = 'MLEPP\DonateCoppers' plugins.load[] = 'MLEPP\Jukebox' plugins.load[] = 'MLEPP\AddRemoveTracks' ;plugins.load[] = 'Flo\Dedimania' plugins.load[] = 'Flo\Menubar'

;------------------ ; Threading ;------------------

; threading can improve performance of your application. it ; allows modules to push blocking work onto another processes, ; this can also improve stability, because timeouts or ; unexpected exceptions do not impact the main application.

; if you have stability problems try to deactivate threading first threading.enabled = true

; how long may a thread be busy until it is killed ; threading.busy_timeout = 20

; how long, if not busy, may it take for a thread to response to a ping ; threading.ping_timeout = 2

; how many jobs should be send on each loop. ; increasing this value will boost jobs/time ; decreasing it will result in a reaction time improvement. ; threading.chunk_size = 10

; if threading is disabled, then how much time should be spend on ; each application loop to process work that would have been assigned ; to other threads normally ; default value is 1 second. ; threading.sequential_timeout = 1

;------------------ ; ManiaHome ;------------------

; enabling the maniahome feature allows other modules to send ; notifications about eg. records or other actions on your ; server to player's friends.

; disabled by default. ; maniahome.enabled = true

; maniahome.user = ''

; maniahome.password = ''

; maniahome.manialink = ''

plugins.Flo\Dedimania.password ='(removed)';

plugins.MLEPP\ForceMods.Stadium[] =' http://koti.mbnet.fi/reaby/tmn/techstar_makonen.zip'; plugins.MLEPP\ForceMods.Stadium[] =' http://koti.mbnet.fi/reaby/tmn/techstar_nixxy2.zip'; plugins.MLEPP\ForceMods.Stadium[] =' http://koti.mbnet.fi/reaby/tmn/techstar_pablo.zip'; plugins.MLEPP\ForceMods.Stadium[] =' http://koti.mbnet.fi/reaby/tmn/techstar_revilo.zip'; plugins.MLEPP\ForceMods.Island[]= ''; plugins.MLEPP\ForceMods.Speed[] = ''; plugins.MLEPP\ForceMods.Rally[] = ''; plugins.MLEPP\ForceMods.Bay[] = ''; plugins.MLEPP\ForceMods.Coast[] = ''; plugins.MLEPP\ForceMods.Alpine[] = '';

plugins.MLEPP\Database.type = 'SqLite';

;------------------ [hostname: testHost] ;------------------

; put here the configuration specific to an host

magnetik commented 10 years ago

From floschn...@gmail.com on January 03, 2011 04:02:52

still can't reproduce. I am using php 5.3.4 and your config.ini can you send me your php.ini please? [forgot to ask] what php version is included in the package? (On the xampp website they say 5.3.4, correct?) thanks!

magnetik commented 10 years ago

From petri.ja...@gmail.com on January 03, 2011 04:30:13

yes, php version is indeed 5.3.4 and ini-files can be downloaded from: http://koti.mbnet.fi/reaby/manialive/php.ini.zip (will propably remove the download in some point at future)

magnetik commented 10 years ago

From floschn...@gmail.com on January 05, 2011 10:14:39

tell me if latest release solved your problem :)

Status: Fixed

magnetik commented 10 years ago

From petri.ja...@gmail.com on January 05, 2011 11:16:08

i'm sorry to write this, but the problem even still exists, the logs tell same as what i send you earlier. http://koti.mbnet.fi/reaby/manialive/images/console1.jpg with the latest version all manialinks are broken. http://koti.mbnet.fi/reaby/manialive/images/screenshot1.jpg and I open a new issue with spectator & commands problem.