Skip to content

Instantly share code, notes, and snippets.

Avatar

Luboš Remplík LubosRemplik

View GitHub Profile
View gist:9738452
2014-03-24 12:11:34 Warning: Warning (2): finfo_open() [<a href='function.finfo-open'>function.finfo-open</a>]: Failed to load magic database at '/usr/share/misc/magic'. in [/var/www/vhosts/photographyresearchcentre.co.uk/httpdocs/02/cake/lib/Cake/Utility/File.php, line 560]
Trace:
finfo_open - [internal], line ??
File::mime() - CORE/Cake/Utility/File.php, line 560
File::info() - CORE/Cake/Utility/File.php, line 316
File::ext() - CORE/Cake/Utility/File.php, line 329
CakeResponse::file() - CORE/Cake/Network/CakeResponse.php, line 1236
MediaView::render() - CORE/Cake/View/MediaView.php, line 93
Controller::render() - CORE/Cake/Controller/Controller.php, line 948
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 194
View gist:2894500
32 $timeout = 5000;
33 $this->Js->get('#nav-hero input');
34 $this->Js->event(
35 'change',
36 $this->Js->request(
37 array('action' => 'contentItem'),
38 array(
39 'update' => '#main .hero',
40 'dataExpression' => 'javascript',
41 'data' => '$(this).val()',
View gist:3168706
Warning Error: file_get_contents(http://example.com/sitemap.xml): failed to open stream: Connection refused in [.../cake/lib/Cake/Utility/Xml.php, line 101]
2012-07-24 07:59:42 Warning: file_get_contents(http://example.com/sitemap.xml): failed to open stream: Connection refused in [.../cake/lib/Cake/Utility/Xml.php, line 101]
Error: String could not be parsed as XML
View gist:3170108
-bash-4.1$ curl -v localhost
* getaddrinfo(3) failed for localhost:80
* Couldn't resolve host 'localhost'
* Closing connection #0
curl: (6) Couldn't resolve host 'localhost'
View gist:3170037
-bash-4.1$ curl -v http://preview.metaldeseda.com/sitemap.xml
* About to connect() to preview.metaldeseda.com port 80 (#0)
* Trying 159.253.214.100... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
View gist:3170278
It is not about sitemap.xml and it is not about PHP, using curl to show you there is something wrong with server (some firewall, security issue).
I am sshed into 159.253.214.100 server and doing
curl -v metaldeseda.com connection refused
curl -v vmrates.co.uk connection refused
curl -v google.com works fine!!!
I am sshed to local server (or oi-dev).
curl -v metaldeseda.com works fine!!
curl -v vmrates.co.uk works fine!!
View gist:3176160
if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
}
View gist:3272058
'titleTranslation' => array(
(int) 0 => array(
'id' => '1',
'locale' => 'eng',
'model' => 'Category',
'foreign_key' => '2',
'field' => 'title',
'content' => 'English text'
),
(int) 1 => array(
View gist:3511858
public $hasAndBelongsToMany = array(
'ColorWheel' => array(
'className' => 'Color'
),
'ColorWheelRange' => array(
'className' => 'Color'
)
);
colors_wheels, colors_wheel_ranges
View gist:3511899
'ColorWheel' => array(
'ColorWheel' => array(
(int) 0 => '1',
(int) 1 => '34'
)
),
'ColorWheelRange' => array(
'ColorWheelRange' => array(
(int) 0 => '1',
(int) 1 => '2'
You can’t perform that action at this time.