Results 1 to 8 of 8

Thread: PHP ini [resolved]

  1. #1

    Thread Starter
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090

    PHP ini [resolved]

    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?
    Last edited by Acidic; May 4th, 2004 at 03:36 PM.
    Have I helped you? Please Rate my posts.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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.

  3. #3

    Thread Starter
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.
    Have I helped you? Please Rate my posts.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    OK. I've looked and really can't find it. I doubt my friend has access to it.
    Have I helped you? Please Rate my posts.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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.

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by Acidic
    OK. I've looked and really can't find it. I doubt my friend has access to it.
    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.
    PHP Code:
    <?php
      phpinfo 
    ();
    ?>
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width