where is it stored?
How can I change it to allow files to be created/read/appended through PHP.
Am I being stupid?
BTW. This is a friends server, I don't know if I have access to it. But where is it normally stored?
Printable View
where is it stored?
How can I change it to allow files to be created/read/appended through PHP.
Am I being stupid?
BTW. This is a friends server, I don't know if I have access to it. But where is it normally stored?
C:\WINNT\PHP.INI on Windows 2000.
What sort of files do you want "created/read/appended" through PHP? I think it's all a matter of local permissions whether you can actually create or append files or read them.
it's a linnux server, sorry I should have mentioned that.
I only want to create .txt files. I can on my localhost, so I know the script works. on the server I get access denied.
You mayneed to CHMOD the directory you want to write to to make sure you can write to it. Right now it probably only has Execute/Read permissions.
TG
The default PHP.ini location on Linux is:
/usr/local/lib/php.ini
I doubt a standard user will have write access to it though.
You are probably getting Access Denied becuase PHP is running under the same user id as the web server. The web server use has very limited permissions for obvious reasons. A file that can be written by the web server use can potentially be written by anyone.
You'll need some more information on how the server is
configured.
- Web server software the server is running.
- Whether or not PHP is configured as a web server module or run as a separate CGI program.
- Does the web server use a CGI wrapper or have the ability to run modules as a different user and group.
OK. I've looked and really can't find it. I doubt my friend has access to it.
Did you CHMOD the directory in which you want to write a file?
If this isn't working with your webhost, you should consider using their MySQL db, which they will most likely have.
I forgot to say this earlier. But use the phpinfo() fucntion. It will tell you everything you need to know including the path of the php.ini.Quote:
Originally posted by Acidic
OK. I've looked and really can't find it. I doubt my friend has access to it.
PHP Code:<?php
phpinfo ();
?>