json api plugin error in wordpress - php

I'm using json api plugin to fetch data as json records in my wo site.
Now when I run my site in local host it runs without any problem.
but when I upload my site to the host when I run my site to get json data I face with this error
Something went wrong fetching URL with JSON-data: Failed to connect to localhost port 88: Connection refusederror: get of json-data failed - plugin aborted: check url of json-feed

Related

How to ignore woocommerce_product_image_upload_error over REST API

I need to re-create a shop and need to do this parallel to the current online shop. I create a new server but didnt point the dns record for the domain to the new server. I create a entry in my and the server hosts file pointing to the new servers ip address.
I also configured the ssl connection with a selfsigned certificate.
Now I want to upload the products over the WooCommerce API but get an error:
{
"code": "woocommerce_product_image_upload_error",
"message": "Error retrieving the external image https://example.com/wp-content/uploads/2023/02/product_76548_1.jpg. Fehler: cURL error 35: error:0200100D:system library:fopen:Permission denied",
"data": {
"status": 400
}
}
I already changed the php configuration and add
curl.cainfo="/tmp/CA.pem"
openssl.cafile="/tmp/CA.pem"
All images are uploaded to the server and I can open the link and get the image. I also can open the link over the cli on the server with curl and get a 200 response.
I need to ignore this error and configure the products with the images.
Is that possible or do I need to take down the shop and do the stuff?

PhpStorm - How to create connection with remote database is located on the PhpMyAdmin server

I'm a new user of PhpStorm and I'm trying to create a connection to my remote database is located on the PhpMyAdmin server.
When I configure the "Data Sources and Drivers" window in PhpStorm with the following information:
Name: "Login"
User: ***** (User for cPanel)
Password: ***** (Password for cPanel)
URL: jdbc:mysql://sharedserver15.host-stage-dns.com:2083/cpsess1657590563/3rdparty/phpMyAdmin/db_structure.php?server=1&db=zkorwzjc_multi_login
I get an error:
[08S01] Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
java.io.EOFException: Can not read the response from the server. Expected to read 5,526,600 bytes, read 962 bytes before connection was unexpectedly lost.
I think the URL to the database is incorrect but I don't know what should I supply for the URL. The credentials are to the cPanel and not to the database, maybe this is the issue?
I would like to get some help.

Volley is unable to cinnect with server

I'm trying to connect my Android app to a database,
I tried to connect it the localhost and everything went okay,
but when I tried to connect it with a PHP file on server it showed me a volley error
I think there's a problem in the URL but I don't know what it should be!
This worked well
String URL = "http:/10.0.2.2//ServerConnect/GetIformation.php"
But this didn't work
String URL = "http://raghad.hostkda.com/phptest.php";
The text in link you provided is not a valid JSON.
Remove http: //raghad.hostkda.com/phptest.php from the end of the file.

After Drupal site migration login stopped working

I migrated a Drupal 7 site. After successfully migrating the login stopped working. I believe the previous owners used ajax for login. The site works fine but I keep getting an ajax error when trying to login.
Ajax error
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText: SMTP Error: Could not connect to SMTP host.
[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"sparkly","theme_token":"bzLLfcRfRiocJx3GDZ0v8146Ktfuo0YMfghj8B5678","js":{"sites\/all\/modules\/ctools\/js\/ajax-responder.js":1}},"better_exposed_filters":{"datepicker":false,"slider":false,"settings":[]},"chosen":{"selector":"","minimum_single":25,"minimum_multiple":25,"minimum_width":800,"options":{"disable_search":false,"disable_search_threshold":1,"search_contains":false,"placeholder_text_multiple":"Choose some options","placeholder_text_single":"Choose an option","no_results_text":"No results match","inherit_select_classes":true}},"urlIsAjaxTrusted":{"\/browse":true},"jquery_ajax_load":{"trigger":".jquery_ajax_load\r","target":"#jquery_ajax_load","toggle":1,"animation":0,"base_path":"\/","module_path":"sites\/all\/..."validateOnSubmit":"1","showMessages":"0","errorElement":"span"},"rules":{"name":{"required":true,"messages":{"required":"Username or e-mail address field is required.","maxlength":"Username or e-mail address field has to have maximum 254 values."},"maxlength":254}}}},"general":{"usexregxp":0,"months":{"January":1,"Jan":1,"February":2,"Feb":2,"March":3,"Mar":3,"April":4,"Apr":4,"May":5,"June":6,"Jun":6,"July":7,"Jul":7,"August":8,"Aug":8,"September":9,"Sep":9,"October":10,"Oct":10,"November":11,"Nov":11,"December":12,"Dec":12}},"groups":{"user-pass":{}}}},"merge":true},{"command":"insert","method":"prepend","selector":"head","data":"\u003Cscript…
Any idea how to fix this?
Drush also keeps giving me this error:
"Drush command terminated abnormally due to an unrecoverable error."

PHP error doing file_get_contents on a Hostinger host: failed to open stream

I'm trying to use the http://ip-api.com/json/ api for get and show the information of a visitant that conects to my website on hostinguer.com.
When I do the next, it should responds me with a json with all the info in a json format:
echo file_get_contents("http://ip-api.com/json/{$user_ip}");
But I get the following error message:
Warning: file_get_contents(http://ip-api.com/json/[MY PUBLIC IP]): failed to open stream: Connection refused in /home/[HOSTINGUER USER]/public_html/ip2.php on line 31
And other strange thing: if I use another API it works correctly and returns me the correct Json! The other API command:
echo file_get_contents("http://ipinfo.io/{$user_ip}/json");
So, I want to use the ip-api.com API cause the results are more accurate, but only works if I use ipinfo.io API... Why can I do the petition to a website and not to the other?
Otherwhise, I tried both in local using curl or writting in my webrowser and it works correctly. Also I tried in local in a Lammp and the both works perfectly. And finally I tried somthing like this post: PHP file_get_contents() returns "failed to open stream: HTTP request failed!" in hostinguer and it doesn't works..
I thought maybe is something in the hostinguer configuration but...
Thanks in advance!
Your IP address is banned. If you're using normal web hosting, your outgoing IP address is shared with other users, who probably did more requests than allowed.
Go to http://ip-api.com/docs/unban and enter your server's outgoing IP address (check it via http://ipinfo.io/json)

Categories