Author Topic: getting the server console working  (Read 3475 times)

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
getting the server console working
« on: July 01, 2007, 10:18:42 pm »
i know i'm missing something... the problem i is don't know what.

i've got apahce 2.0.59 installed and working, php 5.2.1 installed and working. or atleast the test pages up. both for windows.
i've got mysql installed and working, cause the server likes it.

i can get the login for the server console to come up. but i login and i get a blank page. the account has the access set to over 50.

any guidance from those who know?

may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: getting the server console working
« Reply #1 on: July 06, 2007, 11:17:59 am »
Are you (high) on linux? :D

Are you sure that apache has read access on those files and that he's the owner? Do the following command to check:

Code: [Select]
ls -la

Here's my setup:

Code: [Select]
drwxr-xr-x  2 www-data www-data 4096 2007-06-27 11:36 migration
drwxr-xr-x  2 www-data www-data 4096 2007-06-27 11:36 register
drwxr-xr-x  2 www-data www-data 4096 2007-06-29 20:20 secure
drwxr-xr-x 20 www-data www-data 4096 2007-06-27 11:36 serverconsole

I assume that you put the files under /var/www where apache looks by default.

The default httpd.conf or apache2.conf in /etc/apache2 folder should give you answers about the configuration.

The distribution I'm using, Ubuntu Server 6.06 LTS has the VirtualHost config in /etc/apache2/sites-enabled/default actually.

Snippet:

Code: [Select]
NameVirtualHost *:80
<VirtualHost *:80>

        ServerAdmin webmaster@localhost

        DocumentRoot /var/www

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>

        <Directory /var/www/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

.........................

</VirtualHost>

And the main apache2.conf shows some important lines:

Code: [Select]
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml

<IfModule mod_php5.c>
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps
</IfModule>
« Last Edit: July 06, 2007, 04:07:47 pm by Ralleyon »
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #2 on: July 06, 2007, 03:53:35 pm »
actually windows, so permisions aren't an issue

but i moved the directory to the development\planeshift\www. i doubt that that is giving the trouble. becuase i can pull up index.php, but nothing beyond that.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: getting the server console working
« Reply #3 on: July 06, 2007, 04:21:23 pm »
In the /planeshift/www/serverconsole directory there should be an install.txt file which states:

Code: [Select]
Not much to say for now.

1) You need mysql installed with the PlaneShift database

2) You can use vengeance/keith as use pass, be sure that's defined in accounts table, and that the pass is crypted with md5

3) Be sure to set security level to '50' to one account for administration purposes. (accounts.security_level)

3) You can check that your php has magic quotes enabled and session enabled.

4) A directory called "sessions" must exist under the serverconsole main dir.

5) If you are on unix be sure to "chmod 775 sessions"

Are you sure you created the sessions directory where required -> step 4?
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #4 on: July 06, 2007, 05:24:56 pm »
yep. get the sessions temp file in there too. and it is accessing it since, when i log in with venge, i get the black screen, and keep getting it till i junk the file.

looking in the apache logs i'm getting:
Code: [Select]
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 18
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 19
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 20
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 21
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 22
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 23
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 24
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 25
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 26
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 27
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 28
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 29
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 30
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 31
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 32
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 33
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 34
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 35
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 36
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\commonfunctions.php on line 290
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\commonfunctions.php on line 293
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\development\\planeshift\\www\\serverconsole\\index.php on line 132
[Fri Jul 06 07:34:04 2007] [error] [client 127.0.0.1] PHP Parse error:  syntax error, unexpected $end in C:\\development\\planeshift\\www\\serverconsole\\main_menu.php on line 131
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: getting the server console working
« Reply #5 on: July 06, 2007, 09:41:47 pm »
Something is rotten in Denmark...

Ok, it's  beyond my powers of reasoning why that's happening, but yes - best place to check is always the log.

2 possibilities as far as my little brain can judge:

- php version too high -> I use 5.1.2
- additional libs and/or configs required for php

