joomla 2.5.18
php -5.4.12
apache - 2.4.4
mysql - 5.6.12 ,
I am trying to post data on particular url and get the response, Here is my code
jimport('joomla.http');
$data = array('foo' => 'bar'); //sample data array
$transport = null;
$transportWrappers=array('JHttpTransportCurl','JHttpTransportStream','JHttpTransportSocket');
$moduleParams = new JRegistry();
while (!$transport && $transportWrappers)
try{
$wrapper = array_shift($transportWrappers);
$transport = new $wrapper($moduleParams);
}
catch (Exception $e){
continue;
}
$http = new JHttp($moduleParams, $transport);
$url = 'my_url';
$response = $http->post($url,$data);
print_r($response);
I have also checked other forums with same problem , they suggested to check #_update_sites table , my table is fine, no unknown data is there .
I am unable to figure out where is the problem.I tried the same code for different url.It worked.
I dont think there is problem in my url.
Here is my apache log error
[Wed Mar 26 13:50:51.154818 2014] [:error] [pid 4504:tid 1664] [client
::1:51174] PHP 13. JHttp->post()
C:\wamp\www\joomla\components\com_name\views\abc\tmpl\default.php:70
[Wed Mar 26 13:50:51.154818 2014] [:error] [pid 4504:tid 1664] [client
::1:51174] PHP 14. JHttpTransportCurl->request()
C:\wamp\www\joomla\libraries\joomla\http\http.php:122 [Wed Mar
26 13:50:51.154818 2014] [:error] [pid 4504:tid 1664] [client
::1:51174] PHP 15. JHttpTransportCurl->getResponse()
C:\wamp\www\joomla\libraries\joomla\http\transport\curl.php:134
Please help here.
[UPDATED]
It was the Wamp version problem , i tried the same codes in Xampp and it worked.
Introduction
The Web server (running the Web Site) encountered an unexpected condition that prevented it from fulfilling the request by the client (e.g. your Web browser or our CheckUpDown robot) for access to the requested URL.
This is a 'catch-all' error generated by the Web server. Basically something has gone wrong, but the server can not be more specific about the error condition in its response to the client. In addition to the 500 error notified back to the client, the Web server should generate some kind of internal error log which gives more details of what went wrong. It is up to the operators of the Web server site to locate and analyse these logs. (Last updated: October 2013)
Fixing 500 errors - general
This error can only be resolved by fixes to the Web server software. It is not a client-side problem. It is up to the operators of the Web server site to locate and analyse the logs which should give further information about the error.
Fixing 500 errors - CheckUpDown
Our service monitors your site for HTTP errors like 500. Please contact us (email preferred) whenever you encounter 500 errors on your CheckUpDown account. We then have to liaise with your ISP and the vendor of the Web server software so they can trace the exact reason for the error. Correcting the error may require recoding program logic for the Web server software, which could take some time.
Related
My Wordpress website was down due to a database connection error.
When I looked into the cPanel error log I saw around a 100 rows that looked like these:
[Tue Apr 02 06:24:11.179218 2019] [cgi:error] [pid 31625] [client
50.3.196.173:41576] AH01215: PHP Warning: Error while sending QUERY packet. PID=31986 in /home/admin/public_html/wp-includes/wp-db.php on
line 1924: /usr/local/cpanel/cgi-sys/ea-php71, referer:
http://www.worldtravelawards.com/profile-4544-the-monte-carlo-beach
[Tue Apr 02 06:24:11.176124 2019] [cgi:error] [pid 31617] [client
196.247.235.184:60968] AH01215: PHP Warning: Error while sending QUERY packet. PID=31998 in
/home/admin/public_html/wp-includes/wp-db.php on line 1924:
/usr/local/cpanel/cgi-sys/ea-php71, referer:
http://www.worldtravelawards.com/profile-3005-walt-disney-world-swan-and-dolphin-resort
The referer is an external domain that somehow is accessing my wp-db.php file, causing a PHP, database-related, error. I did some research and came across subjects like "Bandwidth theft" and "Database injection", but I couldn't really find a good answer to a similar situation.
Any ideas what it could be and how to prevent this from happening? Thanks in advance!
Referer does not mean anything.
A HTTP_REFERER is a header sent by a browser primarily used for analytics that shows where did the user come from. In this example, a user clicked on a link on http://www.worldtravelawards.com/profile-4544-the-monte-carlo-beach webpage that leads to your website. www.worldtravelawards.com is not their actual hostname.
See: [Error while sending QUERY packet
for info about the PHP error.
Post Scriptum: Avoid posting actual IP addresses of your clients or domains of your website because it may lead to hacking attempts.
I am newly using Google compute engine (GCP). I have a limited knowledge on programming yet i am hosting WordPress website in my server.
The problem is few days back my site got hacked or access by someone else. I received a message from GCE customer support that my account will be suspended if I don't stop using server for mining cryptocurrency. Now I have no idea what he was talking. Then I checked the files and can see lots of foreign files. He is apparently using my server to mine crypto, though nothing malicious or disruption of server..
As I have lots of edited and custom files and that I don't have backup files, my best option was to manually check and remove all those foreign files.. I have almost removed all the files but still there are files continously calling from somewhere else function or something that is tracing NOT FOUND error in error.log and access.log.. Looks like using cron jobs or something.. I have no idea where it's coming from.. I am just trying to find that file that is executing those functions.
error.log file:
[Tue Nov 13 15:03:34.595848 2018] [:error] [pid 31561] [client 66.249.66.150:47822] script '/var/www/example.com/tozeowi.php' not found or unable to $
[Tue Nov 13 15:05:56.744506 2018] [core:error] [pid 31587] [client 176.9.23.3:36328] AH00124: Request exceeded the limit of 10 internal redirects due to probable configurat$
Access.log file:
"GET /joapow1ok/tozeowi.php?serhtr=morgan-stanley-health-insurance-benefits'A=0 HTTP/1.1" 404 3621 "https://www.example.com/joapow1ok/tozeowi.php?"
If someone can help me find that file causing to execute that GET function.. Or is there any linux function to find figure out.
Note: I have disabled many plugins and my theme yet no luck.. I have 3 website in the same directory and all got infected.
I found the following error in the error log in the cpanel for my website. I have changed the name to meet the advertiser's TOS. Here is the error:
[Tue Nov 04 01:03:23 2014] [error] [client *ip address*] File does not exist: /home/food/public_html/index.php, referer: mywebsite.com/folder/content.html
I have built the site using HTML, and have not used PHP at all.
From my PC, I am able to access content.html.
When I contacted the tech support of my hosting service, they could not explain why there are errors in the error log and merely said it is a coding issue.
Please inform how to resolve the error and if I should be concerned, as I am not using a file called index.php (or any other PHP file in the site). Thanks for your help.
If I am interpreting this log correctly, this doesn't look like your hosting company is giving you the correct information.
By referer, I assume apache is indicating the URI which generated the request from your client's domain. Meaning that your client is trying to access /home/food/public_html/index.php on your domain. If it doesn't exist you need to have them correct their referring link/script.
I'm having an issue with a CURL reader I built (see: Premature end of script headers: php-cgi -- While running a CURL script)
The guy said to check if my problem server will speak to the feed, so I tested the below code locally and it works, tested in on the server and got an internal server error. I am lost here, how should I go about debug this as the host company are not being very helpful at all.
code:
$url = 'http://www.energydigger.com/feeds/headlines.xml';
list($status) = get_headers($url);
if (strpos($status, '200') !== FALSE) {
echo 'boom';
}
problem server response:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
all i am getting from the log they provide is:
[Wed Apr 24 20:36:01 2013] [warn] mod_fcgid: read data timeout in 60 seconds
[Wed Apr 24 20:36:01 2013] [error] [client 151.227.255.54] Premature end of script headers: php-cgi
Any advice is appreciated, as I'm a little stuck on what to do now.
Maybe I could reproduce it. But my environment uses mod_fcgid not simple cgi. Make sure the owner and group are the same as for the executing cgi user. Or for simplicity as all the other files in your webdirectory.
[Wed Dec 12 23:23:09 2012] [warn] [client 31.22.4.214] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Wed Dec 12 23:23:09 2012] [error] [client 31.22.4.214] Premature end of script headers: index.php
[Wed Dec 12 23:31:20 2012] [error] mod_fcgid: process /home/www-data/php5-fcgi(32763) exit(communication error), get unexpected signal 7
I get these errors every times in my APACHE logs. I am running a forum, and sometimes these errors get so severe, it returns a 500 error.
I am using APC, Debian OS, PHP5CGI, and MYSQL. Here is a list of the modules I am using on APACHE:
Link to image: i.stack.imgur(dot)com/bcrWn(dot)png
Could you please tell me what's wrong? Is this an APC issue?
I was getting the same random errors from three sites that were using APC extensively for both bytecode caching and other data using the W3 Total Cache plugin for Wordpress.
I disabled the APC caching on the sites, and the errors continued. Removing APC from the server, though, fixed it entirely. Since I researched this extensively and found almost no other incidences of "get unexpected signal 7" with PHP under mod_fcgid, I'm pretty confident that yes, your problem was probably caused by an APC issue.
I would imagine that you've already resolved your problem, since this question is over two months old, but hopefully this may help someone else who runs into the same error.
I was also seeing this error on a shared hosting environment using php-fcgi. APC is enabled but only being used on one site which wasn't generating the error.
It turned out the site with the error had exceeded their disk quota, something I discovered by accident when trying to update some files.
Increasing the disk quota for that site immediately resolved the issue.