Koozali.org: home of the SME Server

PHP Configuration File... where?

SharedMedia

PHP Configuration File... where?
« on: December 07, 2004, 11:22:48 PM »
In SME, i sometimes get lost...
Using SME 6.0 I need to edit the upload_temp_dir in the php config file but cant find...

Anyone have a thought??

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: PHP Configuration File... where?
« Reply #1 on: December 08, 2004, 04:15:31 AM »
Quote from: "SharedMedia"
In SME, i sometimes get lost...
Using SME 6.0 I need to edit the upload_temp_dir in the php config file but cant find...

The php settings are in the standard spot of /etc/php.ini, but if you want to change them you need to use the smeserver 'templates' for php.ini.

Copy the template file, 60FileUploads across to a new custom template (one line):
cp /etc/e-smith/templates/etc/php.ini/60FileUploads /etc/e-smith/templates-custom/etc/php.ini/.

Add the following line at the end (use nano, pico or mcedit)
upload_temp_dir = "<your setting>"

Expand the template:
/sbin/e-smith/expand-template /etc/php.in

and restart httpd:
/etc/init.d/httpd restart

Trevor B

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: PHP Configuration File... where?
« Reply #2 on: December 08, 2004, 04:24:25 AM »
Quote from: "TrevorB"
Add the following line at the end (use nano, pico or mcedit)
upload_temp_dir = "<your setting>"

pico /etc/e-smith/templates-custom/etc/php.ini/60FileUploads

ctrl-O, ctrl-X

Trevor B :-)

Derek

php config similar problem
« Reply #3 on: December 15, 2004, 04:13:45 AM »
Trevor, this is what my templates-custom looks like as i added a command to extend the upload file size.
Would i add what you suggested to this info and if so what would it look like?

thanks
derek


File: 60FileUploads     Col 0              137 bytes                        100%
file_uploads    = On
upload_max_filesize = {
    my $mf = db_get_prop($confref, 'php', 'UploadMaxFilesize') || "128M";
    $OUT .= "$mf";
}

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: php config similar problem
« Reply #4 on: December 15, 2004, 05:12:18 AM »
Quote from: "Derek"
File: 60FileUploads     Col 0              137 bytes                        100%
file_uploads    = On
upload_max_filesize = {
    my $mf = db_get_prop($confref, 'php', 'UploadMaxFilesize') || "128M";
    $OUT .= "$mf";
}

Derek,

what that is saying is that there is a parameter set in the configuration database that it will use if set, otherwise it will default to 10M.

What you want to do is just change that parameter, which doesn't need a change to the template.
/sbin/e-smith/config setprop php UploadMaxFilesize 128M

then re-expand your templates.

The original question was about adding a parameter that didn't exist in the standard php.ini.

Trevor B

Derek

php config
« Reply #5 on: December 15, 2004, 05:54:05 AM »
sorry for the confusion. I know wha this meant in the php but i need to add the lines you mentioned in this forum so that the php sees the tmp dir.
i just dont know how it should look if i add it to the information already in my 60 File uploads dir.
How would i add the upload temp dir to this.

thanks

derek

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
PHP Configuration File... where?
« Reply #6 on: December 15, 2004, 11:07:20 AM »
file_uploads = On
upload_temp_dir = "<your dir>"
upload_max_filesize = {
my $mf = db_get_prop($confref, 'php', 'UploadMaxFilesize') || "128M";
$OUT .= "$mf";
}