Way to change php.ini?

software development

#1

is there a way to modify or over-ride this?

i have a local music website, and i need users to be able to upload their band’s mp3s but with the limits set in php.ini, i am unable to do this.

any ideas?


#2

Depends. Some options can be overwritten using ‘ini_set’ and some can be overwritten within the .htaccess file.

I’d try ini_set to see if that works for you. You can verify if the change worked through <? phpinfo() ?>.


#3

“I’d try ini_set”

this won’t work with and upload page, since it reloads the variables when it posts (so i read)


#4

Then try php_value within .htaccess.

If nither of those work, this is one of the values that must be set within the ini file which means, outside of compiling you’re own PHP, you can’t alter it.


#5

php_value max_execution_time 600

tried this in .htaccess

if this is the case, guess i’ll be moving hosts ><


#6

aright got this working
.htaccess is as follows

php_value max_execution_time 1000000
php_value max_input_time 1000000

i didnt think it was working cuz i used ini_get(max_execution_time) and it was still showing 30, but it did upload correctly :stuck_out_tongue:
thanks for the hlep


#7

[quote]i didnt think it was working cuz i used ini_get(max_execution_time) and it was still showing 30, but it did upload correctly :stuck_out_tongue:
thanks for the hlep[/quote]
No problem.

So you know, PHP has three sets of values. Default(no php.ini–migrates as Global), Global (in php.ini) and Local. This is why I suggested to use <? phpinfo() ?> to see if it changed as this will print out the Global and Local option values. ini_get() is most likely getting the INI value, which would be 30.


#8

You can compile your own version of PHP to override anything regarding DH’s version of PHP. Details are in the Wiki.


#9

phpinfo() didn’t show the change either :smiley:


#10

ohh. that’s odd. Does for me, well for other values. /shrug
All well, at least you got it working.