![]() ![]() Or if you want PHP 5.4: LoadModule php5_module /opt/local/apache2/modules/mod_php54.so PHP.ini configuration fileīy default macports store php.ini files under /opt/local/etc/php54/. If you want to use now PHP 5.3 you just have to change the nf file line to: LoadModule php5_module /opt/local/apache2/modules/mod_php53.so ![]() ![]() So you can find the php5_module file under /opt/local/apache2/modules/. For default macports installs everything under /opt/local directory. What you must do is change de php5_module file to point to the version you want. Now you have your Apache2 configuration file for editing. Open this file and make some changes: sudo nano /etc/apache2/nf So my nf (apache file configuration) is located inside /etc/apache2/nf. Now, I’m using the original Apache2 version that comes with the MAC OS-X Mountain Lion. The same way you will install PHP 5.3, for example, like: sudo port install php53 For example, you must install the apache2 handler too. Well, this way you can install what you want, like extensions and drivers, like pdo, etc. So now you can install PHP 5.4 MySQL driver: sudo port install php54-mysql Let’s search for PHP 5.4 Mysql driver: port search php54-mysql*Īnd you’ll get: php54-mysql (lang, php, www, databases)Ī PHP interface to MySQL databases, including the mysql, mysqli and pdo_mysql extensions You can install PHP 5.3 and 5.4 in the same machine and decide what you’ll use just updating your Apache nf file.įirst let’s install PHP 5.4 using macports: sudo port install php54 I think macports is a very good way to organize all sources in the same place. I’ve used macports to install PHP in my machine. The cleaner solution is using Vagrant, that allow you install only what you want for a specific project, leaving your machine cleaner. The solution was go back to PHP 5.3 and do the updates on my the project, because the production server is with PHP 5.3 too. Today I have PHP 5.4 installed on my machine and this newer version abandoned some old features, and you have some Fatal errors like Call-time pass-by-reference has been removed. opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packagesįor reference see how the Eclipse Liclipse python IDE dialog for setting the PATH looks - there are some more directories you might want to include for a fully specified PYTHONPATH.Today I had to update a project that was developed using WordPress and PHP 5.3. One-Line PYTHONPATH setting in macports: export PYTHONPATH=$(dirname $(sudo port contents python38 | grep site-packages))Īnd we can check the result: echo $PYTHONPATH So it's possible to end up with the one-liner: Gives the desired directory: /opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packages Since we need the directory modifying the command to: dirname $(sudo port contents python38 | grep site-packages) With the output: /opt/local/Library/Frameworks/amework/Versions/3.8/lib/python3.8/site-packages/README.txt Applications/MacPorts/Python 3.8/IDLE.app/Contents/PkgInfoĬombining that with fardjad's answer leads to: sudo port contents python38 | grep site-packages Applications/MacPorts/Python 3.8/IDLE.app/Contents/MacOS/Python Applications/MacPorts/Python 3.8/IDLE.app/Contents/MacOS/IDLE Applications/MacPorts/Python 3.8/IDLE.app/Contents/ist Which lists 7285 lines: Port python38 contains: I checked my python version python -versionĪnd then tried: sudo port contents python38
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |