Re: [PHP] Gnome and MIME types




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
>





Relevant Pages

  • Re: [PHP] Gnome and MIME types
    ... I guess PHP ... having a writable folder in the server path seems like a pretty ... I think the home directory of www-data user is by default /var/www ... I then create a .gnome directory inside there and made sure it was ...
    (php.general)
  • Re: Dealing with PHP Files
    ... Dudley Henriques wrote: ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)
  • Re: Dealing with PHP Files
    ... You can save any web page in Firefox, Command + S. If a web page has a .php ending this just means that the document that was loaded to the server had php code in it that he wanted parsed. ... The .php ending lets the server know to parse the php code in it There are other ways too). ... If you go the source of the webpage via your browser, you will just see a text file with html mark up. ... make a folder and put in the .php file and the folder with the images and maybe other things that FF made. ...
    (comp.sys.mac.apps)
  • Re: Dealing with PHP Files
    ... had php code in it that he wanted parsed. ... the server know to parse the php code in it There are other ways ... TextWrangler and save it as .html rather than .php, ... file and the folder with the images and maybe other things that ...
    (comp.sys.mac.apps)
  • Re: openssl extension not loading (need to open https stream)
    ... you configured PHP?" ... I have also enabled the openssl extension and made sure it is ... in the extension folder. ... the apache module ...
    (comp.lang.php)