Hi Guys have you ever find this issue like me, the exec command working normally in localhost but in server its not working (for sure exec already activated since its returning a results) and the weird part if i run the command in command line in webserver it works as expected
Here's the command that i run
curl 'https://republic.gg/site/nav-bar-login' \
-H 'Connection: keep-alive' \
-H 'Accept: */*' \
-H 'X-CSRF-Token: Znb-C1LpstugfYSM5r2RBZ9u9Fg0ATONOI8HraEDvmReRrw6Zrj6leQRvOez8tBH2jmZPHVZcr5040bZw0mIIw==' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36' \
-H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary19bus3HleA69SVsg' \
-H 'Origin: https://republic.gg' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://republic.gg/' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Cookie: _ga=GA1.2.142817176.1601263531; _fbp=fb.1.1601263531949.2074251348; _gid=GA1.2.1723790011.1606234432; _csrf-frontend=d8c63e2a5db674f9949c6a6e579181a69f990617b005b2646ea2ff28bf62d02ba%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%2280B14QHNDl8kUOABEWmdAXA3LlAtbJ6G%22%3B%7D; advanced-frontend=s2qmjf372875a7ievs4pumthdr' \
--data-binary $'------WebKitFormBoundary19bus3HleA69SVsg\r\nContent-Disposition: form-data; name="_csrf-frontend"\r\n\r\nbuwmDuZSuxVeyaMZr5Ptk8X7oaCkcHvETdvcDLqObo4YpwtIoiHcWCyHykrn_qDJi6rmzMYcHfF-4pVD6f8C9A==\r\n------WebKitFormBoundary19bus3HleA69SVsg\r\nContent-Disposition: form-data; name="LoginForm[username]"\r\n\r\n123123\r\n------WebKitFormBoundary19bus3HleA69SVsg\r\nContent-Disposition: form-data; name="LoginForm[password]"\r\n\r\n123123\r\n------WebKitFormBoundary19bus3HleA69SVsg--\r\n' \
--compressed -i
Results when im executing this from command line in webserver :
HTTP/1.1 200 OK
Date: Fri, 27 Nov 2020 01:34:45 GMT
Server: Apache/2.4.29 (Ubuntu)
X-Frame-Options: DENY
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Strict-Transport-Security: max-age=31536000;includeSubDomains;preload
Content-Length: 190
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json; charset=UTF-8
{"success":false,"data":{"status":false,"message":"Validation failed","error":{"username":["Incorrect mobile number or password."],"password":["Incorrect mobile number or password."]},"errorHtml":"<li>Incorrect mobile number or password.</li><li>Incorrect mobile number or password.</li>","dataLayer":{"label":"Incorrect mobile number or password. ,Incorrect mobile number or password.","msisdn":""},"totalAttempt":""}}
But simply when i run exec($str, $result) result only returning, results from webserver :
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 27 Nov 2020 01:37:47 GMT
[2] => Server: Apache/2.4.29 (Ubuntu)
[3] => X-Frame-Options: DENY
[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[5] => Cache-Control: no-store, no-cache, must-revalidate
[6] => Pragma: no-cache
[7] => X-Frame-Options: DENY
[8] => X-Content-Type-Options: nosniff
[9] => X-Xss-Protection: 1; mode=block
[10] => Strict-Transport-Security: max-age=31536000;includeSubDomains;preload
[11] => Vary: User-Agent
[12] => Content-Length: 0
[13] => Keep-Alive: timeout=5, max=100
[14] => Connection: Keep-Alive
[15] => Content-Type: text/html; charset=UTF-8
[16] =>
)
Results running in local :
Array
(
[0] => HTTP/1.1 200 OK
[1] => Date: Fri, 27 Nov 2020 01:40:43 GMT
[2] => Server: Apache/2.4.29 (Ubuntu)
[3] => X-Frame-Options: DENY
[4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[5] => Cache-Control: no-store, no-cache, must-revalidate
[6] => Pragma: no-cache
[7] => X-Frame-Options: DENY
[8] => X-Content-Type-Options: nosniff
[9] => X-Xss-Protection: 1; mode=block
[10] => Vary: Accept-Encoding,User-Agent
[11] => Content-Encoding: gzip
[12] => Strict-Transport-Security: max-age=31536000;includeSubDomains;preload
[13] => Content-Length: 190
[14] => Keep-Alive: timeout=5, max=100
[15] => Connection: Keep-Alive
[16] => Content-Type: application/json; charset=UTF-8
[17] =>
[18] => {"success":false,"data":{"status":false,"message":"Validation failed","error":{"username":["Incorrect mobile number or password."],"password":["Incorrect mobile number or password."]},"errorHtml":"<li>Incorrect mobile number or password.</li><li>Incorrect mobile number or password.</li>","dataLayer":{"label":"Incorrect mobile number or password. ,Incorrect mobile number or password.","msisdn":""},"totalAttempt":""}}
)
seems like theres no body response and i think some of the request just being change or else?
Appreciate if anyone can help bit clueless how to debug
Additional information webserver OS :
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Local :
macOS Catallina 10.15.5 using XAMPP