Giter Club home page Giter Club logo

phpgdo's Introduction

phpgdo

PHP reference implementation of GDO, currently version 7.0.1. GDO is the best PHP Framework on Planet Earth, SOL. Write solid applications in a new fresh way preferably from re-used code. Choose, integrate and mix different libraries easily. The F5 workflow is still unbeaten, and coding can be fun again. Great production builds are done on the fly. Development mode always includes the dev source from all included libraries. Read more in the DOCS and Changelog.

phpgdo: Demo Sites

Sadly, there is only the default theme available at the moment. This will hopefully change soon, but i want a clean default first.

  • Fineprint is a hacking challenge with a known vulnerability. It also serves as a demo site for the classic theme.

  • Geo2Country is a small service that converts geocoordinates (lat/lng) into country codes. Currently, also with gdo classic design.

  • KassiererCard is a bonus system for cashiers, companies and customers.

  • TBS is a remake of TBS / Bright-Shadows.net. It has an own minimal theme based on default, but currently it is very broken.

phpgdo: Installation

Please refer to the DOCS for installation and documentation.

phpgdo: Help

I might soon be working on a Module_Helpdesk to track tickets as well.

phpgdo: License

GDOv7 is property of [email protected].

The individual modules have their own license.

There is the phpgdo-licenses module that explicitly lists all licenses involved in an installation.

Yet open source, usage is prohibited, unless you got granted the usage via a licensing agreement.

The GDOv7-LICENSE may change at any point in time.

phpgdo's People

Contributors

ricerbot avatar gizmore avatar g-flat avatar

Stargazers

Roman avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

g-flat

phpgdo's Issues

Get cpu cores plattform independent when installing FFMpeg

00:13 [127.0.0.1:gdo_adm] - file_get_contents(/proc/cpuinfo): Failed to open stream: No such file or directory in GDO/CLI/Process.php line 56
Backtrace starts in gdo_adm.php line 417.
 - GDO\Install\Installer::installModules([{"temp":null,"priority":1,"version":"7.0.1","license":"GDOv7-LICENSE","authors":"gizmore <gizmore@w…nited":false}]) GDO/Install/Installer.php line 74.
 - GDO\Install\Installer::installModule(Module_FFMpeg#56, false) GDO/Install/Installer.php line 118.
 - GDO\FFMpeg\Module_FFMpeg->onInstall() GDO/FFMpeg/Module_FFMpeg.php line 80.
 - GDO\FFMpeg\Method\AutodetectBinaries->detectBinariesIfNeeded() GDO/FFMpeg/Method/AutodetectBinaries.php line 24.
 - GDO\FFMpeg\Module_FFMpeg->cfgFFMpegPath() GDO/FFMpeg/Module_FFMpeg.php line 65.
 - GDO\Core\GDO_Module->getConfigVar("ffmpeg_path") GDO/Core/GDO_Module.php line 622.
 - GDO\Core\GDO_Module->getConfigColumn("ffmpeg_path") GDO/Core/GDO_Module.php line 604.
 - GDO\Core\GDO_Module->buildConfigCache() GDO/Core/GDO_Module.php line 559.
 - GDO\FFMpeg\Module_FFMpeg->getConfig() GDO/FFMpeg/Module_FFMpeg.php line 62.
 - GDO\CLI\Process::cores() GDO/CLI/Process.php line 56.
 - file_get_contents("/proc/cpuinfo") [unknown file] line ?.

as /proc/cpuinfo only exist on a linux system but not on other Unix or MAC systems
you could determine the number of cpu core with sysctl -a in these cases.

See also https://helloacm.com/how-to-get-number-of-cpu-cores-using-php-function-platform-independent/

Patch proposal:

diff --git a/GDO/CLI/Process.php b/GDO/CLI/Process.php
index 0594ebd..085c809 100644
--- a/GDO/CLI/Process.php
+++ b/GDO/CLI/Process.php
@@ -51,10 +51,25 @@ final class Process
                        {
                                return (int) getenv('NUMBER_OF_PROCESSORS');
                        }
-                       else
+                       else if (is_file('/proc/cpuinfo'))
                        {
                                return substr_count(file_get_contents('/proc/cpuinfo'), 'processor');
                        }
+                       else
+                       {
+                               $ps = @popen('sysctl -a', 'rb');
+                               if (false !== $ps)
+                               {
+                                       $output = stream_get_contents($ps);
+                                       preg_match('/hw.ncpu: (\d+)/', $output, $matches);
+                                       if ($matches)
+                                       {
+                                               $ans = intval($matches[1][0]);
+                                       }
+                                       pclose($ps);
+                                       return $ans;
+                               }
+                       }
                }
                catch (\Throwable $ex)
                {

gdo_adm.sh configure

~/phpgdo $ ./gdo_adm.sh configure
PHP Warning:  Module "openssl" is already loaded in Unknown on line 0

SiteShort Sitename: GDOv7No
  Main Language

   >
        en
        de

  Themes

   >
        default
        install

module: Coremethod: Welcome  ipc

   >
        Database
        IPC
        none

No No No HTTPdomain: localhost  server

   >
        none
        apache2.2
        apache2.4
        nginx
        other

  protocol

   >
        http
        https

web_root: /Files  chmod

   >
        448
        504
        511

LoggingNo
Yes Yes No Database
No db_host: localhostdb_user: db_pass: db_name: No CacheNo No memcache_host: 127.0.0.1612211800Cookiessess_name: GDO7
172800No No No enum_undetermined_yes_noMailNo Bot Name: GDOv7 supportBot Email: support@localhostAdministrator Email: administrator@localhostError Email: administrator@localhostYes You should now edit this file by hand.
Afterwards execute gdo_adm.php test config.

no config.php in protected directory

~/phpgdo $ ll protected/
total 18
drwxr-x---   2 gdo  www    3 May 27 23:17 .
drwxr-xr-x  12 gdo  www   41 May 27 23:17 ..
-rw-r--r--   1 gdo  www  117 May 27 23:17 .htaccess

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.