Y'all are a bunch of wankers!

OS X web sharing

I'm having major problems with the apache install built into OS X.  I've got PHP and MySQL going and both work fine.  Apache works fine so long as it's serving static content or php which doesn't access the file system.

The trouble is that php can't access ANYTHING.  I get Permission Denied trying to open files even when they're below the web root.

Last night in a last ditch attempt, I put the 'www' user into the 'admin' group.  No love.

Anybody have experience with this?  As a guide I tried reading some WordPress on OS X tutorials, but none of them mention permissions issues, apparently it should work out of the box.

Permalink Send private email muppet 
July 18th, 2007 8:35am
Any help?

Permalink el 
July 18th, 2007 8:45am
Looks like it might be.  Thanks!
Permalink Send private email muppet 
July 18th, 2007 9:02am
Are you using aliases?



By default, PHP is configured to work properly with any files in your Sites directory. But should you serve files from a different location, you'll need to tweak your PHP configuration file as well.

Mac OS X, by default, doesn't have a php.ini file. So you'll actually need to make your own:

Add a lib directory to /usr/local/.
Download a sample php.ini file from the PHP website.
Rename the file you just downloaded to php.ini.
Move the file to /usr/local/lib/.
Permalink Send private email arg! 
July 18th, 2007 9:05am
No aliases.

I'm not using Sites, though, I'm using the document root in /Library/WebServer/Documents

I did TRY using my Sites directory (within my home directory)  last night, but had the same issue.
Permalink Send private email muppet 
July 18th, 2007 9:11am
No love so far from el's link.
Permalink Send private email muppet 
July 18th, 2007 9:12am
arg! I think the article you linked has the answer, though.  I'll try it out when I get home.

Permalink Send private email muppet 
July 18th, 2007 9:15am
Actually, reading further, I don't think that's it either.

WTF.  My webroot should already be in the include path.  I think.

I think I created a php.ini last night.  I think...

It would help if I were in front of the machine.

Permalink Send private email muppet 
July 18th, 2007 9:19am
I have an OS X machine running Apache, PHP and mysql.  I run several php scripts including gallery and squirrelmail that I know very little about.  I've only hacked around to make simple modifications to the scripts.  The upgrade to Tiger had me offline for almost 2 days.

Every time I run into permission problems it's usually 1 of 2 things.  I really don't have the right permissions on the directories or there's a problem with the .htaccess file in the directory (either it's missing or incorrect).  Most of the scripts I run create the .htaccess file themselves.  I don't know much about them either, but I can usually google enough information to fix them when they give me problems. 

I don't know if the is relevant to your case, just throwing in my experience.
Permalink Send private email Mountain_Dewd 
July 18th, 2007 10:05am
The only .htaccess files I have in my project directories are there to prevent a directory listing from an http request.  Shouldn't matter.

I'm on Tiger to start with.  No idea what's going on.

My include path has only '.' in it.  Do I need to add my webroot even if I fully qualify my calls to include()?  I guess I'll try that when I get home.
Permalink Send private email muppet 
July 18th, 2007 10:08am
Permalink Michael B 
July 18th, 2007 12:55pm
Still haven't received that apology...
Permalink Michael B 
July 18th, 2007 12:55pm

This topic is archived. No further replies will be accepted.

Other topics: July, 2007 Other topics: July, 2007 Recent topics Recent topics