Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I did something wrong and now my PHP is not working anymore.

I'm using OS X Lion. I can I restore it to the original configuration?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

There should be a /etc/php.ini.default file that you can copy to php.ini.

share|improve this answer
    
I didn't have the /etc/php.ini. I did what you said but id doesn't work. If I try to open a php page in my Sites folder it shows me the code. Maybe it's a problem with apache? –  Maverik Feb 11 '12 at 13:28
    
Look in /etc/apache2/httpd.conf and make sure LoadModule php5_module libexec/apache2/libphp5.so is uncommented. –  pät Feb 11 '12 at 13:39
    
I did it and it worked...however it was in /private/etc/apache2. Why do I have 2 versions? Is it normal the fact that if I go to /localhost/~luca/phpmyadmin it works but /localhost/~luca/phpmyadmin/index.php shows me the php code? –  Maverik Feb 11 '12 at 13:42
    
1) /etc is just a symlink to /private/etc. And 2) no it's not normal. Maybe browser cache? –  pät Feb 11 '12 at 13:46
    
2) Yes, it was! Thanks! –  Maverik Feb 11 '12 at 16:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.