Simple Slide Show with jQuery
Tutorials, Chrome extensions Code samples JavaScript Angular CSS HTML. Updated regularly. Visit and subscribe to the rss feed.
Thursday, May 13, 2010
Php- File upload limit changing using htaccess/php.ini
FASTCGI / APACHE - Changing PHP File upload limit
Php default maximum upload limit is 8 MB. You can change the default settings by changing the server settings using .htaccess file or custom php5.ini file in the case of godaddy hosting.
First thing you have to find out is what your server API is?
print out php info of your hosted server.
See the Server API value.
If the Server API is apache You can do the following
1) Create a .htaccess file in the root folder of web server.
2) Put the following code in side the .htaccess file and save it.
This will work in godaddy hosting.
If your Server API is CGI/FASTCGI do the follwing .
create a php5.ini file and write in it
upload_max_filesize = 100M
post_max_size = 100M
output_buffering = on
max_execution_time = 1000
max_input_time = 1000
memory_limit = 64M
And upload it to your websites root folder.
Check the phpinfo and you can see the changes if it worked.Do not forget to put the file name php5.ini.
Php default maximum upload limit is 8 MB. You can change the default settings by changing the server settings using .htaccess file or custom php5.ini file in the case of godaddy hosting.
First thing you have to find out is what your server API is?
print out php info of your hosted server.
See the Server API value.
If the Server API is apache You can do the following
1) Create a .htaccess file in the root folder of web server.
2) Put the following code in side the .htaccess file and save it.
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
This will work in godaddy hosting.
If your Server API is CGI/FASTCGI do the follwing .
create a php5.ini file and write in it
upload_max_filesize = 100M
post_max_size = 100M
output_buffering = on
max_execution_time = 1000
max_input_time = 1000
memory_limit = 64M
And upload it to your websites root folder.
Check the phpinfo and you can see the changes if it worked.Do not forget to put the file name php5.ini.
Thursday, May 6, 2010
Php-codeigniter creating thumbnails
I have created a library function
function image_resize($data)
{
$this->CI =& get_instance();
$error="";
$config['image_library'] = 'gd2';
$config['source_image'] = $data['source_image'];
$config['new_image']= $data['new_image'];
$config['create_thumb'] =$data['create_thumb'];
$config['thumb_marker'] = $data['thumb_marker'];
$config['maintain_ratio'] = TRUE;
$config['width'] = $data['width'];
$config['height'] = $data['height'];
$this->CI->load->library('image_lib');
$this->CI->image_lib->clear();
$this->CI->image_lib->initialize($config);
if ( ! $this->CI->image_lib->resize())
{
$error= $this->CI->image_lib->display_errors();
}
Subscribe to:
Posts (Atom)