Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 29, 2006, 06:53 PM   #1
Jimmieboy
macrumors 6502
 
Join Date: Oct 2005
Location: Australia
Send a message via AIM to Jimmieboy Send a message via Skype™ to Jimmieboy
PHP Error

Hey everyone. I have a problem when using php. I'm using Apache at home and I cannot seem to view any php files that weren't created on my computer. When trying to access something that was created by someone else or on a different computer I get a message saying that I don't have permission to access whatever folder on this server. Anyone know a way around this?
Jimmieboy is offline   0 Reply With Quote
Old Dec 29, 2006, 10:35 PM   #2
fishkorp
macrumors 68020
 
Join Date: Apr 2006
sounds like they uploaded the files to a directory that only their user can read? if that's the case have them (or someone with sudo/root) chmod the folder/files to 755.
fishkorp is offline   0 Reply With Quote
Old Dec 30, 2006, 05:29 AM   #3
Jimmieboy
Thread Starter
macrumors 6502
 
Join Date: Oct 2005
Location: Australia
Send a message via AIM to Jimmieboy Send a message via Skype™ to Jimmieboy
Quote:
Originally Posted by fishkorp View Post
sounds like they uploaded the files to a directory that only their user can read? if that's the case have them (or someone with sudo/root) chmod the folder/files to 755.
I don't think I made it clear. What happens is if I try to access php files sorted on my computer but created on a different machine. I get the error that I mentioned above.
Jimmieboy is offline   0 Reply With Quote
Old Dec 30, 2006, 04:28 PM   #4
slooksterPSV
macrumors 68030
 
Join Date: Apr 2004
Location: Nowheresville
Send a message via AIM to slooksterPSV Send a message via MSN to slooksterPSV Send a message via Yahoo to slooksterPSV
Quote:
Originally Posted by Jimmieboy View Post
Hey everyone. I have a problem when using php. I'm using Apache at home and I cannot seem to view any php files that weren't created on my computer. When trying to access something that was created by someone else or on a different computer I get a message saying that I don't have permission to access whatever folder on this server. Anyone know a way around this?
Well the only way around it is to chmod 755 the folder and the files, which you can easily do like so

chmod -R 755 folder
--if the files are on your machine locally

--if they are on a server, you're SOL

As for accessing it if you don't have permission to access it, you're SOL, its a security feature. To access PHP files you have to give it 755 permissions, which I think is rx (read and execute, or maybe its just execute). Anyways hope that helps.
__________________
AMD Phenom 9600, 2GB RAM, 250GB HDD, ATI Radeon 4850, Vista Home Premium 64-bit
Gateway NV53 with Windows 7 Home Premium 64-bit & Ubuntu 10.04 Lucid Lynx 64-bit
slooksterPSV is offline   0 Reply With Quote
Old Jan 3, 2007, 03:39 PM   #5
mbabauer
macrumors regular
 
Join Date: Feb 2006
Quote:
Originally Posted by Jimmieboy View Post
I don't think I made it clear. What happens is if I try to access php files sorted on my computer but created on a different machine. I get the error that I mentioned above.
How did you transfer the files? Were they emailed, or did you scp or ftp them down? Or did someone burn them to a CD?

However you did it, its possible that the file permissions somehow came along with it. If its a burnded CD or some other sort of media, its most definately that the permissions came with it.

The best bet is to sudo over to root, chown the files to your ID, and chmod then 755 (rwx r-x r-x). Then you should be good.
__________________
mbabauer
8-Bits me!
http://www.codechimp.net
mbabauer is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
[php] - php problems os x mountain lion 10.8.2 cakas6933 OS X 10.8 Mountain Lion 4 Jun 10, 2014 08:08 AM
Network users login error 'can't log in at this time due to an error' RyanelRichie Mac OS X 10.7 Lion 1 Jan 8, 2014 04:29 AM
-fobjc-arc is not supported error and duplicate symbol error in compiling mehdies Mac Programming 3 Sep 24, 2013 01:57 AM
Cydia mismatch error, and indexed files failed to load error. Napster100 Jailbreaks and iOS Hacks 6 May 19, 2013 01:31 PM

Forum Jump

All times are GMT -5. The time now is 06:10 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC