Connection refused on $currentUser->fetch()
还没有人认领这个 Issue。
评估
调研方向
Start with the failing call in update_user.php and trace it through ParseObject.php:540 to ParseClient.php:584. Reproduce the fetch(true) path using the provided Parse PHP SDK 1.5 configuration and inspect the request endpoint and connection error. Done means determining whether the refusal is SDK behavior or an unreachable configured server, with a reproducible finding or narrowly scoped fix identified.
由索引模型根据 Issue 内容生成。
描述
Issue Description
i'm updating user informations using Parse PHP SDK the connection is 100% correct and established, i'm able to update other classes and everything fine, the problem is, when trying to update the user informations if there is error i'm doing $currentUser->fetch() which will get the current user informations without updating them incase there is error occur, and it throw the error below.
NOTE: The IP address in here is just dummy i didn't share the real one with this question.
Steps to reproduce
<?php
require 'vendor/autoload.php';
use Parse\ParseObject;
use Parse\ParseQuery;
use Parse\ParseACL;
use Parse\ParsePush;
use Parse\ParseUser;
use Parse\ParseInstallation;
use Parse\ParseException;
use Parse\ParseAnalytics;
use Parse\ParseFile;
use Parse\ParseCloud;
use Parse\ParseClient;
use Parse\ParseSessionStorage;
//use Parse\ParseQuery;
session_start();
Parse\ParseClient::initialize( 'HostAppId', 'HostRest', 'HostAppMaster');
Parse\ParseClient::setServerURL('http://1.1.1.1:1337/parse','/host');
//Parse\ParseClient::setHttpClient(new Parse\ParseCurlHttpClient());
$currentUser = Parse\ParseUser::getCurrentUser();
$currentUser->set("email", $email);
$currentUser->set("name", $name);
$email = "[email protected]";
$name = "Name ";
try {
$currentUser->save();
echo "OK";
} catch (Parse\ParseException $er) {
$ex = $er->getMessage();
echo $ex;
$currentUser->fetch(true);
}`
### Environment Details
- Your PHP Version: **7.0.31**
- Your Parse PHP SDK Version: **1.5.***
- Your Operating System: **onCatalina v 10.15.1**
### Logs/Traces
`Account already exists for this email address.<br /> <b>Fatal error</b>: Uncaught
Parse\ParseException: Failed to connect to 1.1.1.1 port 1337: Connection refused in
/Users/yousefalsbaihi/Desktop/HOST/vendor/parse/php-sdk/src/Parse/ParseClient.php:584 Stack
trace: #0 /Users/yousefalsbaihi/Desktop/HOST/vendor/parse/php-sdk/src/Parse/ParseObject.php(540):
Parse\ParseClient::_request('GET', 'classes/_User/e...', 'r:6347ca34fba62...', NULL, true) #1
/Users/yousefalsbaihi/Desktop/HOST/functions/update_user.php(35): Parse\ParseObject-
>fetch(true) #2 {main} thrown in <b>/Users/yousefalsbaihi/Desktop/HOST/vendor/parse/php-
sdk/src/Parse/ParseClient.php</b> on line <b>584</b><br />`
```
- 主要语言
- PHP
- 星标
- 808
- 派生
- 340
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
parse-community/parse-php-sdk 的其他 Issue
-
Support PHP 8.4 and 8.5可能已有人在做 @zeliard91 于 24 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 72/100
parse-community/parse-php-sdk#529 · 1 条评论 ·
-
Queries on array values broken since 2.3.1可能已有人在做 @gut-puncture 于 152 天前认领。 未关闭bounty:$20 type:bug
难度 3/5 1-2 天 新手友好度 48/100
parse-community/parse-php-sdk#516 · 5 条评论 · 1 个 reaction ·
-
"unauthorized: master key is required" error on aggregate ParseQuery despite the master key is set未关闭
难度 3/5 1-2 天 新手友好度 35/100
parse-community/parse-php-sdk#466 ·
-
难度 4/5 3-5 天 新手友好度 25/100
parse-community/parse-php-sdk#465 ·
-
难度 3/5 1-2 天 新手友好度 25/100
parse-community/parse-php-sdk#456 · 1 条评论 ·
查看 parse-community/parse-php-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
codeigniter4/CodeIgniter4#10616 ·
维护者通常 1 天内回复
-
bug code quality
难度 2/5 1-3 小时 新手友好度 72/100
SemanticMediaWiki/SemanticMediaWiki#7149 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 65/100
google/site-kit-wp#13825 ·
维护者通常 3 天内回复
-
Made by AI module: MCP type: bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复