Category: Web Application Development

  • Post Views: 11 1. Based onhttps://github.com/Filsh/yii2-oauth2-server实现; Run: php composer.phar require –prefer-dist filsh/yii2-oauth2-server “*” 2. Configure in the application: E:\wwwroot\api.hmwis.com\passport\config\main.php Modules=>[ oauth2=> [ class=>FILSH\Yii2\OAuth2Server\Module, tokenparamname=>accessToken, TokenAccessLifeTime=> 3600 * 24, StorageMap=> [ user_credentials=>common\models\user, ]#ATFP_CLOSE_Translate_span#, GrantTypes=>[ user_credentials=> [ class=>oauth2\grantType\usercredentials, ]#ATFP_CLOSE_Translate_span#, refresh_token=>[ class=>oauth2\grantType\refreshtoken, Always_issue_new_refresh_token=> true ]#ATFP_CLOSE_Translate_span# ] ], v1=>[ class=>passport\modules\v1\module, ]#ATFP_CLOSE_Translate_span#, ], 3. Edit the user model class User.php: E:\wwwroot\api.hmwis.com\common\models\user.php Implement the interface\OAuth2\Storage\UserCredentialsInterface Class…

  • Post Views: 12 1. The address of the REST API application with OAuth2 Server on Yii2:https://github.com/ikaras/yii2-oauth2-rest-template 2. Run the command: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0 \ Error: 3. Modify the file: \yii2-oauth2-rest-template\vendor\filsh\yii2-oaut h2-server\migrations\m140501_075311_add_oauth2_server.php 4. Run the command again: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0\ , normal operation:

  • Post Views: 5 1. Open the URL,http://www.yiiframework.com/download/,根据提示执行升级: 2. Execute the command: php composer.phar require yiisoft/yii2 2.0.6, report an error: [UnexpectedValueException] Could not parse version Constraint <=2.*: Invalid version string “2.*” 3. Execute commands one after another: composer self-update, composer global update; 4. Execute the command again: composer global update; 5. Execute the command again: php composer.phar require yiisoft/yii2 2.0.6, the…

  • Post Views: 13 1. The $QUERY code implements screenshots: 2. Error: sqlstate[HY093]: Invalid parameter number: number of bound variables not match number of tokens\nthe sql being executed was 3. After the $query is modified, the screenshot is realized, and the $query->addParams is cancelled: 4. $Query is successfully implemented

  • Post Views: 11 1. Screenshot of the code that can be verified successfully under Windows 8.1: 2. When the RESTClient test under FIFEFOX of CentOS, the verification fails: 3. Analyze the code and find that the loading intl extension failed: 4. Run the command on CentOS: yum install php-intl to install the intl extension: 5. The intl installation is successful,…

  • Post Views: 14 1. Create a token on github; 2. The prompt creation is successful (all check boxes are selected), you need to save it to the local, and use it during installation; 3. During the installation command, you need to enter the token just generated; 4, :  

  • Post Views: 12 Because passport.xxx.com and soft.xxx.com are two secondary subdomains of xxx.com, in the case of both processing exit status, the Send a synchronization login notification through ucenter to realize login, but in many cases, passport.xxx.com and soft.xxx.com may One is the login status, the other is the logout state; at this time, you need to realize the synchronization…

  • Post Views: 10 Because the session has been automatically started, the session initialization setting has not been implemented; resulting in ini_set(session.gc_maxlifetime,   $name[‘expire’]);ini_set(session.cookie_lifetime,  $name[‘expire’]), and none of them can be set, so the session can basically be determined to be temporarily unresolved; It has to start from the cookie aspect, although there are certain security problems, so it is necessary to…

  • Post Views: 14 Solution process: Add the following method to phpsso_server/api/uc.php class uc_note: //update client cache function updateClient($get, $post) { if(!api_updateClient) { return api_return_forbidden; } $cacheFile = dirname(__file__)./uc_client/data/cache/settings.php; $fp = fopen($cachefile,w); $s = “<?php\r\n”; $s .=$_cache[\’settings\’]=.var_export($post, true).”;\r\n”; fwrite($fp, $s); fclose($fp); return api_return_succeed; } Check the PHPSSO_SERVER\API\UC_Client\Data\Cache\Settings.php file and find that the update has been successful:

  • Post Views: 10 The screenshot of the avatar cannot be displayed, on the active user page,http://zhidao.hmwis.com/user/activelist.html: Solution: lib/global.func.php function get_avatar_dir //return $setting[‘ucenter_url’]./avatar.php?uid=. $UID .&size=middle; @Include TiPask_root ./data/ucconfig.inc.php; return UC_API ./avatar.php?uid=. $UID .&size=middle; The reason is: $setting[‘ucenter_url’]Empty! After solving, the screenshot is as follows:    

👨‍💻 Personal Brand

Wang Shiqiang | PHP & Go Technical Consultant

15+ years of backend development experience specializing in system maintenance, architecture optimization, performance tuning, and Linux administration.

Technical blogger since 2013 with 1,000+ original articles.

Available for consulting, long-term maintenance, and remote collaboration.

👉 About Me & Contact

.env (14) 404 (13) add (17) Aliyun (19) Apache (13) Array (19) browser (14) Cache (13) CentOS (23) chrome (18) Client (11) command line (13) composer (42) composer.json (22) composer install (13) composer update (14) console (14) Container (25) curl (15) Database (11) database migration (16) delete (32) Docker (31) Dockerfile (15) ECS (12) environment variable (20) error (24) escape (12) Failed (13) file (16) filter (20) fopen (11) FORMAT (12) function (13) Git (27) GitHub (16) Gitlab (15) Go (34) Go 1.26 (12) GraphQL (24) GraphQL API (14) hosts (11) http (21) https (20) Installation (13) Interface (19) Jenkins (12) Jquery (13) json (24) Laravel (36) Laravel 6 (56) Laravel 9 (25) Lighthouse (17) Lighthouse 5 (14) Linux (15) Memory (11) Migrate (13) Migration (11) Module (17) MySQL (76) MySQL 5.7 (21) Nginx (45) Node.js (12) normalize.css (29) OKX (15) PHP (63) php.ini (24) PHP 7.1.12 (22) PHP 7.4 (26) phpmyadmin (15) PhpStorm (24) Polylang (24) postman (18) Query (17) queue (16) Rancher (24) Redis (38) Refactoring (12) require (12) response (13) RESTful (27) RESTful API (23) rules (12) setting (12) Shell (13) Shopify (19) Shopify CLI (12) SQL (24) String (15) TortoiseGit (15) Ubuntu (35) update (20) VPN (13) Windows 10 (46) WireGuard (22) WordPress (48) Wstunnel (11) Yii (40) Yii 2 (70) Yii 2.0 (51)

June 2026
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930