How to create Mac OS X dev environment for legacy PHP app?

。_饼干妹妹 提交于 2019-12-12 02:48:16

问题


I've just been assigned to start working with the code from a large, legacy PHP app. A copy is running on the production servers, and I've pulled a copy from the code repositories onto my local machine.

I installed XAMPP in hopes of running the app locally during development, but I'm stuck. How do I (1) get XAMPP to point to my development folder and (2) actually get the PHP app up and running locally (including database tables)?


回答1:


1) Move your development folder into the htdocs folder where ever you installed XAMPP to ie: C:\xampp\htdocs\my_legacy_php_app\ and then browse to http://localhost/my_legacy_php_app/ to see it in action. 2) You would need to migrate the database to your test environment, most people find using phpMyAdmin pretty easy, so, navigate to http://localhost/phpMyAdmin and import the database.




回答2:


It will be better if you use the MacOSX default installation of the web server and PHP. To run the web server, you just click on Web sharing on system preferences. To activate PHP 5.x, edit the httpd.conf file in the /private/etc/apache2 directory.

Then download MySql DMG version and install it as a usual Mac application. You can start MySql using command mysql -u user -p password You may then transfer the whole directory to your home/Sites folder.

I prefer using default installation because it allows me to install pear packages easier than if I use XAMPP.



来源:https://stackoverflow.com/questions/9731355/how-to-create-mac-os-x-dev-environment-for-legacy-php-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!