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.
July 18th, 2007 8:45am
Looks like it might be. Thanks!
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/.
July 18th, 2007 9:05am
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.
No love so far from el's link.
arg! I think the article you linked has the answer, though. I'll try it out when I get home.
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.
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.
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.
July 18th, 2007 10:08am
July 18th, 2007 12:55pm
Still haven't received that apology...
July 18th, 2007 12:55pm