MP problem

For bug reports and fixes, installation issues, and new ideas for technical features.

Moderator: SEOW Developers

Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

MP problem

Post by Irpus »

First of all many thanks to everyone who made SEOW available!:)
Then my problem: I installed all the software (PHP 5, SEDCS, DB, MP) following the instructions on the website, including the special exception for a XP Pro user like me (like permissions for IUSR). I use IIS as the web server and Access as DBMS because now I only need to setup a training campaign for my group.
The DB and DCS seem to work , but when I launch the browser and I insert the address of the MP I receive a message about Directory Listing not available. When I go to IIS to change permissions to include it, I only get directory listing and not execution of the scripts that make MP work.
I don't know if I'm missing something, so I'll accept any suggestion, hoping this has not already been asked (I didn' find it searching).
Thanks again.
22GCT_Gross
Posts: 302
Joined: Fri 13 Apr 2007 1:13 pm
Location: Italy

Post by 22GCT_Gross »

Ciao Irpus,
I want you to remember that an AMVI training SEOW campaign could be easily set up on 22GCT server; I'll give you the passwords and then you'll have a full control of your campaign since 22GCT server can be managed by game chat. Tell me the scenery you want to choose and the scheduled weekly time to reserve the server for your team.
22GCT_Gross
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Thanks gross!
I remember your kind offer, but I would like to setup the system all the same, and I suppose I'm just missing a small detail to make it! I'm going to use Access because we don't need something much complex, and I'm trying to use the basic configuration.
Have you got any idea of what I may have missed? If you have any question to clarify the steps I made, just ask!
Thankyou again! ;)
IV/JG7_4Shades
Posts: 2203
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Irpus,

The very first thing to examine is whether your IIS server recognizes PHP. Create a text file called "info.php" and put it in your IIS document root folder. Edit it so it has contents:

Code: Select all

<?php
php_info();
?>
Then point your browser at http://your.computer.address.here/info.php. You should see a long formatted page of PHP variable settings. If you do, then IIS understands PHP. :)

The next thing to do is to make sure that IIS understands the PHP indexing pages used by the MP. In particular, your IIS should be configured to treat all files called either "index.php" or "default.php" as directory index files (along with the normal "index.html" etc files).

Once this is done, the remaining issue is normally to set up the MP database links, done by showing MP/Scripts/MP-Admin.php in your browser and filling in the path to the SEDB *.mdb file.

Post back here and tell us how you get on. This is good information for all to see.

Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Thanks a lot 4Shades!
I tried to setup the DB link to the only campaign I have initialized (Crimea - I found the template on the SEOW website) by the GUI(after enabling write permission on the file) but it didn't seem to save the info in the Connections.php so I edited it manually. Now I can see the path of my DB inside the box.
Later I will test the PHP and the rest (I'm at work now... :) ) and will post my results!
Thanks again!
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

First of all, I apologize for my delay in posting back my results : work first, holidays after forced me to suspend that activity. Now I have some time to spend on it.
I did the tests as suggested by 4Shades and my results are:
- OK, my browsers (IE and Firefox) both understand PHP
- OK, I've included in the IIS index.php and default.php to make it understand the indexing pages
- NOT OK : when I call the MP-Admin.php I receive the following :
a)the upper part of the page contains what I espected, that is the list of DB ant paths (I only have set up one, the Crimea), but, as I said before, I already had edited manually the Config file to insert it.
b)at the bottom of the page appears an error message :
"PHP Warning: session_start() [function.session-start]: open(C:\DOCUME~1\A\IMPOST~1\Temp\php\session\sess_m4sua3m6ncs0puavsdd7ijudg5, O_RDWR) failed: Permission denied (13) in C:\Inetpub\wwwroot\ScorchedEarth\MP4\Scripts\MP-Admin.php on line 2 PHP Warning: Unknown: open(C:\DOCUME~1\A\IMPOST~1\Temp\php\session\sess_m4sua3m6ncs0puavsdd7ijudg5, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\A\IMPOST~1\Temp\php\session) in Unknown on line 0"

- NOT OK : when I call http://localhost/ScorchedEarth/MP4/ I get the following error :
"PHP Warning: session_start() [function.session-start]: open(C:\DOCUME~1\A\IMPOST~1\Temp\php\session\sess_0q1lav5buv51p6jsbfistiqk65, O_RDWR) failed: Permission denied (13) in C:\Inetpub\wwwroot\ScorchedEarth\MP4\Scripts\default-green.php on line 3 "
- NOT OK : when I launch the SEDCS I also get other errors (even if at the end the program says the DB is ready for use), probably referring to something missing inside the DB, but I suppose I have to solve the other ones before...

Now, since I'm not able to handle PHP, before starting to study it, I will stop here and wait for someone to help me... :D
Thanks for your help!
IV/JG7_4Shades
Posts: 2203
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Irpus,

