Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: AlexG on October 30, 2007, 03:52:34 AM

Title: individual php.ini for ibay
Post by: AlexG on October 30, 2007, 03:52:34 AM
Hi

Is it possible to write an individual php.ini for a special ibay? If yes - is there a how to?

Best regards
AlesG
Title: Re: individual php.ini for ibay
Post by: cactus on October 30, 2007, 09:41:54 AM
Hi

Is it possible to write an individual php.ini for a special ibay? If yes - is there a how to?

Best regards
AlesG
You can override values using the php_admin_value in the httpd.conf template, there is no way to make a individual php.ini file. If you want to make it for one or a selection of ibays you will need to make a copy of the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays template to the templates-custom tree and make your modifications there, probably based on a selection on the key() property.
Title: Re: individual php.ini for ibay
Post by: AlexG on October 30, 2007, 09:59:13 AM
Hi

Quote
If you want to make it for one or a selection of ibays you will need to make a copy of the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess40ibays template to the templates-custom tree and make your modifications there, probably based on a selection on the key() property.

:-? You mean I copy this file (for sample) to /etc/e-smith/templates-custom, edit this file there and then?
Hmm, I just want to set the 'session.use_trans_sid' to off in the php.ini.
Title: Re: individual php.ini for ibay
Post by: cactus on October 30, 2007, 12:54:48 PM
Hi

:-? You mean I copy this file (for sample) to /etc/e-smith/templates-custom, edit this file there and then?
Hmm, I just want to set the 'session.use_trans_sid' to off in the php.ini.
Yes. Since you stated you would like to do that for an individual ibay you will have to add an overwrite in the /etc/httpd/conf/httpd.conf templates, otherwise if you want it as a general setting you will have to make your changes in the /etc/php.ini templates tree.
Title: Re: individual php.ini for ibay
Post by: AlexG on October 31, 2007, 03:31:49 AM
Hi

I have copied the php.ini to the templates folder. Edited the copy of php.ini in my templates folder to my changings, and then 'expand /etc/php.ini'. OK it seems it has changed the php.ini in the /etc/folder - but not really. It attached my changings at the end of the /etc/php.ini. Is it possible to change just the content - I mean not to attach something?

Best regads
Title: Re: individual php.ini for ibay
Post by: raem on October 31, 2007, 04:09:32 AM
AlexG

What you describe doing sounds very wrong.

Here is the correct way to make the change you are asking for.
Undo or reverse or delete anything you have done so far.
Delete the file you copied.
Then probably wise to do
signal-event post-upgrade
reboot

Then do

mkdir -p /etc/e-smith/templates-custom/etc/php.ini/
cp /etc/e-smith/templates/etc/php.ini/80ModuleSettings /etc/e-smith/templates-custom/etc/php.ini/

then edit the fragment to make your change

pico -w /etc/e-smith/templates-custom/etc/php.ini/80ModuleSettings

change the line for
session.use_trans_sid    =1
to
session.use_trans_sid    =0

Save & exit
Ctrl o
Ctrl x

Then expand the template & restart service
expand-template /etc/php.ini
sv t /service/httpd-e-smith
sv s /service/httpd-e-smith

Your changes should now be reflected in /etc/php.ini
Test and see if your sme server now does what you want/expect.
Title: Re: individual php.ini for ibay
Post by: AlexG on October 31, 2007, 06:21:57 AM
That's it - great  :D

Thank you for your help
Best regards
AlexG
Title: Re: individual php.ini for ibay
Post by: magwm on April 22, 2008, 03:48:22 PM
Hello, I followed the above indications, and in effect it did work.

Only, how is this affecting one ibay only?? or is it affecting all of them?

ciao, Michel
Title: Re: individual php.ini for ibay
Post by: cactus on April 22, 2008, 03:51:25 PM
Here is the correct way to make the change you are asking for.
No it is not as this changes the general setting system wide, and the question was to have a individual setting for one ibay for which I suggested a rudimentary solution in one of my earlier posts in this thread.