Warning (2): file_get_contents(http://www.geoplugin.net/php.gp?ip=18.219.151.249): failed to open stream: HTTP request failed! HTTP/1.1 429 Too Many Requests
[APP/Controller/Component/GeoIpComponent.php, line 22]Code Context
function geoplugin_lookup($ip){
$geoplugin = unserialize( file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip) );
$ip = '18.219.151.249'
$http_response_header = array(
(int) 0 => 'HTTP/1.1 429 Too Many Requests',
(int) 1 => 'cache-control: no-cache',
(int) 2 => 'content-type: application/json',
(int) 3 => 'connection: close'
)
file_get_contents - [internal], line ??
GeoIpComponent::geoplugin_lookup() - APP/Controller/Component/GeoIpComponent.php, line 22
AppController::set_ip_visitors() - APP/Controller/AppController.php, line 219
AppController::beforeFilter() - APP/Controller/AppController.php, line 80
JokesController::beforeFilter() - APP/Controller/JokesController.php, line 15
call_user_func - [internal], line ??
CakeEventManager::dispatch() - APP/Cake/Event/CakeEventManager.php, line 248
Controller::startupProcess() - APP/Cake/Controller/Controller.php, line 670
Dispatcher::_invoke() - APP/Cake/Routing/Dispatcher.php, line 184
Dispatcher::dispatch() - APP/Cake/Routing/Dispatcher.php, line 162
[main] - APP/webroot/index.php, line 112
Warning (2): file_get_contents(http://www.geoplugin.net/php.gp?ip=18.219.151.249) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 429 Too Many Requests
[APP/Controller/Component/GeoIpComponent.php, line 22]Code Context
function geoplugin_lookup($ip){
$geoplugin = unserialize( file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip) );
$ip = '18.219.151.249'
$http_response_header = array(
(int) 0 => 'HTTP/1.1 429 Too Many Requests',
(int) 1 => 'cache-control: no-cache',
(int) 2 => 'content-type: application/json',
(int) 3 => 'connection: close'
)
file_get_contents - [internal], line ??
GeoIpComponent::geoplugin_lookup() - APP/Controller/Component/GeoIpComponent.php, line 22
AppController::set_ip_visitors() - APP/Controller/AppController.php, line 219
AppController::beforeFilter() - APP/Controller/AppController.php, line 80
call_user_func - [internal], line ??
CakeEventManager::dispatch() - APP/Cake/Event/CakeEventManager.php, line 248
Controller::startupProcess() - APP/Cake/Controller/Controller.php, line 670
ExceptionRenderer::_getController() - APP/Cake/Error/ExceptionRenderer.php, line 157
ExceptionRenderer::__construct() - APP/Cake/Error/ExceptionRenderer.php, line 95
ErrorHandler::handleException() - APP/Cake/Error/ErrorHandler.php, line 122
[main] - [internal], line ??
Database Error
Error:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'code' cannot be null
SQL Query:
INSERT INTO `lohaa_db13`.`countries` (`code`, `country`) VALUES (NULL, NULL)
Notice:
If you want to customize this error message, create joketube/View/Errors/pdo_error.ctp
Stack Trace
- APP/Cake/Model/Datasource/DboSource.php line 460 → PDOStatement->execute(array)
try {
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
- APP/Cake/Model/Datasource/DboSource.php line 426 → DboSource->_execute(string, array)
$options += array('log' => $this->fullDebug);
$t = microtime(true);
$this->_result = $this->_execute($sql, $params);
'INSERT INTO `lohaa_db13`.`countries` (`code`, `country`) VALUES (NULL, NULL)'
array()
- APP/Cake/Model/Datasource/DboSource.php line 1004 → DboSource->execute(string)
'values' => implode(', ', $valueInsert)
);
if ($this->execute($this->renderStatement('create', $query))) {
if (empty($id)) {
'INSERT INTO `lohaa_db13`.`countries` (`code`, `country`) VALUES (NULL, NULL)'
- APP/Cake/Model/Model.php line 1744 → DboSource->create(Country, array, array)
}
}
if (!$db->create($this, $fields, $values)) {
$success = false;
object(Country) {
hasMany => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'countries'
id => false
data => array(
[maximum depth reached]
)
schemaName => 'lohaa_db13'
table => 'countries'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
tablePrefix => ''
plugin => null
name => 'Country'
alias => 'Country'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
belongsTo => array([maximum depth reached])
hasOne => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
actsAs => null
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => null
recursive => (int) 1
order => null
virtualFields => array([maximum depth reached])
__backAssociation => array([maximum depth reached])
__backInnerAssociation => array([maximum depth reached])
__backOriginalAssociation => array([maximum depth reached])
__backContainableAssociation => array([maximum depth reached])
findMethods => array(
[maximum depth reached]
)
IpVisitor => object(IpVisitor) {}
[protected] _schema => array(
[maximum depth reached]
)
[protected] _associationKeys => array(
[maximum depth reached]
)
[protected] _associations => array(
[maximum depth reached]
)
[protected] _insertID => null
[protected] _sourceConfigured => true
[protected] _eventManager => object(CakeEventManager) {}
[protected] _validator => object(ModelValidator) {}
}
array(
(int) 0 => 'code',
(int) 1 => 'country'
)
array(
(int) 0 => null,
(int) 1 => null
)
- APP/Controller/AppController.php line 240 → Model->save(array)
$data['country'] = $country_name;
$this->Country->create();
$this->Country->save($data);
array(
'code' => null,
'country' => null
)
- APP/Controller/AppController.php line 222 → AppController->get_country(null, null)
$ip_loc = $this->GeoIp->geoplugin_lookup($this->myIpAddress);
$data['ip_address'] = $this->myIpAddress;
$data['country_id'] = $this->get_country($ip_loc['geoplugin_countryCode'],$ip_loc['geoplugin_countryName']);
- APP/Controller/AppController.php line 80 → AppController->set_ip_visitors()
}
$this->myIpAddress = $this->GeoIp->findIp();
$this->set_ip_visitors();
- APP/Controller/JokesController.php line 15 → AppController->beforeFilter()
public function beforeFilter() {
parent::beforeFilter();
- [internal function] → JokesController->beforeFilter(CakeEvent)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(JokesController) {}
[protected] _stopped => false
}
- APP/Cake/Event/CakeEventManager.php line 248 → call_user_func(array, CakeEvent)
if ($listener['passParams'] === true) {
$result = call_user_func_array($listener['callable'], $event->data);
} else {
$result = call_user_func($listener['callable'], $event);
}
array(
(int) 0 => object(JokesController) {},
(int) 1 => 'beforeFilter'
)
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(JokesController) {}
[protected] _stopped => false
}
- APP/Cake/Controller/Controller.php line 670 → CakeEventManager->dispatch(CakeEvent)
* @return void
*/
public function startupProcess() {
$this->getEventManager()->dispatch(new CakeEvent('Controller.initialize', $this));
$this->getEventManager()->dispatch(new CakeEvent('Controller.startup', $this));
object(CakeEvent) {
data => null
result => null
[protected] _name => 'Controller.initialize'
[protected] _subject => object(JokesController) {}
[protected] _stopped => false
}
- APP/Cake/Routing/Dispatcher.php line 184 → Controller->startupProcess()
*/
protected function _invoke(Controller $controller, CakeRequest $request, CakeResponse $response) {
$controller->constructClasses();
$controller->startupProcess();
- APP/Cake/Routing/Dispatcher.php line 162 → Dispatcher->_invoke(JokesController, CakeRequest, CakeResponse)
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(JokesController) {
helpers => array(
[maximum depth reached]
)
components => array(
[maximum depth reached]
)
jokeType => 'text'
languageId => (int) 1
myIpAddress => '18.219.151.249'
myIpVisitorId => (int) 0
myDevice => (int) 1
sessionData => array(
[maximum depth reached]
)
name => 'Jokes'
uses => array(
[maximum depth reached]
)
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Jokes'
layoutPath => null
viewVars => array([maximum depth reached])
view => 'listing'
layout => 'default'
autoRender => true
autoLayout => true
Components => object(ComponentCollection) {}
viewClass => 'View'
View => null
ext => '.ctp'
plugin => null
cacheAction => false
passedArgs => array(
[maximum depth reached]
)
scaffold => false
methods => array(
[maximum depth reached]
)
modelClass => 'Joke'
modelKey => 'joke'
validationErrors => null
GeoIp => object(GeoIpComponent) {}
Cookie => object(CookieComponent) {}
Session => object(SessionComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
Emailer => object(EmailerComponent) {}
Auth => object(AuthComponent) {}
Upload => object(UploadComponent) {}
Elasticsearch => object(ElasticsearchComponent) {}
IpVisitor => object(IpVisitor) {}
Country => object(Country) {}
[protected] _responseClass => 'CakeResponse'
[protected] _mergeParent => 'AppController'
[protected] _eventManager => object(CakeEventManager) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array([maximum depth reached])
url => 'beliebteste-Apotheker-witze'
base => '/joketube'
webroot => '/joketube/'
here => '/joketube/beliebteste-Apotheker-witze'
[protected] _detectors => array(
[maximum depth reached]
)
[protected] _input => ''
}
object(CakeResponse) {
[protected] _statusCodes => array(
[maximum depth reached]
)
[protected] _mimeTypes => array(
[maximum depth reached]
)
[protected] _protocol => 'HTTP/1.1'
[protected] _status => (int) 200
[protected] _contentType => 'text/html'
[protected] _headers => array([maximum depth reached])
[protected] _body => null
[protected] _file => null
[protected] _fileRange => null
[protected] _charset => 'UTF-8'
[protected] _cacheDirectives => array([maximum depth reached])
[protected] _cookies => array([maximum depth reached])
}
- APP/webroot/index.php line 112 → Dispatcher->dispatch(CakeRequest, CakeResponse)
$Dispatcher->dispatch(
new CakeRequest(),
new CakeResponse()
);
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array([maximum depth reached])
url => 'beliebteste-Apotheker-witze'
base => '/joketube'
webroot => '/joketube/'
here => '/joketube/beliebteste-Apotheker-witze'
[protected] _detectors => array(
[maximum depth reached]
)
[protected] _input => ''
}
object(CakeResponse) {
[protected] _statusCodes => array(
[maximum depth reached]
)
[protected] _mimeTypes => array(
[maximum depth reached]
)
[protected] _protocol => 'HTTP/1.1'
[protected] _status => (int) 200
[protected] _contentType => 'text/html'
[protected] _headers => array([maximum depth reached])
[protected] _body => null
[protected] _file => null
[protected] _fileRange => null
[protected] _charset => 'UTF-8'
[protected] _cacheDirectives => array([maximum depth reached])
[protected] _cookies => array([maximum depth reached])
}