These errors are generated by PHP when it tries to create "session variables". The MP stores all user login information in session variables to maintain account security (so red commanders can't see blue information etc).

Inside your PHP install directory (often located at C:\PHP), there is a configuration file called "php.ini" which contains, amongst many other things, the session variable path. I usually create a folder called "C:\tmp" and tell my PHP to use that as the session variable path.

If you are using IIS, the chances are that your "IUSR_host" user will need full control of your session variable folder.

Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Ok. thanks again for this step-by-step guide! Unfortunately it seems I need some more steps...
I created the line " session.save_path = "C:\phptmp" " inside the php.ini file and the errors are no more there. Now the problem is that I only get a blank page when I go to http://localhost/ScorchedEarth/MP4/Scripts/default.php (both browsers).
And I still get the errors when launching SEDCS and selecting my DB.
First message contains Error 3265 (SELECT * FROM Campaign_Settings doesn't find modUtilities.subLoadCampaignSettings or another object);
second error window reports an error relating to parameter named Value which has value -99 and not between minimum and maximum. The module that generates the error is frmMain.refreshAllControlWithCSValues.
Then another message says that the DB cannot be updated with undefined campaign settings and tells me to insert a series of values such as AI_Skill = 5, Aircraft_Capture = 1 and so on.
I hope I'm not asking too much of your time!
Thanks a lot!
IV/JG7_4Shades
Posts: 2203
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Irpus,

OK, we are getting somewhere.

Now, the MP needs to be told where your databases are. Point your browser at http://your.machine.address/ScorchedEar ... -Admin.php . After entering the default "admin" password, a large menu page will appear - you need to enter your database address details here. The MP will not work unless it can see some valid SEOW databases.

The DCS error you describe is concerning. It suggests two things: either your DCS version does not match your DB version (DCS expects different internal DB structures than are actually present), or that your DB has not been populated at all.

In order to help diagnose, please advise the following:

DCS code revision number
SEDB release number
MyODBC version
.NET Framework version

Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Hi 4Shades,
here are the data you requested:
- SEDB release number SEDB30A
- DCS is version 30A11
- MP v 4.285
- .Net Framework 2.0
- MyODBC version 3.51

About the DB errors, I have edited manually the MP-Connection.php to be sure and it does appear in the Admin page already. I initialized the campaign using SEDCS interface and it reports : "Campaign Status : Mission Just built - awaiting Analysis after hosting".
It is JG11 Crimea campaign, that is from the template I downloaded from SEOW site.

Hope this helps!
Thank You.
IV/JG7_4Shades
Posts: 2203
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Irpus,

I note that you are using an old release of SEOW. Have you read the release note for DCS3.0(A11) here:

http://www.raf74.net/seow/viewtopic.php ... c&start=15

You will see that in order to use this version you will need to make a minor change to the SEDB30a database. Unless you make this change you will experience DCS error messages.

Cheers,
4Shades

PS: I always recommend using the latest SEOW release.
IV/JG7_4Shades
SEOW Developer

Image
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Thanks again 4Shades!
I have added the missing field to the DB and now the errors are gone!
But I still am not able to open the MP main page.(http://localhost/ScorchedEarth/MP4/Scripts/default.php). All I see is a blank page.
The only anomaly I can report is that I see 3 DB (db1, db2, db3) when I open SEDCS. The only one I configured is db3 which now has a green square beside it, instead of the other two which are red and not configured.
Also I'm not able to modify DB path using the interface for admin (but I have edited the Crimea campaign using the following path : C:\Inetpub\wwwroot\ScorchedEarth\AMVI_SEOW_MSACC\SEDB30a-MSAccess.mdb ).
I plan to use the latest release of SEOW soon, but I'd like to make my final attempt with the one I already installed for a test.:)
Thank You!
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Anybody set the system up using IIS? It seems not working very well with PHP, at least in the case of SEOW. The phpinfo shows its info correctly and Admin page works, too, not the MP page.
Thanks for any info.


PS.
I have the latest install of SEOW system.
IV/JG7_4Shades
Posts: 2203
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Irpus,

You must ensure that the IUSR_Host user account has full control permissions for the SEDB database file and folder. You also need to ensure that the IUSR_host has full control over the MP4/Scripts/MP-Connections.php file. Here is a part of the installation guide for IIS web servers:
VERY IMPORTANT STEP FOR XP PRO and MS ACCESS

In order for the MP to work with the MS Access database version, you may need to set your web server's 'webuser' account to have read/write/execute access to the folder where the .mdb file was stored. Go to that folder in Windows Explorer, and right click on the folder. Select Properties. In this dialog box you should see a Security tab.

NOTE IF YOU DON'T SEE SECURITY TAB!:

You will have to turn off "simple file sharing" for the folder. In order to turn off simple file sharing, you should go into the folder using Windows Explorer : Click on Tools/FolderOptions/View/ One of the last clickable options therein is "Use Simple File Sharing (Recommended)" UNCLICK THIS option. Now, go back out to the Data folder icon itself, right click, then click on Properties. You should see a SECURITY tab now that you have turned off simple file sharing.

You should see several users listed with permissions shown at the bottom. Click the ADD button.

Now, you are going to want to add an account for IUSR which is for any internet user that accesses this particular folder on your PC using IIS. You will need to give them full write, read and execute access to this and only this folder and to the DB (.mdb) file. The format of the entry is as follows

YourComputerName\IUSR_YourComputerName

You should be able to see your computer name in the other accounts. There should be for example a YourComputerName\administrators or similar account. Use that same computer name convention.

Once you've ADD'ed the new "Internet Guest Account" entry, give that entry Full Control (ALLOW checked on)

Voila! Sounds difficult, but what you are doing here is giving internet users full access to write to the .mdb file, so your campaign commanders can lodge their own missions.
Cheers,
4Shades
IV/JG7_4Shades
SEOW Developer

Image
Irpus
Posts: 18
Joined: Fri 27 Jul 2007 2:09 pm
Location: Italy

Post by Irpus »

Hi 4Shades,
I have assigned the permissions checking accurately that the internet guest user has the complete set of permissions over the DB dyrectory and file and over the scripts, but nothing has changed (also because I already checked them with the previous installation).
Maybe there is a problem between IIS and PHP. I'm reading the troubleshooting in the online PHP manual trying to solve, but nothing till now.
I will keep you informed, if I find something useful.
Bye and thank you again!

PS.
I installed PHP using the automatic installer (selecting IIS cgi configuration), do you think that doing it manually would be better?
Post Reply