Re: Gnome and MIME types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Got it.

After putting .gnome2 folders every where I could think of, I accidentally put one in /var/www/ and it worked. I guess PHP considers the root of my web site to its home (which makes sense, but not what I was expecting.

Now, having a writable folder in the server path seems like a pretty bad idea to me. I feel like I've been through the php.ini file a thousand times, but I don't see anywhere to tell it to use another directory as "home."

Is that possible, or do I hack my way around making this .gnome folder less of a security risk?

Thanks again everyone. You've all been really helpful.

Nate


On Mar 30, 2007, at 11:50 AM, Nathan Ziarek wrote:

I appreciate everyone's help. I think I may have to throw in the towel
in a second here.

I create a directory /home/www-data. I chown'd, chgrp'd and chmod'd it
to www-data/www-data and 777 (I figured if it worked I could scale it
back later). No dice.

I then create a .gnome directory inside there and made sure it was
owned and operated by www-data. Same error.

Finally, I tried just running exec("ls ~/ 2>&1", $array) and received
"ls: ~/: No such file or directory"

With a pretty limited knowledge of the environment PHP runs in, my
guess is that it either doesn't know how to translate ~/ to
HOME_DIRECTORY or the environment is set up in such a way that the
fake home directory I made is in the wrong place.

I've been looking through the PHP docs for days, but I wouldn't even
know what to search for...suggestions welcome!

Nate

On 3/30/07, Edward Vermillion <evermillion@xxxxxxxxxxxx> wrote:
~ is an alias for /home/USERNAME

so it's probably trying to create it in /home/www-data



On Mar 30, 2007, at 11:20 AM, Nathan Ziarek wrote:

> I'm capturing the output of exec in an array  --  exec("command",
> $array);
>
> Shouldn't $array have the error from bash?
>
> Researching this more, I found this command that returns the error:
>
> exec(gnomevfs-info file.doc 2>&1)   ---   gives me this:
>
> (gnomevfs-info:27496): libgnomevfs-WARNING **: Unable to create
> ~/.gnome2 directory: Permission denied
> Cannot initialize gnome-vfs.
>
> So Gnome is trying to make a folder in a user directory (www- data, the
> apache2 user?) that either doesn't exist or can't be created.
>
> Any ideas on a work around for this? I don't see any way to specify
> where Gnome makes this directory.
>
> Thanks,
>
> Nate
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux