Page 1 of 1

Space on the server

Posted: 2024-08-04 17:28, Sunday
by sympatyk
:howdy
Hello OG team
Is it possible to store on the server and make available for downloading such elements as map components, ready layers?
For example, Randowe shared his map components on an external server, but it ceased operations and everything disappeared ...

Re: Space on the server

Posted: 2024-08-09 07:17, Friday
by LuisGuzman
sympatyk wrote: 2024-08-04 17:28, Sunday :howdy
Hello OG team
Is it possible to store on the server and make available for downloading such elements as map components, ready layers?
For example, Randowe shared his map components on an external server, but it ceased operations and everything disappeared ...
Are you meaning the package you posted at https://forum.open-general.com/viewtopi ... 800#p18800

Re: Space on the server

Posted: 2024-08-09 09:05, Friday
by sympatyk
:howdy
Are you meaning the package you posted at https://forum.open-general.com/viewtopi ... 800#p18800
Yes + https://forum.open-general.com/viewtopi ... 797#p18797
+ thumbnails for the first post (as it was before)
https://forum.open-general.com/viewtopi ... 9429#p9429

Maybe in the future I would include my layers with houses and other infrastructure ..?

Re: Space on the server

Posted: 2024-08-09 09:43, Friday
by LuisGuzman
sympatyk wrote: 2024-08-09 09:05, Friday + thumbnails for the first post (as it was before)
https://forum.open-general.com/viewtopi ... 9429#p9429
All the links are broken, do you have somewhere else ?
Maybe in the future I would include my layers with houses and other infrastructure ..?
I have to think how to do that :huh

Re: Space on the server

Posted: 2024-08-09 14:48, Friday
by sympatyk
:howdy


I don't know what the possibilities are on the open-general.com server
So I'll try to explain the idea

There are situations when you need to place/show a drawing on the forum
You use free servers then (I did that too)
If such a server stops working (free hosting is unprofitable) - we lose these files
If these were important things, from the community's point of view, e.g. a good tutorial, showing a solution to an important problem (and it was lost forever) --> then you should ask about placing these things on a good server (so that they don't get lost)

How is it solved on opengeneral.pl?

Darek, knowing about the problem of lost files --> shared a folder (for everyone from the forum), where you can place drawings (there are limitations regarding the size of the file, its editing...)
However, several people who create for OG - received personal folders with greater possibilities

This system has been working for several years - thanks to mutual trust

What do I use the personal folder for?
I place unpublished maps (for campaigns converted from PEG), alternative maps e.g. in gray colors, for showing errors, explaining/answering questions (supported by a drawing, screenshot)
Also to illustrate played campaigns
If I'm talking to you - I also place necessary/helpful drawings there

Things like Randowe made map backgrounds - I think they should be stored ... so that they don't disappear with the server not working
Thumbnails were generated from these map backgrounds (size 400x400px)
I don't have them (nobody has them)

I generated --> prefix min_"name"
Additionally, I generated for the latest DvWxlri background
They are in the same folder as all backgrounds
https://drive.google.com/drive/folders/ ... sp=sharing

Re: Space on the server

Posted: 2024-08-11 13:22, Sunday
by LuisGuzman
sympatyk wrote: 2024-08-09 14:48, Friday
How is it solved on opengeneral.pl?
:yes Darek told me already how it is done in the polish server and he is probably working already to do something similar en open-general.com so can be sure that will be implemented here soon ... :bow @Darek


btw: he also setas https instead of http all the links to the server; have you noticed any issue ?

Re: Space on the server

Posted: 2024-08-11 15:48, Sunday
by sympatyk
:howdy
Thank you for your answer

For me it doesn't matter - https or http - I didn't notice a problem

The only thing that seems to be different after setting up the server after a failure --> longer login time and longer message sending time

Re: Space on the server

Posted: 2024-08-11 20:49, Sunday
by kowdar
I have made space available on the server for user content ..

https://forum.open-general.com/viewtopic.php?t=1029

-

Posted: 2025-12-23 04:44, Tuesday
by JesseBed
Does anyone know if it is possible to use the Server.Mappath method to retrieve the path of a file that is in our root directory..the directory that is above our domain website files?

