Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: spook on November 16, 2006, 09:31:41 AM
-
I have to add a line to php.ini, but when I do
vi /etc/php.ini
it says that I should modify the source template instead.
How do I go about that, then?
I need to add upload_tmp_dir = /home/e-smith/files/ibays/Primary/html/tmp
-
/etc/e-smith/templates/etc/php.ini
And use pico or nano rather than vi. Easier.
-
So I just add the line to the template, and all is good?
-
Hrm... added the line I needed in the template and restarted Apache. No luck. Then I restarted the entire server. No luck either...
When I look at php.ini afterwards, it hasn't changed one bit. :(
...and I use VI 'cause I like it ;)
-
The proper way with other templated config files is to create a custom template fragment, modify, expand templates (writes new config file with included changes), restart service.
-
I also want to modify some settings in the php.ini file?
Any example available on how to do this?
It would be very much appreciated for beginners in SME like me...
Thanks!
-
The proper way with other templated config files is to create a custom template fragment, modify, expand templates (writes new config file with included changes), restart service.
Sounds like the thing I need to do!
Where do I read the how-to on that?
-
Sounds like the thing I need to do!
Where do I read the how-to on that?
Create the mod in
/etc/e-smith/templates-custom/etc/php.ini
and expand the template
/sbin/e-smith/expand-template /etc/php.ini
-
I have to add a line to php.ini, but when I do vi /etc/php.ini
it says that I should modify the source template instead.
How do I go about that, then?
I need to add upload_tmp_dir = /home/e-smith/files/ibays/Primary/html/tmp
upload_tmp_dir is currently set to no value
It does not appear in any templates so I'll assume there's no db property for it.
So, quickly..
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cp /etc/e-smith/templates/etc/php.ini/50PathsDirectories /etc/e-smith/templates-custom/etc/php.ini
pico -w /etc/e-smith/templates-custom/etc/php.ini/50PathsDirectories
Add what you want at the bottom and save
expand-template /etc/php.ini
/etc/rc.d/rc7.d/S86httpd-e-smith restart
It's all explained in the developer manual available via the smeserver.org link above.
-
The line I needed to add was already added to the bottom of that section - So I guess my first attempts at editing it was successful, but after restarting HTTPD it seems as if it doesnt read from the template - The temp upload dir in joomla still shows up as /tmp/. If I manually edit /etc/php.ini, it changes to /home/e-smith/files/ibays/Primary/html/tmp.
-
The line I needed to add was already added to the bottom of that section - So I guess my first attempts at editing it was successful, but after restarting HTTPD it seems as if it doesnt read from the template - The temp upload dir in joomla still shows up as /tmp/. If I manually edit /etc/php.ini, it changes to /home/e-smith/files/ibays/Primary/html/tmp.
Contents of mine is..
include_path = ".:/usr/share/pear-addons:/usr/share/pear"
doc_root =
user_dir =
extension_dir = /usr/lib/php4
enable_dl = On
Nothing about
upload_tmp_dir =
Any reason you not installing Joomla from dungog? (http://dungog.net/sme/webapp.php#joomla)
-
Info..
Create a directory
mkdir -p /home/e-smith/files/ibays/Primary/html/phptest
In that directory create a file called index.php containing
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF">
<?PHP
if (imagetypes() & IMG_GIF) echo "GIF Support is enabled<br />";
if (imagetypes() & IMG_JPG) echo "JPEG Support is enabled<br />";
if (imagetypes() & IMG_PNG) echo "PNG Support is enabled<br />";
if (imagetypes() & IMG_WBMP) echo "WBMP Support is enabled<br />";
phpinfo();
?>
</body>
</html>
Now view that directory with a browser
http://www.your.server/phptest and it should now show your php setting similar to
https://secure.magicwilly.info/phptest/
-
I already added the line myself - thats why it showed up in my template. But when I check /etc/php.ini after expanding the template and restarting httpd (and even restarting the entire server) none of my changes are in it. The max. fileupload is still 10mb, and the line I added to the template is nowhere to be found.
It seems like /etc/php.ini is not being rewritten from the template as it should...
-
I already added the line myself - thats why it showed up in my template. But when I check /etc/php.ini after expanding the template and restarting httpd (and even restarting the entire server) none of my changes are in it. The max. fileupload is still 10mb, and the line I added to the template is nowhere to be found.
It seems like /etc/php.ini is not being rewritten from the template as it should...
Well, what I typed works.
Look at my phptest page again and you will see that upload_tmp_dir = has changed.
-
Some values use the db system
http://forums.contribs.org/index.php?topic=33486.msg142868#msg142868
-
Assuming you now know how to do this, I would ask "why"?
What you are doing here seems like it could be dangerous to the security of your server, and at best, is likely to be unnecessary.
I suspect you are using an application that [wrongly] does a direct copy of an uploaded file to another directory? phpBB perhaps? If so, then there are other threads that describe how to deal with this.
No-one is going to stop you doing this, but I would recommend you seriously think it through. You may well be introducing a serious problem as a result of trying to work around a problem that could be solved other ways.
-- Jason
-
I'll be damned.
You were absolutely correct, I did the phptest (see it at www.internettet.org), and it show all the right values and settings.
But Joomla still insists that /tmp/ is the place for tmp stuff.
The reason I have not installed joomla from Dungog is that I had not heard about the site until yesterday. So I am just running a standard Joomla install. Which is working fine, except from the /tmp/ stuff.
-
I'll be damned.
You were absolutely correct, I did the phptest (see it at www.internettet.org), and it show all the right values and settings.
But Joomla still insists that /tmp/ is the place for tmp stuff.
The reason I have not installed joomla from Dungog is that I had not heard about the site until yesterday. So I am just running a standard Joomla install. Which is working fine, except from the /tmp/ stuff.
Search for php open_basedir for how to use /tmp Its a db command.