I am using CodeIgniter framework and After testing in XAMPP, a normal error like "Missing argument" the php script stops and it shows me the PHP Warning page, however in the hosting server(e.g. GoDaddy) the php script takes a while to stop and it shows me the 500 error page, consequently the server has a new Entry Process.
Any idea? Thanks!
public function getAQByLocation($city) {
$this->load->helper('url');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://api.waqi.info/feed/$city/?
token=" . $this->AQ_API_KEY);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
echo $result;
}
This is the code, to simulate that error i just omitted the parameter $city, e.g. xxx.com/Home/getAQByLocation
the solution was to set the value
$config['log_threshold'] = 1;
in the config.php. Thank you every one!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments