Koozali.org: home of the SME Server

PHP development server need to disable PHPopenbasedir

Offline gyrcom

  • 20
  • +0/-0
    • https://www.gidout.com
PHP development server need to disable PHPopenbasedir
« on: June 17, 2023, 05:16:34 AM »
PHPopenbasedir is being a pain for me on a development server. I would like to disable it as adding more and more folders to the string is getting silly.

Thanks in advance

I have tried Web Hosting, it makes things a lot easier, I have tried config setprop, I have tried to figyre out where to add something to the httpd.conf file, am at a loss.
...

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: PHP development server need to disable PHPopenbasedir
« Reply #1 on: June 17, 2023, 07:52:19 AM »
you can’t disable it as the code will replace empty value with default using the needed php dirs and the ibay path.
 while this is quite dangerous you can lower the level of the path you add.

eg : in place of /bin/echo,/bin/ls you can add /bin.

ultimately, while i do not recommend it as it will help hackers to get in your server, you can simply add /

note that if you remove shell a few other commands from disabled functions, they are not limited by open_basedir as running in the bash context not as php.
« Last Edit: June 17, 2023, 07:56:03 AM by Jean-Philippe Pialasse »

Offline gyrcom

  • 20
  • +0/-0
    • https://www.gidout.com
Re: PHP development server need to disable PHPopenbasedir
« Reply #2 on: June 17, 2023, 05:30:28 PM »
Aw rats,,,,,

Thank you for the reply.
...

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP development server need to disable PHPopenbasedir
« Reply #3 on: June 18, 2023, 10:05:11 AM »
These things are set for a reason - usually your security as JP alluded.

Can you explain why you need to do this in the first place?

What problem are you actually trying to solve?

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gyrcom

  • 20
  • +0/-0
    • https://www.gidout.com
Re: PHP development server need to disable PHPopenbasedir
« Reply #4 on: June 18, 2023, 04:34:44 PM »
I do a lot of dev work with moodle, which is a right royal pinta. It always demands the "latest and greatest" libs and versions of everything. It is called "bleeding edge programming" for a reason. I like solid proved things, that is why I have gravitated to Koozali/Mitel. The Ibay system, the event system and config, are drops of sunshine. I will make it all work sometime.
I seem to live in logfiles.
...

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: PHP development server need to disable PHPopenbasedir
« Reply #5 on: June 19, 2023, 12:14:15 PM »
I do a lot of dev work with moodle, which is a right royal pinta. It always demands the "latest and greatest" libs and versions of everything. It is called "bleeding edge programming" for a reason. I like solid proved things, that is why I have gravitated to Koozali/Mitel. The Ibay system, the event system and config, are drops of sunshine. I will make it all work sometime.
I seem to live in logfiles.


OK, but that doesn't explain exactly what issue you are having and why openbasedir is an issue :-)

As far as libraries go you will always have issues on Koozali SME - it will never be bleeding edge.

Have you tried running docker on SME? Might be easier for your development work? Or are you trying to run Moodle natively for clients?

Just trying to figure out exactly what the problem is.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gyrcom

  • 20
  • +0/-0
    • https://www.gidout.com
Re: PHP development server need to disable PHPopenbasedir
« Reply #6 on: June 19, 2023, 04:17:17 PM »
The idea is to end up running moodle in the Primary or an Ibay. I love SME, have found over the past 22 years that it is the best implementation of a server system. And I have tried them all and I used to admin a lot of systems for different offices on NT and I loathe exchange. In Linux I go all the way back to slack 1.2.3 in 95. In systems, IBM1620 intelligent card sort. Tubes!.
Moodle just is a different challange, I have it working correctly on Neth, but Neth is straying from the path. I will quietly continue and when I succeed I will post it here.
...