{"id":1998,"date":"2026-07-18T06:38:06","date_gmt":"2026-07-18T13:38:06","guid":{"rendered":"http:\/\/macdaddy4sure.ai\/?p=1998"},"modified":"2026-07-18T06:38:06","modified_gmt":"2026-07-18T13:38:06","slug":"iis-and-php-website-integration","status":"publish","type":"post","link":"http:\/\/macdaddy4sure.ai\/index.php\/2026\/07\/18\/iis-and-php-website-integration\/","title":{"rendered":"IIS and PHP website integration"},"content":{"rendered":"\n<p>Documentation for the <strong>IIS + PHP<\/strong> brainstorm and the <strong>MVP implementation<\/strong> shipped in this chat.<\/p>\n\n\n\n<p>Related: BrainstormIntegrations.md (BrainstormIntegrations.md) \u00b7 PhpGraphs.md (PhpGraphs.md) \u00b7 ProgramStatePortal.md (ProgramStatePortal.md) \u00b7 DiscoveryWordPress.md (DiscoveryWordPress.md)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Goals<\/h2>\n\n\n\n<p>Treat <strong>IIS + PHP<\/strong> as the <strong>public\/edge web plane<\/strong>, while _AugmentedIntelligence remains the <strong>cognitive\/ops plane<\/strong>:<\/p>\n\n\n\n<p><em>[text]<br><\/em>[AI host: typed commands, discovery, agents, GEMM]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2502 REST \/ file export \/ dry-run ops<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u25bc<br>[IIS: sites, app pools, TLS, rewrite, FastCGI PHP]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2502<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u25bc<br>[PHP: program_web_portal, minecraft dashboard, WordPress, custom APIs]<\/p>\n\n\n\n<p>Three integration modes:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Mode<\/strong><\/td><td><strong>Direction<\/strong><\/td><td><strong>Status in MVP<\/strong><\/td><\/tr><tr><td><strong>A. Publish-out<\/strong><\/td><td>AI \u2192 PHP\/WP<\/td><td>Discovery\u2192WP; graph JSON deploy<\/td><\/tr><tr><td><strong>B. Ingest-in<\/strong><\/td><td>PHP \u2192 AI<\/td><td>Designed (signed webhooks); not fully live<\/td><\/tr><tr><td><strong>C. Ops-control<\/strong><\/td><td>AI \u2192 IIS<\/td><td>Read-only doctor\/list; recycle dry-run\/apply<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Implemented commands<\/h2>\n\n\n\n<p>All routed through _BrainstormIntegrations (also via integrate \u2026).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IIS<\/h3>\n\n\n\n<p><em>[text]<br><\/em>iis status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # list sites (PowerShell WebAdministration or appcmd)<br>iis doctor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # feature probe, php on PATH, appcmd presence<br>iis list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # alias of status<br>iis recycle &lt;pool&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # dry-run plan (default)<br>iis recycle &lt;pool&gt; apply&nbsp;&nbsp; # live appcmd recycle (gated)<\/p>\n\n\n\n<p>Defaults:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mutations require explicit <strong>`apply`<\/strong>.<\/li>\n\n\n\n<li>Safe default pool name if omitted in some forms: DefaultAppPool.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">PHP site<\/h3>\n\n\n\n<p><em>[text]<br><\/em>php site status<br>php site health&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # index.php \/ api.php \/ graphs_all.json presence<br>php site config root &lt;path&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # e.g. program_web_portal or IIS wwwroot<br>php site config url &lt;base_url&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # e.g. http:\/\/127.0.0.1:8090<br>php site deploy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # dry-run: would write graph JSON<br>php site deploy apply&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # write graphs_*.json under root\/data\/<\/p>\n\n\n\n<p>Default root if unset: program_web_portal.<\/p>\n\n\n\n<p>Default URL: http:\/\/127.0.0.1:8090.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Orchestration<\/h3>\n\n\n\n<p><em>[text]<br><\/em>integrate doctor&nbsp;&nbsp;&nbsp; # checklist spanning WP, discovery, portal, IIS, PHP, cutlass<br>integrate all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # seed discovery + portal export + graphs + cutlass check<br>integrate lua&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # runs lua_scripts\/Brainstorm-Integrations.lua<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lua API<\/h2>\n\n\n\n<p><em>[lua]<br><\/em>print(iis_status())<br>print(iis_doctor())<br>print(iis_recycle(&#8220;DefaultAppPool&#8221;, false))&nbsp; &#8212; dry-run<br>&#8212; iis_recycle(&#8220;DefaultAppPool&#8221;, true)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212; live; use carefully<br><br>php_site_config_root(&#8220;program_web_portal&#8221;)<br>php_site_config_url(&#8220;http:\/\/127.0.0.1:8090&#8221;)<br>print(php_site_health())<br>print(php_site_deploy(false))&nbsp; &#8212; dry-run<br>print(php_site_deploy(true))&nbsp;&nbsp; &#8212; write graph JSON<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture brainstorm (full vision)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 0\u20131 (partially done)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Document topology and dry-run rules<\/li>\n\n\n\n<li>iis doctor, iis site list, php site health<\/li>\n\n\n\n<li>Graph JSON deploy into PHP root<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 2 \u2014 Dual publish<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Discovery \u2192 WordPress <strong>and<\/strong> POST PHP \/api\/discovery (HMAC)<\/li>\n\n\n\n<li>Static HTML drop under IIS for offline<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 3 \u2014 ARR + auth<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reverse-proxy \/app \u2192 AI _WebServer dashboard port<\/li>\n\n\n\n<li>Windows\/AD auth on app path<\/li>\n\n\n\n<li>TLS termination at IIS<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 4 \u2014 Deploy + recycle (gated)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>iis deploy \/ package robocopy\/WebDeploy with dry-run + AD allowlist<\/li>\n\n\n\n<li>App pool recycle after deploy<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Phase 5 \u2014 Full portal<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Signed webhooks PHP \u2192 automation \/ discovery<\/li>\n\n\n\n<li>osTicket \/ MyBB loops<\/li>\n\n\n\n<li>Cache purge after publish<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What not to do<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do not expose unrestricted \u201crun any typed command\u201d on public PHP.<\/li>\n\n\n\n<li>Do not store WP app passwords in the PHP webroot.<\/li>\n\n\n\n<li>Do not mark discoveries posted on dry-run (already enforced).<\/li>\n\n\n\n<li>Prefer AI \u2192 signed push\/file drop over PHP shelling to the desktop agent.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress on IIS<\/h2>\n\n\n\n<p>WordPress may run on IIS with PHP FastCGI:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Configure AI: wordpress config site https:\/\/yoursite \u2026 enabled on<\/li>\n\n\n\n<li>Use <strong>Application Passwords<\/strong> over HTTPS only.<\/li>\n\n\n\n<li>Prefer draft until reviewed (discovery wp-status draft).<\/li>\n\n\n\n<li>Pretty permalinks need web.config URL rewrite rules (IIS-side).<\/li>\n\n\n\n<li>Optionally post to staging site\/app pool before production.<\/li>\n<\/ol>\n\n\n\n<p>Discovery publish details: DiscoveryWordPress.md (DiscoveryWordPress.md).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Existing PHP surfaces<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Path<\/strong><\/td><td><strong>Role<\/strong><\/td><\/tr><tr><td>program_web_portal\/<\/td><td>Whole-program + RL + <strong>Graphs<\/strong> UI<\/td><\/tr><tr><td>minecraft_web_dashboard\/<\/td><td>Spigot live charts<\/td><\/tr><tr><td>WordPress site (external)<\/td><td>Discovery posts via REST<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Minecraft PHP pattern (same idea as graph export):<\/p>\n\n\n\n<p><em>[text]<br><\/em>JSON file or HTTP API \u2192 PHP api.php \u2192 Chart.js<\/p>\n\n\n\n<p>See MinecraftWebDashboard.md (MinecraftWebDashboard.md).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Security checklist<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Item<\/strong><\/td><td><strong>Guidance<\/strong><\/td><\/tr><tr><td>IIS recycle<\/td><td>Dry-run default; apply only on trusted hosts<\/td><\/tr><tr><td>PHP deploy<\/td><td>Writes JSON only under configured root\/data<\/td><\/tr><tr><td>Portal HTTP<\/td><td>Bind LAN; read-only<\/td><\/tr><tr><td>Secrets<\/td><td>wordpress_app_password, FTP, future HMAC \u2014 AD slots \/ settings, not repo<\/td><\/tr><tr><td>Body\/safe profile<\/td><td>Compose with dry-run freezes on DCC; treat IIS apply as high risk<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Files<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>BrainstormIntegrations.hpp \/ .cpp<\/li>\n\n\n\n<li>program_web_portal\/*<\/li>\n\n\n\n<li>docs\/PhpGraphs.md<\/li>\n\n\n\n<li>docs\/BrainstormIntegrations.md<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Documentation for the IIS + PHP brainstorm and the MVP implementation shipped in this chat. Related: BrainstormIntegrations.md (BrainstormIntegrations.md) \u00b7 PhpGraphs.md (PhpGraphs.md) \u00b7 ProgramStatePortal.md (ProgramStatePortal.md) \u00b7 DiscoveryWordPress.md (DiscoveryWordPress.md) Goals Treat IIS + PHP as the public\/edge web plane, while _AugmentedIntelligence remains the cognitive\/ops plane: [text][AI host: typed commands, discovery, agents, GEMM]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2502 REST \/ file export [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1998","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/comments?post=1998"}],"version-history":[{"count":1,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1998\/revisions"}],"predecessor-version":[{"id":1999,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/posts\/1998\/revisions\/1999"}],"wp:attachment":[{"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/media?parent=1998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/categories?post=1998"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/macdaddy4sure.ai\/index.php\/wp-json\/wp\/v2\/tags?post=1998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}