Let me know if and how you sorted it out after all.
« Last Edit: July 08, 2007, 05:12:06 pm by Ralleyon »
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #6 on: July 08, 2007, 10:51:46 pm »
tried version 5.1.2 and same errors.

but it looks llike page is the error what ever the fix is.

that and did you use the serverconsole in the cvs or a different one?... nope the head cvs doesn't work either

and judging by http://hydlaa.com/smf/index.php?topic=14309.0 the "errors" are non-fatal/critical
« Last Edit: July 09, 2007, 12:50:30 am by steuben »
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Anonymous_Coward

  • Wayfarer
  • *
  • Posts: 4
    • View Profile
Re: getting the server console working
« Reply #7 on: July 09, 2007, 02:34:03 am »
For me, the cvs version as of a few days ago worked fine. I was getting a page with errors when I first tried it a month or two ago, but that was due to not having the correct permissions (running linux), and not having the sessions dir (as per install.txt).

Having said that, yes, there are a bunch of old lines of code that do not work with the new database structure, and a few formatting errors like missing quotes and such... It is possible, at least on linux, to get the latest cvs version mostly working ;)

My versions:
apache 2.0.58
php 5.2.2

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #8 on: July 09, 2007, 02:41:01 am »
i've got the latest cvs version in place and i still get a blank page after logging in.
and getting this in the apache error logs
[Sun Jul 08 19:56:51 2007] [error] [client 127.0.0.1] PHP Parse error:  syntax error, unexpected $end in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\main_menu.php on line 153, referer: http://localhost/serverconsole/index.php
« Last Edit: July 09, 2007, 02:42:38 am by steuben »
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: getting the server console working
« Reply #9 on: July 09, 2007, 10:35:17 pm »
Can you paste a small code sample of main_menu.php around line 153?  The error sounds realtivley trival to fix but I don't have full access to code here at the moment to look at that particular file.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #10 on: July 09, 2007, 11:27:33 pm »
Code: [Select]
[Mon Jul 09 17:24:31 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 17, referer: http://localhost/serverconsole/
[Mon Jul 09 17:24:31 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 290, referer: http://localhost/serverconsole/
[Mon Jul 09 17:24:31 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 293, referer: http://localhost/serverconsole/
[Mon Jul 09 17:24:31 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 131, referer: http://localhost/serverconsole/
[Mon Jul 09 17:24:31 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 299, referer: http://localhost/serverconsole/
[Mon Jul 09 17:24:40 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 17, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:24:40 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 290, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:24:40 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 293, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:24:40 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 132, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:24:40 2007] [error] [client 127.0.0.1] PHP Parse error:  syntax error, unexpected $end in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\main_menu.php on line 131, referer: http://localhost/serverconsole/index.php

from what you said in the earlier linked thread the php notices are ignoreable.

but line 131 is the last line of main_menu.php
Code: [Select]
<?PHP }
if ($_GET['category'] == 'Other'){
?>
<p><a href="index.php?page=list_tips">View Tips</a>(SettingMember)</p>
<p><a href="index.php?page=list_guilds">List guilds and members</a> (AnyMember)</p>
<p><a href="index.php?page=list_petitions">List petitions</a> (AnyMember)</p>
<p><a href="index.php?page=view_accounts">View accounts</a> (AnyMember)</p>
<p><a href="index.php?page=view_gms">View/Edit gms</a> (Admins)</p>
<p><a href="index.php?page=view_commands">View/Edit Command Groups</a> (Admins)</p>
<p><a href="index.php?page=view_characters">View characters</a> (AnyMember)</p>
<p><a href="index.php?page=list_traits">List/Edit traits</a> (SysAdmin)</p>
<p><a href="index.php?page=list_commonstrings">List/Edit Common Strings</a> (AnyMember)</p>
<?PHP }
?>
</td></tr></table>
<?
}

?>

generated from the 3.18 serverconsole


and from the 3.19/head
Code: [Select]
[Mon Jul 09 17:42:11 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 19, referer: http://localhost/serverconsole/
[Mon Jul 09 17:42:11 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 290, referer: http://localhost/serverconsole/
[Mon Jul 09 17:42:11 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 293, referer: http://localhost/serverconsole/
[Mon Jul 09 17:42:11 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 162, referer: http://localhost/serverconsole/
[Mon Jul 09 17:42:11 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 299, referer: http://localhost/serverconsole/
[Mon Jul 09 17:42:20 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  loggedin in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 19, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:42:20 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 290, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:42:20 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\commonfunctions.php on line 293, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:42:20 2007] [error] [client 127.0.0.1] PHP Notice:  Undefined index:  page in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\index.php on line 164, referer: http://localhost/serverconsole/index.php
[Mon Jul 09 17:42:20 2007] [error] [client 127.0.0.1] PHP Parse error:  syntax error, unexpected $end in C:\\Program Files\\Apache Group\\Apache2\\htdocs\\serverconsole\\main_menu.php on line 157, referer: http://localhost/serverconsole/index.php

which oddly has no line 157 ends again around 131
« Last Edit: July 09, 2007, 11:46:28 pm by steuben »
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: getting the server console working
« Reply #11 on: July 09, 2007, 11:44:29 pm »
Hmm, that is stranger than I had thought.   I did  a search for $end and that doesn't come up anywhere so it's probably a syntax error somewhere but I cannot spot it right away.   Would it be possible to just try using the latest main_menu.php file from CVS to see if that fixes anything?

----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #12 on: July 09, 2007, 11:45:25 pm »
sorry beat you to it. check above...
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

Ralleyon

  • Hydlaa Citizen
  • *
  • Posts: 304
  • Protector in the Survivors of Vaern
    • View Profile
Re: getting the server console working
« Reply #13 on: July 11, 2007, 10:00:30 pm »
The odd thing is this seems to happen on windows only... I for one had server consoles up and running throughout previous PS versions on linux and had no/little errors. Just a "for your information" though, here's what I sometimes get (although not show stoppers):

Code: [Select]
Warning: Invalid argument supplied for foreach() in /var/www/ps/serverconsole/npcs/viewnpcmap.php on line 145

or

Code: [Select]
Warning: Invalid argument supplied for foreach() in /var/www/ps/serverconsole/natural_resources/natural_resources_map.php on line 146
Select one area:


Coming back to the issue at hand though - I still think this has something to do with php configuration. If you can, please try other php stuff besides the test page and check if any errors occur. Install a phpbb, phpmyadmin for example. They are pretty much "unzip and config" programs so it should be easy to test.
« Last Edit: July 11, 2007, 10:03:13 pm by Ralleyon »
To see the world in a grain of sand
And Heaven in a wild flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
     
   [William Blake - Auguries of Innocence]

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
Re: getting the server console working
« Reply #14 on: July 18, 2007, 03:32:13 am »
buggered if i know what has changed. but it has. the server console is now working for the most part. probably found the smart quotes flag. except for one thing the images for the npc maps don't appear to be loading right... what am i missing there?
and added to that what is the scaling of the pics involved if i wanted to add more to cover other maps...

editage...
got the images working... had to play with the code to get it to work.... well in waypoints_map.php and probably the rest as well i haven't played with them yet.

changed

Code: [Select]
echo "<div id=Layer2 style=\"position:absolute; width:1968px; height:954px; z-index:1; left:0px; top:150px\"><img src=\"index.php?page=waypoints_draw&sector=".$sector."\" >";
to

Code: [Select]
echo "<div id=Layer2 style=\"position:absolute; width:1968px; height:954px; z-index:1; left:0px; top:150px\"><img src=\"".$sector.".gif\" >";
it did mean that i had to move the images up to the server console dir. but it would be easy enough to get them to work there.
« Last Edit: August 01, 2007, 08:23:28 pm by steuben »
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.