PDA

View Full Version : Question



domesticbeer
08-12-2002, 05:03 PM
Not sure if this is the correct forum for this question.

I am looking at the Drawmap.cpp file trying to figure out why it wont draw out the maps for me, and I noticed something odd and was wondering if someone could explain what it is trying to do./

In this code from main.h lines 20 - 35


#include "../conf.h"

//----------------------------------------------------------------------
// Macros
#ifndef LOGDIR
#define LOGDIR "../logs"
#endif

#ifndef MAPDIR
#define MAPDIR "../maps"
#endif

#ifndef SPAWNFILE
#define SPAWNFILE LOGDIR "/spawn.db"
#endif


am I reading this right that the compiled program is going to look up one directory from itself for these directories?
/usr/local/bin/showeq >>>> /usr/local/

shouldnt it be looking in /usr/local/share/showeq ? Am I going crazy?

Mr. Suspicious
08-12-2002, 06:44 PM
* oops didn't read well enough (to late already) * NM the ramblings of an idiot (me), have to think this over, will have a closer look tomorrow, when I'm more awake =)

Edit: OK, awake now *grins*

This is "input-security" (not sure the english term for it, "Invoerbeveiliging" in my language)



#ifndef MAPDIR
#define MAPDIR "../maps"
#endif


Reads as: if MAPDIR isn't defined yet anyplace else in the source, go ahead and define it now as "../maps"

domesticbeer
08-13-2002, 09:48 AM
Ok that makes sense just trying to figure out why the drawmap.cgi is not generating the maps.

Cryonic
08-13-2002, 09:57 AM
Were you able to successfully compile SEQ with the cgi programs? If so then I guess that means that you either a) downgraded gd to a version below 1.6 to get gif support, or b) the cgi scripts have been modified and are trying to turn the maps into either pngs or jpgs.

domesticbeer
08-13-2002, 10:04 AM
I modified the drawmap.cpp to not check for the gif support. Why, because the version of GD that i got doesnt have it in it. Different post different forum
http://seq.sourceforge.net/showthread.php?s=&threadid=1719

Now here is the underlining problem. It wont create any of the icons or the maps when you call it. The apache error_log just says file not found.

Not sure what the hell the problem is but libpng libjpeg gd are all installed and are found when I compile showeq.

Cryonic
08-13-2002, 10:27 AM
What are the exact errors coming from apache's logs?

high_jeeves
08-13-2002, 10:48 AM
Also, try adding some textual output to the code, when it tries loading the map file. Dump out the filename it is trying to load. That might give you some idea about what exactly is wrong.

--Jeeves

domesticbeer
08-13-2002, 12:15 PM
I get 2 types of errors depending on the page

error 1 listitem.cgi

file not found xxxxxx.png where xxxxx is the itemnumber.

error 2 drawmap.cgi


file not found mapname.png.



It is like it is not even attempting to generate the pngs for the maps or item icons.

I had this same problem with qt 2.3.2 as well as qt 3.0.4.

I have ShowEQ compiled with qt3.0.4 and everything else works fine. No cores no problem drawing maps or spawnlist problems. Just the problem with the cgi's not working correctly.

high_jeeves
08-13-2002, 01:06 PM
I wonder if this could possibly be a permissions problem? Does the user that the cgi is running as have write permissions in that folder? If it were me, I would definitely go through and add tons of diagnostic printing, rebuild and try again..

--Jeeves

domesticbeer
08-13-2002, 02:33 PM
That is one thing that I did not check Jeeves was the permissions on the cgi-bin and eq-icon directories. I will check that. If that doesnt work I am gonna do some text out put.