Strict Standards: Non-static method Configure::getInstance() should not be called statically in

Server problem :
Strict Standards: Redefining already defined constructor for class Object in C:\xampp\htdocs\project\cake\libs\object.php on line 57
Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\xampp\htdocs\project\cake\bootstrap.php on line 42

 

Solutions :

Please go to the cakephp project directory , then go cake folder and you will see bootstrap.php file

location : yourprojects/cake/bootstrap.php

Find the below statement :
error_reporting(E_ALL & ~E_DEPRECATED);

Replace with below satement :

error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);

 

Problem solved : yes !!!!!

 

Categories: Cakephp, Server Tags:

Strict Standards: Redefining already defined constructor for class Object in cakephp

Server problem :
Strict Standards: Redefining already defined constructor for class Object in C:\xampp\htdocs\project\cake\libs\object.php on line 57
Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\xampp\htdocs\project\cake\bootstrap.php on line 42

 

Solutions :

Please go to the cakephp project directory , then go cake folder and you will see bootstrap.php file

location : yourprojects/cake/bootstrap.php

Find the below statement :
error_reporting(E_ALL & ~E_DEPRECATED);

Replace with below satement :

error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);

 

Problem solved : yes !!!!!

 

 

Categories: Cakephp, Server Tags:

PHP Remove Duplicate Array Values From Multidimentional Array

August 27, 2012 Leave a comment

    PHP Remove Duplicate Array Values From Multidimentional Array

$inputArray =

Array
(
[0] => Array
(
[0] => 1
[1] => 3
[2] => 6
)

[1] => Array
(
[0] => 2
[1] => 5
)

[2] => Array
(
[0] => 1
[1] => 3
[2] => 6
)

[3] => Array
(
[0] => 2
[1] => 5
)

[4] => Array
(
[0] => 1
[1] => 3
[2] => 6
)

)

$input = array_map(“unserialize”, array_unique(array_map(“serialize”, $inputArray)));

/******** Output *************/

Array
(
[0] => Array
(
[0] => 1
[1] => 3
[2] => 6
)

[1] => Array
(
[0] => 2
[1] => 5
)

)

/*********************** end make unique array *********************/

Categories: PHP Tags: ,

DOM PDF Integration in cakephp (Simple Example- pdf save into server app/webroot)

August 26, 2012 Leave a comment

DOM PDF INTEGRATION IN CAKEPHP

Step 1 : Download Dompdf lib from dompdf site,

Step 2 : Dompdf lib put into cakephp app/vendors directory

Step 3 : Create your function into your controller for run dompdf.

 

function example()

{

 

App::import(‘Vendor’, ‘dompdf’, array(‘file’ => ‘dompdf’ . DS . ‘dompdf_config.inc.php’));

$html =
‘<html><body>’.
‘<p>Put your html here, or generate it with your favourite ‘.
‘templating system.</p>’.
‘</body></html>’;

$this->dompdf = new DOMPDF();
$papersize = “legal”;
$orientation = ‘landscape’;
$this->dompdf->load_html($html);
$this->dompdf->set_paper($papersize, $orientation);
$this->dompdf->render();

$output = $this->dompdf->output();
file_put_contents(‘Brochure.pdf’, $output);

 

}

Categories: DOMPDF

How to resovle Cakephp Missing Database Table error

November 20, 2011 1 comment

1.Customize the error message

Missing Database Table

Error: Database table pages for model Page was not found.

Notice: If you want to customize this error message, create app/views/
errors/missing_table.ctp

 

2. Sometime if you encounter “Missing Database Table” from CakePHP errors, it might not really be due to missing of some database tables.

What you need to do is simple. Clear the cache folders found in CakePHP. The directory should be /app/tmp/cache.

Clear (delete) all files found in these 3 folders:
– models
– persistent
– views

By right, we should only clear the files in models folder. Just to be on the safe side, I strongly recommend clearing all these 3 folders.

Categories: Cakephp Tags:

Ajax Form Post with Cakephp

November 14, 2011 1 comment

Html Form

<form id=’ajaxPostForm’>

User Name :<input type=’text’ name=’user_name’>

Email : <input type=’text’ name=’user_email’>

Comments : <input type=’text’ name=’comments’>

<input value=”Save” type=”button” onclick=”save();”>

</form>

Javascript Code:

function save()
{

var base=$(“#ajaxPostForm”);

var params=base.serialize();

$.ajax({
type: “GET”,
url: ‘<?php echo FULL_BASE_URL.$this->webroot.’users/data_save’; ?>’,
data: params,
success: function(msg){

}
});

}

Cakephp Code:
<?php

class UsersController extends AppController
{

var $name = ‘Users’;

function data_save()
{
$userName = $this->params[‘url’][‘user_name’];
$userEmail = $this->params[‘url’][‘user_email’];
$userComments = $this->params[‘url’][‘comments’];

$this->data[‘User’][‘user_name’] = $userName;

$this->data[‘User’][‘user_email’] = $userEmail;

$this->data[‘User’][‘comments’] = $userComments;

$this->User->save($this->data, false);

}

}

?>

Categories: AJAX Tags:

PayPal Pro for Joomla Virtuemart

September 21, 2011 Leave a comment

PayPal Pro for Virtuemart

PayPal Pro is an express Direct payment system offered by PayPal for US, UK and Canada. It helps you to process direct credit cards, instead of taking you to the PayPal website for the payments. Its very handy for those who needs direct credit card payment processors on their website.
The primary difference between PayPal and PayPal Pro is that with PayPal, the user has to get redirected to the PayPal website to make the payment and they need to have a valid PayPal account, while with PayPal Pro, you dont get to the PayPal website at any step and you can directly enter your credit card info into the form and the payment gets automatically processed in the background via PayPal.
Sounds good ? Yes, because credit card payments sum up to 79 billion dollars via PayPal every year! And it also enhances the customer shopping experience on your online store, adding the reputation.

Categories: Payment
Follow

Get every new post delivered to your Inbox.