How to download PHP extensions for Mac OS X - php

I recently purchased a Mac to do my LAMP development. However, coming from Debian, using the apt-get tool to download PHP extensions was surprisingly easy but doesn't exist on my Mac. After reading up on multiple forums, it seems one needs to download Xcode and use ports to do so, OR, download the binaries and compile them. So my question is, what is the best tool to use in order to get all these extensions (php5-mysql, php5-gd, libapache2-mod-php5, php5-curl etc).
Note: I am using the default PHP installed on my Mac which apparently doesn't come with many extensions or support for them.

You are correct. You can download XCode first and then use MacPorts to download/install/enable php and each extension. This is the same approach we use to setup our LAMP development environment on our MacBook Pros at work.

Alternatively to MacPorts, there's also Link which has the same approach

Related

How to install php on windows xp

every time I try to install php on windows I get a file called php-5.4.8.tar.bz2 I dont know how to install this kind of file can someone help me?
If you are new to PHP, then I would suggest you to use WAMP Server. Link below:
http://www.wampserver.com/en/
Install it, execute it, start working. Real fast and easy. It comes pre-configured with Apache, MySQL and PHP.
You're using the wrong file, you're on Windows not Unix!
This should help:
http://www.php.net/manual/en/install.php
yet, use a wamp server, it's simple and easy to use. enjoy your PHP trip ! :)
In case you're looking for a place to start learning PHP, I highly suggest this simple tutorial:
http://www.w3schools.com/php/
It's a very straight forward tutorial that'll get you started with PHP in no time!
You have downloaded the installation package for Unix based systems. You want to download the Windows Version. Note that you will also need to download an install Apache with this.
You may find it easier to install a full development package. I recommend WAMP or XAMPP. These contain all the tools you need to get started, including Apache, PHP, and MySQL.
Compressed archive created by bzip2, a file compression program often found on Unix-based systems; incorporates the Burrows-Wheeler compression algorithm as well as Run-Length Encoding (RLE) for high levels of compression; often used for Linux software package distributions.
Info about .bz2
You can unrar it using winrar

How to install ffmpeg and lame on Xampp for Mac?

I've searched the internet for days to find out how to install ffmpeg (and lame) on XAMPP for Mac (PHP). But I didn't find the key to my quetsion.
I need to covert mp3's on my webserver (php) using lame, but I like to test it on my XAMPP for Mac first.
I think I need the "php_ffmpeg.dll" which can be downloaded at Sourceforge.
I found a step-by-step description here but this question only refers to XAMPP for Windows. But I need it for Mac.
Can anyone help to supply a step-by-step description?
The DLL file is not what you need, they're only for Windows.
Follow these instructions to install ffmpeg on your Mac, then use one of PHP's program execution functions to call the ffmpeg executable from your PHP code.

What's a Robust but Simple Apache / PHP / MySQL Installer for Windows Vista

I tried easyphp but i think it's not enough, I want an Apache / PHP / MySQL installer which has the latest PHP and MySQL version, and with curl and htaccess support.
Opensource solutions are preferred, should be windows vista compatible.
I have never heard of a PHP / mySQL emulator. What purpose would such a tool serve?
If you are looking for a ready-made installer package for Windows, containing everything necessary to install and run PHP, XAMPP is probably one of the best ones around.
WAMP Server is excellent, easy to install and easy to configure:
http://www.wampserver.com/en/index.php
If you want the last version of each piece of software, and to really do it the way you want, the best solution is to download an install each component separatly :
Apache : http://httpd.apache.org/
MySQL : http://dev.mysql.com/downloads/
And PHP : http://www.php.net/downloads.php
Of course, you'll have a bit more work to plug all those together than if using WAMP or anything like that -- but it also mean you'll know more about how they work and can be configured, which is always nice to know ;-)
Never heard of PHP or mySql emulators before. To run a php script you will need a webserver and the PHP engine to parse and execute the script. This cannot be emulated by another engine besides PHP.
I would suggest using Acquia Dev Desktop.
It installs Apache, MySQL & PHP with one click. Most importantly, unlike many other WAMP stacks, it works well under Windows Vista (32- or 64-bit). And as an extra, it installs Acquia Drupal for you as well, so if you ever want to get into Drupal development, you have everything you need to do so.
Get it at http://network.acquia.com/documentation/acquia-drupal-stack
I'm a BitNami developer and I personally suggest to use BitNami WAMPStack. It is free, it also includes phpMyAdmin for managing the MySQL databases and GUI management tool for the servers. Per your requirements, it is open source, compatible with Windows Vista and Windows 7, includes curl and htaccess support and we keep it fairly up to date.
XAMPP Lite USB
"XAMPP Lite" is an additional extra small XAMPP edition. Configured with relative paths you can use it on usb devices.

What web server should I install?

