I'm looking for a KCacheGrind alternative, or at least a binary package for Mac Os X?
I'd to use KCacheGrind with XDebug for PHP, but Mac Os X is the right environnement here...
Thank you
Edit: I know I can use MacPort but I'm looking for an alternative of this painful installation.
Maybe something "in the mac way"
You can install KCacheGrind using MacPorts:
sudo port install valgrind kcachegrind4
There are also some alternatives like:
WebGrind
qcachegrind (brew install qcachegrind); See: installation steps on OS X.
XHProf: A Hierarchical Profiler for PHP (pecl install xhprof)
MCG premium app can analyse your application profile data natively on your Mac (released to the Mac App Store)
Older: MacCallGrind (semi-commercial alternative, free version which is limited to 3MB grind files)
Image: Homepage of MCG
See also: do you have kcachegrind like profiling tools for mac
You might want to check out WebGrind
Webgrind is an Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms.
qcachegrind is the qt based 'cousin' of kcachegrind. Works like a treat.
Another premium alternative is ProfilingViewer, available on the Mac App Store. Handles multiple types of costs. Can display the data as Treemap, Callgraph, Heatmap, can hide system functions and has a source file viewer annotated with the costs. Can create PDF's. Fast and has a small memory footprint.
MacCallGrind and WebGrind is the true best answers for MacOS.
I can't comment kenorb answer so I have to make new one.
MacCallGrind link to MacUpdate is wrong - their's price is much higher then from developers site (http://www.maccallgrind.com/).
I personally find MacCallGrind grinder feature very useful in combine with Transmit (http://panic.com/transmit/) feature - mount ssh/sftp as disk. It automatically opens every new cache grind file that appears at remote location.
You can now install qcachegrind with macports as well:
sudo port selfupdate
sudo port install graphviz qcachegrind
The app should appear in the Macports folder of your Applications
Related
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
I'm in the process of switching over to developing on a Mac (woohoo, new Macbook Air) after years of Windows. My previous PHP development setup was:
WAMP
NotePad++
XDebug
TortoiseSVN and WinMerge (linked to an Unfuddle svn account)
I've just installed MAMP Pro (evaluation copy of Pro), Eclipse for PHP Developers (Version: Helios Service Release 2, Build id: 20110218-0911), and Subclipse. I'm trying to get over the "new to Mac" hump at the same time as switching dev tools. Which is making me question my setup eleventy billion times more than usual. I've read lots of StackOverflow questions and answers, googled the heck out of dev environment tutorials. What I really want to ask is "PLZ tell me what to do to get a good dev setup on my pretty new Mac!" but since that's probably not a very well-formed question, I'll try to narrow it down some. (But if you get bored reading this question, and just want to point me to a good book or tutorial, FEEL FREE!)
MAMP: OK, I think I'm fine on this one, right? It's pretty much the defacto standard, if I don't want to hammer everything together myself from what came pre-installed on my mac. I'm probably fine with dropping $60 to get MAMP Pro, as developers I know have told me the long-term convenience is worth it.
IDE: I used Eclipse for several years... but for Java development in a Windows environment. Part of me is happy to get back to a full IDE after a few years of PHP in Notepad++. But do I want Eclipse for PHP? EclipsePDT? Something else? I picked the version I have based on several StackOverflow answers mentioning that EclipsePDT didn't necessarily play well with Mac.
SVN: I took the StackOverflow hive mind advice to install Sublipse for the eclipse integrated SVN plugin. Yay, it looks like it's working, or at least I can browse my repository.
Debugging: Zend Debug comes with MAMP, right? I've never used it, but I was only semi-happy with XDebug + Notepad++ on my Windows box, as it kept locking up and requiring a Notepad++ restart multiple times a day. Will I love Zend more? Should I stick to XDebug? (Or, wait, does Zend only work with Eclipse PDT?)
Now for the actual setup questions. Given that I've got existing Unfuddle SVN repositories, what's the best way to set up my dev environment? Put the source code into the MAMP htdocs directory, and point the eclipse workspace there? (recommended by many SO answers, IIUC) Vice versa, with code into the default eclipse workspace, and point MAMP to it? A separate Projects/myProject1 directory, pointing both MAMP and Eclipse there? I'm concerned that any of these options will work for the initial setup, but that I'll get deep into the work and discover that my debugger won't work for one configuration or another, or... I dunno, something I haven't thought of yet will cause a problem I could have avoided, if only I'd known.
OSX (also the client version) already includes everything you need to develop with PHP! Oh, and it's all 64 bit :) (on Snow Leopard and Lion)
Apache 2 is included by default and can be enabled from System Preferences -> Sharing (its name is "Web Sharing", or something similar: I'm sorry but I use OSX in another language!).
PHP is installed by default too. You just need to enable it in /etc/apache2/httpd.conf: uncomment this line:
LoadModule php5_module libexec/apache2/libphp5.so
MySQL can be installed from binary packages, downloaded from: http://www.mysql.com/downloads/
The only things you need to change in the php.ini file (/etc/php.ini) are:
pdo_mysql.default_socket=/tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock
You need to manually set the socket location for MySQL or it won't work with PHP.
Also, remember to set a value in date.timezone.
SVN and Git are installed automatically when you install the developer tools for Lion, which can be downloaded freely from http://developer.apple.com/mac (a free registration is required).
If you need Mercurial or if you aren't on Lion (so you don't have XCode 4), download the developer tools, then an application named macports, which provides ports for thousands common UNIX tools: http://www.macports.org/ . Once MacPorts is installed, you can install the required packages with a simple command:
sudo port install subversion
sudo port install git
sudo port install mercurial
I don't use any graphical tool for these SCM, so I can't really suggest you. I prefer the old, plain command line!
Developer Tools (the package with XCode) is required also if you want to use pecl to install custom extensions (the default distribution of PHP Apple ships doesn't contain some extensions like mcrypt, gettext and intl, just to name the three most important).
Speaking about editors... The one I really prefer and love is Coda. It's not free, but it's perfect if you want to develop in PHP: http://panic.com/coda/ .
It's also integrated with SVN (but we use Mercurial so I never used that option!).
For (S)FTP, I recommend you Cyberduck, which is free (open source): http://cyberduck.ch/ . Another really good client should be Transmit, but it's not fee (it's from Panic, the same company that produces Coda): I've never tried it (I'm really happy with Cyberduck!), but I heard thousands of good opinions about it.
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.
I've found myself down a rabbit hole and would like advice. It looks like Mac OS X 10.5.8 comes bundled with a pre-configured version of Apache 2.2.11 (located in /usr/sbin), PHP 5.2.10 (located in /usr/bin) and subversion 1.4.4 (located in /usr/bin). I have installed MAMP for MySQL 5.0.41 (located in /Applications/MAMP/...) which comes with Apache 2.0.59 and PHP 5.2.6. The current version of MySQL is 5.1 (mysql.com). I have also installed the latest Subversion binaries 1.6.5 (they get located in /opt/subversion/...). This is becoming a mess. Ideally I would like to have one copy each of Apache, PHP, MySQL, and Subversion and have them all be the latest release and have them work together properly. Are there configuration pitfalls specific to the Mac that I need to watch for if I install the newest binaries of Apache in /usr/sbin, PHP5 in /usr/bin, subversion in /usr/bin, and Mysql in /usr/bin (or /usr/local/bin)? Am I just asking for trouble?
Do not install ANYTHING in /usr/bin or /usr/sbin. Those are managed by Apple and you can get yourself and your system in trouble when you start modifying stuff there. Other than a bit of wasted disk space, there's normally no problem with having more than one copy of things like Apache. Just accept it.
If you need newer or missing versions of open source packages, you might want to look into using MacPorts or Fink to supplement what's provided by Apple.
My personal preference is just not to do this development on my Mac at all, and instead run a Linux Virtual Machine using VMWare Fusion, VirtualBox or similar. One of thes nice things about VMWare Fusion 2 (not 3 though, bizarrely) is that you can run these virtual machines in headless mode, and simply SSH into them via terminal on your Mac.
The benefit to me here is that my VMs are able to very closely mirror the setup of my production machines, I'm able to closely control what software is actually installed on them, and if I need to work on a new machine I can simply copy the VM from one machine to another. I can also easily take snapshots of the VM at any point, and roll back to them if I do manage to muck something up.
Here's a good guide to using VMWare Fusion for doing development on OSX.
I have been developing for the LAMP stack on a Mac for bit over 4 years now. I have tried pretty much every flavor of the stack on the Mac.
Native: Not viable, because it's an old codebase.
MacPorts: I ran into trouble with OS X updates.
Self Compiled: Same as with the MacPorts, I ran into trouble with OS X updates.
MAMPP: I didn't like this package, yet this is a personal dislike. I kind of disliked it's freemium like style. The package is not easily configurable, except using the commercial configuration software.
XAMPP: I ended up sticking with XAMPP.
About XAMPP:
The XAMPP code base is rather up to date. With the Developer Package, you get all the tools necessary to compile additional extensions. Everything is configured in /Applications/XAMPP/etc/.
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