mac + php
- Started
- Last post
- 28 Responses
- heavyt0
on your mac, you shoudl browse to:
http://127.0.0.1/~yourusernamethat is your Sites directory (where your php should be)
- kelpie0
'localhost' is a pc term?
- jakeyj0
i'm getting the same thing heavyt...
when the file has a .php extension it displays all the source code...
- UndoUndo0
have you configured php.ini???
- jakeyj0
nope - help me out. or should i google it
- UndoUndo0
I dont have enough experience with macs to help you. on pc you put the php.ini filw in yr wiondows directory. not sure where it would go on a mac.
your problem is that apache doesn't know to process .php as a server side script. hope that helps
- UndoUndo0
+ the download of php you've got should have come with a pjp.ini file for you to use and place in the correct directory, I just dont know what that is, Moth will probably know if he;'s about
- kelpie0
thing is undo, on PC at least the XAMPP thing downloads and installs all the gubbins in all the right places - I'd check their chat about macs, maybe the installer doesn't put all that stuff there
- jakeyj0
i've installed xampp and when i go localhost, it brings up the xampp status page, which is a .php file... and it tells me php is activated. i wonder why its reading that php file but not any others/
- kelpie0
have you tried kicking it yet?
- jakeyj0
yes - many times!!
- jakeyj0
the page it gives me is localhost/xampp/index.php - and it works
i put a file in that folder and it worked at localhost/xampp/test.php
but when i have the files in localhost/~user/text.php it doesn't work!
what gives?
- prophet0NE0
I use MAMP OSX as my local sql, php 'environment' and it works great. Highly recommended. My localhost directory is:
- UndoUndo0
~ < thats not a url character, try a folder named just with letters
- kelpie0
htdocs folder for your files?
- silentseven0
all you need to do is turn on the module in your httpd.conf file
open terminal and type this
sudo pico /etc/httpd/httpd.conf
hit ctrl+W search for php
remove the # marks infront of the LoadModule php4_module
search again for php remove the # mark in front of
AddModule mod_php4.chit cntrl c to exit and save then type this to restart apache
sudo apachectl graceful
- jakeyj0
thanks for all your help fellas...
what would an htdocs folder do?
- UndoUndo0
htdocs - the root of yr webserver for public files i.e where yr websites lives.
- silentseven0
you dont really need to touch anything else just turn those modules on and put things in your sites folder and everything will work with .php wise will work
- kelpie0
as a fellow deveolpment noob (x10) I didn't know this at first and got very confus-ed till I asked a kind techie and he enlightened me, no problems since...
you may be doing this already I don't know...