I know I could use an absolute path but wondered if Server.MapPath could be used?

Thanks in advance.

Re: -

Posted: 2026-02-23 18:25, Monday
by Ramon
JesseBed wrote: 2025-12-23 04:44, Tuesday Does anyone know if it is possible to use the Server.Mappath method to retrieve the path of a file that is in our root directory..the directory that is above our domain website files?

I know I could use an absolute path but wondered if Server.MapPath could be used?

Thanks in advance.
Just ask an AI: ;)
it is possible to use the Server.Mappath method to retrieve the path of a file that is in a root directory in a phpBB Forum ?

Code: Select all

The short answer is **no**, you cannot use `Server.MapPath` directly in a phpBB forum because they run on entirely different "engines."

`Server.MapPath` is a method specific to **ASP.NET (C# or VB.NET)**. Since phpBB is built using **PHP**, it doesn't recognize that command. It would be like trying to use a PlayStation controller to play a game on a toaster—the hardware just doesn't speak the same language.

However, you can achieve the exact same result using PHP’s built-in constants and functions.

---

### The PHP Equivalents

In the PHP world, we usually rely on magic constants to figure out where we are on the server.

#### 1. The Direct Replacement: `$_SERVER['DOCUMENT_ROOT']`

If you want the absolute path to the root folder of your website (similar to how `MapPath("/")` works), use this:

```php
$root = $_SERVER['DOCUMENT_ROOT'];
echo $root; // Outputs something like /var/www/html/ or C:\inetpub\wwwroot\

```

#### 2. The "phpBB Way"

phpBB defines its own constant called `PHPBB_ROOT_PATH`. This is usually the safest way to reference files within your forum structure, especially if you are writing a bridge or a plugin.

```php
// If your script is in the forum folder
$path = PHPBB_ROOT_PATH . 'config.php';

```

#### 3. Using `__DIR__`

If you need the path of the directory where your current script is sitting, PHP 5.3+ uses:

```php
$currentPath = __DIR__;

```

---

### Comparison Table

| Feature | ASP.NET (What you asked) | PHP (What phpBB uses) |
| --- | --- | --- |
| **Method** | `Server.MapPath("/")` | `$_SERVER['DOCUMENT_ROOT']` |
| **File Path** | `Server.MapPath("file.txt")` | `realpath("file.txt")` |
| **Language** | C# / VB.NET | PHP |
| **Server** | Usually IIS | Usually Apache / Nginx |

---

### Important Note on Permissions

When you "map" a path in PHP to access a file in the root, ensure your server permissions (CHMOD) allow the PHP process to read that directory. On Linux servers, the web user (like `www-data`) needs at least `755` permissions to navigate the root.

**Would you like me to help you write a specific PHP snippet to include a file or move an upload within your phpBB directory?**

Re: -

Posted: 2026-02-23 18:42, Monday
by randowe
JesseBed wrote: 2025-12-23 04:44, Tuesday Does anyone know if it is possible to use the Server.Mappath method to retrieve the path of a file that is in our root directory..the directory that is above our domain website files?

I know I could use an absolute path but wondered if Server.MapPath could be used?

Thanks in advance.
The user is a bot. They ask silly questions just to promote the link in their signature.

Re: -

Posted: 2026-02-24 07:46, Tuesday
by none
randowe wrote: 2026-02-23 18:42, Monday The user is a bot.
Worse, he's a spammer ("SEO") from Russia. But you're right about the rest, he just copy/pastes some random question from some other forum and reposts it to make his post look legitimate and avoid being immediately deleted by moderators. Meanwhile, search engines register his signature URL as being "widely quoted", ergo, relevant...

Unfortunately for him he doesn't speak English and didn't notice this isn't a Microsoft techie forum, so his post does kind of stick out. Why didn't somebody delete it?

Re: -

Posted: 2026-02-24 11:35, Tuesday
by Ramon
randowe wrote: 2026-02-23 18:42, Monday
The user is a bot. They ask silly questions just to promote the link in their signature.
My fault! :o
Thank you for let me know.
I will be more careful next time. :howdy