I have Windows 7 Enterprise and I want to run a web server on this computer and I wander what is the best web server would be in my case. I have several requirements to the web server.
It should be easy to install and set up the server. Just "click", "accept" and that's it.
It should support MySQL and PHP (with GET, POST, SESSION, and cookies).
I want to be able to install the server from CD or memory stick. In other words, I want to be able to download something on my CD and than use this CD to install the web server.
The server (software) should not occupy a lot of memory.
It should be possible to install the web server on Linux, Windows and MAC.
Install Z-WAMP. It has the latest versions of Apache, MySQL and PHP (with APC and phyMyAdmin). It's also portable so you can have it installed on a mem stick.
XAMPP is very simple to install and use.
Quoting:
Zend Server Community Edition is a fast and reliable PHP application stack. It is completely free, and you can use it in development, testing and production.
Further:
Eliminate wasted time spent on putting together your PHP stack piece by piece. Zend Server Community Edition includes everything you need, whether you’re using Windows, Linux or Mac OS X. The simple, native installers will set you up in minutes with:
Bytecode accelerator (Optimizer+)
Zend Data Cache
A certified PHP distribution
Zend Framework
Apache (or IIS integration)
MySQL (on Windows and Mac OS X)
Out-of-the-box connectivity to all common databases
Java code connectivity
Web-based PHP administrator console
Not quite sure if this is what you mean but take a look at AppServ it installs Apache, PHP and MySQL for you with one installation file.
If you combine requirement 1, 3 and 5 you make it extremely difficult.
There is not just one package that you can install on boot *nix and windows. Simply because they use a different Operating System with other drive mappings, libraries, etc.
But for Windows I recommend one of the XAMP/WAMP implementation (I'm not a Windows User). For Mac there is MAMP. On other *nix based systems I always used predefined packages or a manualy compiled amount of packages which does not meet your requirements.
Latest OSX has buildin PHP and Apache. You only have to enable Apache in your system pref panel. MySQL can be installed.
It's also possible to use XAMPP for osx. Can be installed from CD
As for Windows you can use WAMP or XAMPP. This package includes Apache, PHP and MySQL. Can be installed from CD.
Most Linux distro's have apache build in. And it's easy to configure PHP and MySQL for it. You can also use XAMPP for linux:
LAMP for linux
XAMPP for mac
and WAMP for win
Different gui almost the same thing easy to setup and configure.
The big advantages with WAMP are that you can easily switch PHP/Apache/MySQL version and toggle PHP settings + extensions, directly from the taskbar.
That's why I'm using it.
Note: Even though you can't download the latest PHP version from their site, it's very easy to install it yourself.

Looking to get started with Apache, PHP, MySQL, Python, Django on a fresh Mac

I've looked for other questions, but could not find any...
I have freshly installed my Mac with OSX 10.5. I need to learn Python/Django for a new job, so want to set it all up correctly, ready to develop and run from my browser using http://localhost/
I come from a PHP background and always used MAMP before. But I want to get everything working together... Apache, PHP, MySQL, Python, Django. Using MAMP is easy to install a local development server, but I want to get Python and Django running nicely too. So I can just start developing and also following tutorials on Python/Django.
Please give me some steps (with MAMP or not) to get a nicely working environment for Apache, PHP, MySQL, Python and Django. Thank you, all have great days!
James
Why not try the official installation instructions? Really all you need to do is install Django. You can use its built-in server (http://localhost:8000 by default) for testing:
./manage.py runserver
Your Mac should come pre-installed with Python 2.4 (or later) which is fine for Django 1.0.2.
10.5 comes with Apache installed by default System Preferences > Sharing > Web Sharing.
To enable Apache php module edit the Apache conf (/etc/Apache/httpd.conf) file and uncomment the php module line.
LoadModule php5_module libexec/apache2/libphp5.so.
Restart Apache after by disabling & enabling web sharing
Mysql package can be downloaded form the official website and is easy to install
The fastest way to get started with Django, will be to use TurnKey linux Django appliance.
Link: http://www.turnkeylinux.org/appliances/django
I also came from PHP a few months ago. I'm not sure if this will get moderated up or down because my answer changes your question:
Do not use MySQL and Apache for local development on your Mac. Use Sqlite3 and the development server that is bundled with Django - this allows for inline debugging, etc...
Sqlite3 is basically the same as MySQL except you need to use .schema instead of describe.
If you start having problems, get MacPython. This has helped me instantly solve problems faster than trying to work with the stock Python on Leopard.
Try to use pip instead of easy_install where possible.
When you are ready for real deployment, then you'll need MySQL/Apache/Nginx, etc... but those will be on a Linux system and you'll be better prepared at that point to make a good production installation than you are now. Getting a production-quality stack running on the Mac is more of a pain than it's worth.
BTW, when you do install Apache, use wsgi, not mod_python.
Okay. I'd just install MySQL from their site and stick with what's already on my Mac as of 10.5, then install Django and the Python MySQL driver. But since you like MAMP, install MAMP or XAMPP and read something like this which summarized says:
Mac OS X 10.5 comes with "Python 2.5.1, thus you won’t have to install it. You can verify this by running python in the Terminal."
Checkout Django cd $HOME/Code; svn co http://code.djangoproject.com/svn/django/trunk django_trunk
Tell Python where Django is echo "$HOME/Code/django_trunk">/Library/Python/2.5/site-packages/django.pth
Add django-admin.py to your PATH
Install the MySQLdb driver from sf.net this probably requires GCC which means you might want the set with Xcode from Apple's Dev Tools.
Do a source code edit
"At this point, edit the _mysql.c file
and comment out lines 37, 38 and 39 as
follows:"
//#ifndef uint
//#define uint unsigned int
//#endif
run
python setup.py build
sudo python setup.py install
Verify the installation

Categories