1

I recently updated my OSX to mavericks, i kind of got apache and phpmyadmin to work too.

problem is, when i edit the php.ini.default no changes were made when i check in phpinfo(); (restarted Apache of course)

the version in phpinfo() is the same as below

$ php -v
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

but when i check for my configuration file, the loaded configuration file doesn't show.

$ php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /etc
Loaded Configuration File => (none)

to open my php.ini.deault i used this command

sudo nano /private/etc/php.ini.default

not sure if this might help, but here is a list of files in the /private/etc/ folder

$ ls
AFP.conf                nanorc
afpovertcp.cfg              networks
aliases                 newsyslog.conf
aliases.db              newsyslog.d
apache2                 nfs.conf
asl                 notify.conf
asl.conf                ntp-restrict.conf
authorization.deprecated        ntp.conf
auto_home               ntp_opendirectory.conf
auto_master             openldap
autofs.conf             pam.d
bashrc                  passwd
com.apple.screensharing.agent.launchd   paths
csh.cshrc               paths.d
csh.login               periodic
csh.logout              pf.anchors
cups                    pf.conf
defaults                pf.os
dnsextd.conf                php-fpm.conf.default
efax.rc                 php.ini-5.2-previous
emond.d                 php.ini.default
find.codes              php.ini.default-5.2-previous
fstab.hd                postfix
ftpd.conf               ppp
ftpd.conf.default           profile
ftpusers                protocols
gettytab                racoon
group                   rc.common
hostconfig              rc.imaging
hostconfig~orig             rc.netboot
hosts                   resolv.conf
hosts.equiv             rmtab
hosts~orig              rpc
ip6addrctl.conf             rtadvd.conf
irbrc                   security
kern_loader.conf            services
krb5.keytab             shells
localtime               snmp
locate.rc               ssh_config
mach_init.d             ssh_config~orig
mach_init_per_login_session.d       sshd_config
mach_init_per_user.d            sshd_config~previous
mail.rc                 sudoers
man.conf                syslog.conf
manpaths                ttys
manpaths.d              xtab
master.passwd               zshenv
moduli

what am i missing? and where is the php.ini that is being used?

UPDATE:

renamed php.ini.default to php.ini and got this errors.

$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/php_pdo_mysql.dll, 9): image not found in Unknown on line 0
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
user2636556
  • 1,905
  • 4
  • 32
  • 61
  • Check your edits. The new error is because the php_pdo_mysql.dll is not found or is built for the wrong architecture. Look for the extension_dir and the modules on disk. – gaige Dec 18 '13 at 19:28

2 Answers2

8

copy php.ini.default to php.ini instead of moving it

modify php.ini

restart apache and you should be good

lrzuniga
  • 81
  • 3
0

Even with sudo, it'll warn you that it's a read-only file. If you're using vi, save the file with

 :w!

FWIW, if you're looking to enable postgresql, there's a great answer here.

Community
  • 1
  • 1
Vince W
  • 161
  • 2
  • 9
  • If you've already edited it in a non-sudo vi, you can do: `:w !sudo tee %` to be prompted for your password and then write the buffer to the file as root. (The contents will be piped to the screen and vi will ask you if you want to reload the file as it has changed on disk.) – Aaron Nov 21 '13 at 16:45