I hope this helps some other Yii mac developers! (It took me some time to get it all sorted out, including looking through complete threads and answers), I figured I’d make a post about it specifically. Remove % access (possibly even remove your user), and make sure they are only set to "local" or "localhost". It seems access denied is an inevitability on both MAMP and XAMPP with this. Note that I really should not have done this anyway as it is a security risk, but I was being lazy. Resolution:This one is the most silly of them all, as I set up my user in MySQL I set the user to accept all incoming locations (a.k.a. Unlike the Pro version of MAMP, XAMPP doesnt. Issue Three: Access denied for user * on * (where * can be anything) XAMPP provides a similar local server environment to MAMP, but configuring virtual hosts is a little different. Your mysql.sock may be in a different location, check a phpinfo() page to find out, both XAMPP and MAMP have a control panel with a phpinfo() link page on them. 'connectionString' => 'mysql:host=127.0.0.1 dbname=DBNAME unix_socket=/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock', This will make your connection string look something like the following. Resolution: For some reason yii and PHP want to look for the mysql.sock in places it is not, you have to enforce it to look where it needs to look.Īlso, sometimes “localhost” doesn’t work properly, so you should use your “home” IP, most commonly 127.0.0.1 (even if on a network, unless you’ve manually set it otherwise). Issue Two: Can not find file issue when attempting to run Yii::app()->db->connectionString You can always edit it based on your time zone, but I would just recommend keeping UTC and handling proper time zones later. Resolution: This has to do with the yiic shell having to make sure your php.ini time zone is set right, unfortunately, systems like MAMP and even XAMPP have a habit of wanting to enforce your time zone based on system settings (and using Mac nomenclatur), this does not always match up to the date.timezone’s function syntax that PHP offers, in order to resolve this, add the following to the top of the main.php file below the opening PHP line Close your Control Panel and relaunch it. The XAMPP open source package has been set up to be incredibly easy to install and to use. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. Issue One: PHP/HTML Output when trying to run yiic shell For some reason if the above command doesnt work for you Try this: For XAMPP 7.3.31-2, I changed the port number from 3306 to 3307. XAMPP is the most popular PHP development environment. Note, I am on a MacBook Pro 15" w/ Retina Display on OSX 10.8.4 I thought I would share what I had done to resolve my issue to hopefully So here’s the issues I ran into (since I seem to be on the same book and on a Mac as well), I’m using XAMPP but I tried MAMP and had the same issue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |