Commit Graph

65 Commits (067ca68549d411c74243e40beffb66b13f9fffb4)

Author SHA1 Message Date
Isaac Connor ebad97038e Implement CpuLoad in Server object 2024-02-22 12:52:49 -05:00
Isaac Connor f54f10df72 Add server stats fields 2024-02-20 13:14:23 -05:00
Isaac Connor 6e93e3df4c Allow untrsuted ssl certs when sending commands to other servers 2023-12-24 12:17:08 -05:00
Isaac Connor 4e2dd31cdc Use ZM_PATH_API instead of hard coded /zm/api 2023-12-15 09:18:04 -05:00
adhamiamirhossein 27977acdd4 fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Isaac Connor a1693c34b9 Add HTTP_FRONT_END_HTTPS as a signal to use https in urls. Mainly for when using a reverse proxy 2023-11-16 10:34:44 -05:00
Isaac Connor ebb37ebc98 Don't output errors from remote commands as it breaks ui 2023-02-09 18:46:01 -05:00
Isaac Connor 359c0c1b27 Don't know why we are turning off display errors in Server.php. Let's not. 2023-01-03 13:17:00 -05:00
Isaac Connor bce8c6195a Don't display errors in Server.php 2022-10-20 16:45:52 -04:00
Isaac Connor 2a9576371b Introduce Server::SendToApi to reduce duplicated code. 2022-09-28 17:40:08 -04:00
Isaac Connor 855dd6ac93 Use HTTP_X_FORWARDED_HOST or HTTP_X_FORWARDED_SERVER if present to get correct hostname to use when behind a reverse proxy. 2022-08-26 14:12:25 -04:00
Isaac Connor a465403c72 Handle when SERVER['HTTP_HOST'] is not set 2021-10-05 19:49:42 -04:00
Isaac Connor 8a170f2841 Remove Debug 2020-08-15 17:49:26 -04:00
Isaac Connor 25426d5fdd Don't add 442 for https and 80 for http. Just cleaner 2020-08-09 22:18:35 -04:00
Isaac Connor cc6d40d67e Missing -> 2019-12-07 10:38:51 -05:00
Isaac Connor 1dc83700c0 Do a better job of handling the non-server, non-multiport case. Put the code in Url so that it works for other functions that call Url() 2019-11-21 13:32:27 -05:00
Isaac Connor 59b9220ddd if doing multiport still call Url(), as it requires a hostname 2019-11-11 13:33:54 -05:00
Isaac Connor d218d2ee9f If the default server case, don't add the Url component. So this will return just the path, using whatever servername/port combo is currently in use. Fixes #2750 2019-11-04 12:04:23 -05:00
Isaac Connor b15f7ad47d handle ipv6 in Server->Hostname. Fixes #2713 2019-10-09 10:00:13 -04:00
Isaac Connor a05c513643 Revert change breaking multiport when servers not defined. 2019-09-23 12:03:19 -04:00
Isaac Connor 0a0bb1b326 Update Frame and Server Objects to use common methods 2019-09-19 16:24:05 -04:00
Isaac Connor 60cf4586da Don't return a hostname when not in multi-server. Should prevent problems with reverse proxies 2019-09-15 17:54:23 -04:00
Isaac Connor c0ae7820bb add zmeventnotification to Server object 2019-02-27 09:28:36 -05:00
Isaac Connor 8dd8888975
Php namespace (#2537)
* experiment with namespaces on the Server class

* experiment with namespaces on the Server class

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00
Matthew Noorenberghe a97711de89 Replace or sanitize remaining uses of PHP_SELF. Fixes #2446 2019-02-09 22:12:36 -08:00
Isaac Connor eee1d871e0 get rid of default value for PathToIndex so that it will use PHP_SELF instead 2019-01-16 12:09:26 -05:00
Isaac Connor 3182d8bab7 implement to_json method so that defaults get included 2019-01-15 11:36:56 -05:00
Mike Rosack 567b60ffa7 support for forwarded proto/port in Server.php (#2343) 2018-12-13 10:24:32 -05:00
Isaac Connor a1141d2dc4 remove second use of HTTP_HOST and use a better method of stripping off port from HTTP_HOST 2018-12-07 08:39:23 -05:00
Isaac Connor 757e538550 strip port from HTTP_HOST 2018-12-06 17:12:03 -05:00
Andrew Bauer cae6ffd5a3 use HTTP_HOST instead of SERVER_NAME 2018-12-01 13:27:08 -06:00
Isaac Connor 8c626c984b Need to pass port through all Url functions 2018-11-30 14:45:58 -05:00
Isaac Connor 3bd5774ea1 Default to PathToIndex should have the index.php in it 2018-11-29 15:53:19 -05:00
Isaac Connor 1c17f334d3 fix missing bits. Implement UrlToIndex in Monitor and fix use of Url(). Implement PathToApi as well 2018-11-29 14:26:30 -05:00
Isaac Connor f8b2ff5c77 rework from Url() to PathToIndex(), PathToZMS(), UrlToIndex() and UrlToZMS() 2018-11-27 17:35:25 -05:00
Isaac Connor c5f7fb7b18 Merge branch 'master' into server_path_prefix 2018-11-22 10:04:33 -05:00
Isaac Connor f9b1453705 Include SERVER_PORT when not doing multi-server or multi-port but are running on a port other than 80. 2018-10-19 10:59:16 -04:00
Isaac Connor 52b1439d51 fix the lack of /zm/index.php in url in Server->Url() and multiport 2018-10-08 09:55:47 -04:00
Isaac Connor 1eb8e9ed9e Include PHP_SELF in url to Server. This will assume that all servers in a multi-server setup use the same path 2018-10-08 09:45:03 -04:00
Isaac Connor b0c555599c Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209 2018-09-15 09:42:59 -04:00
Isaac Connor b4f80fbe11 Always return an array from find 2018-09-09 13:56:29 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor 3ecf0055b5 spacing 2018-07-09 13:07:16 -04:00
Isaac Connor 62f45b430e Add PathPrefix and use it in Url. Make Url() smarter so it can do more of the heavy lifting. 2018-07-09 12:09:57 -04:00
Isaac Connor 9fa28106e5 return proper hostname when not using multiple servers 2018-02-12 14:44:58 -05:00
Isaac Connor 1fbb5bc0f8 Fix zmaudit.pl => zmaudit, etc. 2018-01-17 14:22:04 -05:00
Isaac Connor 9284e26512 get rid of the snapshot setting. If we aren't storing all frames, then we should always store the snapshot. 2018-01-13 15:15:14 -05:00
Isaac Connor 821f9f8e6e Merge branch 'fix_sql_injection' into storageareas 2016-12-08 15:58:10 -05:00
Isaac Connor b5e4c94682 test for integer string as well 2016-12-08 15:58:00 -05:00
Isaac Connor ced701f56f Merge branch 'fix_sql_injection' into storageareas 2016-12-08 14:58:50 -05:00