OSX - cannot find my php.ini

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

The problem is that when I edit php.ini.default , no changes were made when I check 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 my configuration file, the downloaded configuration file does not appear.

 $ 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 can help, but here is a list of files in / private / etc /

 $ 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 php.ini used?

UPDATE:

renamed php.ini.default to php.ini and received these 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 
+1
source share
2 answers

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

edit php.ini

restart apache and you should be good

+8
source

Even when using sudo, it will warn you that it is a read-only file. If you are using vi, save the file with

  :w! 

FWIW, if you want to enable postgresql, there is a great answer here .

0
source

Source: https://habr.com/ru/post/1012188/


All Articles