Archive for May, 2013

Hello All,

 

How to increase size of import file in phpmyadmin?

You need to change some settings value in php.ini file.

C:\wamp\bin\apache\apache2.2.8\bin\php.ini
Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to:
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

Then restart wamp for effect.

 

Thanks,

Bijal Bhavsar 🙂

Advertisements

Hello Everyone,

 

After a long search i found solution to validate php tags using javascript from input values in magento.

 

I have modified magento/js/prototype/validation.js file and added new class to validate php tags:

You can review below code inside ‘Validation.addAllThese’ array  to add new class to validate php tags.


['validate-no-php-tags', 'PHP tags are not allowed', function(v) {

return  !/<\?[=|?php]?[\s\S]*?\?>/.test(v) && !/<\?[=|php]?[\s\S]*?/.test(v) && !/\?[\s\S]*?/.test(v) ;

}],

you can use ‘validate-no-php-tags’  css class in input tag in magento.

Above validation will validate tags like ‘<?php’, ‘<?’, ‘?>’, ‘<?php ?>’, ‘<? ?>’.

I hope above solution works like  charm.

 

Thanks,

Bijal Bhavsar