HI Sir,


this is my code...still i got the same warning....i tried to upload 7.9 MB..its uploaded...but for 8.3 MB..its not working...

$new_size = '100M';
 $new_limit = '100M';
 @ini_set('post_max_value',$new_limit);
@ini_set('upload_max_filesize',$new_size);

i saw in many sites(tutorials)...every where having same asnwer wat u told....dont know wat to do...any other way????

Thanks in advance...

It's "post_max_size" and not post_max_value

It's "post_max_size" and not post_max_value

Hi sir,

thanks 4 ur reply..

Still i got the same warning...this time i changed..

$new_size = '50M';
@ini_set('upload_max_filesize',$new_size);
 $new_limit = '50M';
 @ini_set('post_max_size',$new_limit);

also

@ini_set('upload_max_filesize','50M');

 @ini_set('post_max_size','50M');

Are you aware if the below error too -

PHP Fatal error:  Allowed memory size of *** bytes exhausted (tried
to allocate **(some number)** bytes) in dir_name/script_name.php on line 0

Are you aware if the below error too -

PHP Fatal error:  Allowed memory size of *** bytes exhausted (tried
to allocate **(some number)** bytes) in dir_name/script_name.php on line 0

Hi Sir,

i don't know exactly about that error...

Hi sir,

thanks 4 ur reply..

Still i got the same warning...this time i changed..

$new_size = '50M';
@ini_set('upload_max_filesize',$new_size);
 $new_limit = '50M';
 @ini_set('post_max_size',$new_limit);

also

@ini_set('upload_max_filesize','50M');

 @ini_set('post_max_size','50M');

make sure you doing this well before the file upload.
I hope you doing this already.Actually got so much discussion for this topic online , but nothing is beyond this 2-3 variables in .ini.
Tried directly changing the values in the php.ini if you got the access to it?you will need to restart the server to take effect of the changes.
And "memory_limit" values should be fare greater than the post_max_size.
can't think of anything else than posting the link to the discussion i got on php bug net site below -
http://bugs.php.net/bug.php?id=13245

make sure you doing this well before the file upload.
I hope you doing this already.Actually got so much discussion for this topic online , but nothing is beyond this 2-3 variables in .ini.
Tried directly changing the values in the php.ini if you got the access to it?you will need to restart the server to take effect of the changes.
And "memory_limit" values should be fare greater than the post_max_size.
can't think of anything else than posting the link to the discussion i got on php bug net site below -
http://bugs.php.net/bug.php?id=13245

hi sir,

this time i used the below code....now code working fine in local host(after restarting the Apache)..but not in server...

set_time_limit(600);
$new_size = '50M';
$new_limit = '200M';
$new_memory='300M';
@ini_set('post_max_size',$new_limit);
@ini_set('upload_max_filesize',$new_size);
@ini_set('memory_limit',$new_memory);

hi sir,

this time i used the below code....now code working fine in local host(after restarting the Apache)..but not in server...

set_time_limit(600);
$new_size = '50M';
$new_limit = '200M';
$new_memory='300M';
@ini_set('post_max_size',$new_limit);
@ini_set('upload_max_filesize',$new_size);
@ini_set('memory_limit',$new_memory);

you still getting the same warning or something else now.

you still getting the same warning or something else now.

No..i m getting the same warning....


i tested the phpinfo(); in server...it doesn't take new values....it display old default values.....


Thanks a lot...u tried ur level best....thanks....

No..i m getting the same warning....


i tested the phpinfo(); in server...it doesn't take new values....it display old default values.....


Thanks a lot...u tried ur level best....thanks....

setting those variables with the help of ini_set() wont actually change anything in the server's php.ini.
But by setting those values with ini_set() lasts until your script execution is complete.So you cant actually see any change in those values with the phpinfo().
If you got the access to the server's .ini file , try to change those values directly there( take a back-up of it, before changing anything for your safety).

setting those variables with the help of ini_set() wont actually change anything in the server's php.ini.
But by setting those values with ini_set() lasts until your script execution is complete.So you cant actually see any change in those values with the phpinfo().
If you got the access to the server's .ini file , try to change those values directly there( take a back-up of it, before changing anything for your safety).

Hi Sir,

Sure...this is my last option...i need to raise a ticket to my hosting admin..
i m not going to extend this thread ...


Thanks Ur support....Keep it up..

Keep Smiling...
Saritha....

Hi frnds...


i m trying to upload mp3 file ..this is my code..

$tname = $_FILES["tphoto"]["name"];
$ttmp_name = $_FILES["tphoto"]["tmp_name"];

 //Audio File Uploading....  
 if($_FILES['tphoto']['type'] == 'audio/mpeg'){
 $dir="../../music/$aid";
 move_uploaded_file($ttmp_name,"$dir"."/"."$tname");
 }

it displays no error...but, no output.

can any body give me some suggestion plz...

Thanks in advance...
Sari K

possibly you are using suphp enabled servers and you are changing limit of ini which is not valid file for your account. If you are a server administrator and on suphp enabled server log into the root and edit httpd.conf file.

You can load different ini files per user adding following line inside httpd.conf <VirtualHost IP***> per user like

suPHP_ConfigPath /home/username/public_html/[IF ANY:subdomainfolder]/php.ini
[NOT RECOMMENDED]

you should always load php.ini from non public accessible areas. like
suPHP_ConfigPath /home/username/php.ini

Hope this information will help who are dealing with php.ini issue on cpanel/WHM and suphp enabled servers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.