ryandesign at macports.org
Sun Feb 21 08:41:36 PST 2010
On Feb 21, 2010, at 10:33, Celso Coutinho wrote:
> A few months ago, I installed php with your help. I finished my work, and everything was alright! But I haven't used it since then. Now I type localhost on safari, and I get this:
> Safari can’t open the page “http://localhost/” because Safari can’t connect to the server “localhost”.
Ok. Sounds like you don't have a web server running.
> AM I doing anything wrong? I typed on the console "port installed" and I get this output, amongst some other things:
> php5 @5.3.1_1+apache2+darwin_10+macosx (active)
> php5-oracle @5.3.1_2 (active)
> So php is still there! I tried to find php.ini to see if it's everything ok with it. So I went to this folder /opt/local/etc/php5/ to look for it. And it wasn't there! Instead, there were two files: php.ini-development and php.ini-production. I googled about this matter, and I found that with this new php version this is supposed to happen...
If you want a php.ini, you have to create one. A good starting place is to copy one of those two template php.ini files you mentioned.
> Then I ticked Web Sharing in the system preferences, and then I type localhost on the browser. It works but I think it's using the previous version of php, the one that comes with the computer. I assume that because I got an error when accessing an oracle data base. In the php installation from macports, I got oracle data bases working.
Right. Turn off Web Sharing in System Preferences again. That's Apple's web server with Apple's PHP.
> Does anyone know what should I do?
To start the MacPorts apache2 web server with MacPorts php5, type:
sudo port load apache2
More information about the macports-users