Re: [PHP-DB] Re: permissions for writing file
James, Who are you logging in as and do you have write privileges in that directory? Who owns it: user and group? (Don't have to answer, that's just what you have to know. Alternately, is there a "mysql" user in /etc/passwd? What group? The answer probably lies in there somewhere. Is there any possibility you can use a Secure Shell (SSH) on that machine? It's much safer than telnet. If you're reaching it from a windows box you can use putty.exe or terraterm ssh for access. Both are secure clients. Regards - Miles Thompson At 09:42 AM 1/14/2002 -0500, James Kupernik wrote: >My problem is that I'm trying to run the query via a telnet sessions before >I code through PHP. Is there a solution that anyone knows for this? > >"James Kupernik" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I'm trying to use PHP and MySQL to query a table and write the contents to >a > > new file. When run the command to outfile it tells me I don't have > > permissions. This is on a Unix machine. > > > > mysql> select * into outfile > > "/home/u1/funfun/www.somewebsite.com/catalogreq/ > > catalog.txt" > > mysql> fields terminated by ',' optionally enclosed by '"' > > mysql> fields terminated by ',' optionally enclosed by '"' > > mysql> fields terminated by ',' optionally enclosed by '"' > > > > > > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: permissions for writing file
My problem is that I'm trying to run the query via a telnet sessions before I code through PHP. Is there a solution that anyone knows for this? "James Kupernik" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to use PHP and MySQL to query a table and write the contents to a > new file. When run the command to outfile it tells me I don't have > permissions. This is on a Unix machine. > > mysql> select * into outfile > "/home/u1/funfun/www.somewebsite.com/catalogreq/ > catalog.txt" > mysql> fields terminated by ',' optionally enclosed by '"' > mysql> fields terminated by ',' optionally enclosed by '"' > mysql> fields terminated by ',' optionally enclosed by '"' > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] RE: permissions for writing file
>I'm trying to use PHP and MySQL to query a table and write the contents to a >new file. When run the command to outfile it tells me I don't have >permissions. This is on a Unix machine. I haven't run this on Unix myself, but I think this answer might be useful. Someone please correct me if I'm out to lunch. Check which user account is actually running the PHP process (or the Apache process if it's not the CGI). Then ensure that it (the PHP user) has the rights to create files in the specified directory. Be careful here though, because you will be giving malicious visitors more tools to work with. Cheers, -Peter -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]