Hi I've installed XAMPP and I want to use the PHP that comes with it from the command line.
So I'm looking to disable the Apple version of PHP and related tools.
Anyone know a clean way of doing this, while allowing Apples PHP to be re-enabled again relatively easily?
Turning off web-sharing (Sys Prefs -> Sharing) will let you set XAMPP to listen on :80, and it will use it's own version of PHP.
For CLI, you can setup an alias in your .profile to point at the XAMPP version or put the XAMPP bin folder (wherever the php executable is found...) in your PATH, ahead of /usr/bin
I'd suggest to uninstall the apple php package. You can reinstall it anytime...
Of course you would have to tell osx to use XAMPP 's php interpreter instead of
the on board one.
Basically this should be sufficent to achieve the change in the file handling.
Related
I am working on an older project that uses functions not supported by the newer PHP version included in my version of XAMPP.
I want to temporarily change to an older version of PHP, so I'm looking for a way to switch between PHP versions in XAMPP.
Unfortunately, refactoring to use the newer version of PHP is not an option.
I would not dare to 'temporarily' shift my development machine.
I would suggest installing a virtual machine manager like VirtualBox and then install a older version of XAMPP in there.
I am really disappointed with the responses on this.
WAMP allows you to switch between PHP and MySQL versions pretty easily...
I did following steps on Windows:
Download your XAMPP with your desired PHP version (the VC-11.zip version)
Unzip on C:/xamppXXXX/ (XXXX -> Your PHP version, for example), so you'll have both C:/xampp/ (your first installed version) and the new.
3a. Find in all .conf, .ini, .bat files from the xamppXXXX folder /xampp/ and replace for C:/xamppXXXX/. You can use any IDE like SublimeText to find the string.
3b. Find in all .conf files from the xamppXXXX folder \xampp\ and replace for \xamppXXXX\
You can start MySQL from your installed version control panel and open the C:/xamppXXXX/xampp-control.exe and launch Apache from this one.
I did this with php7 installed and php5 from zip and working fine. Opening different instances of XAMPP Control Panel is the best way to have all databases together and not losing them between versions.
Dont' use XAMPP for this. Use MAMP. It's a single click
I need help with this issue. I'm trying to install php in my netbeans but i dont know exactly how to do it. The netbeans version i'v downloaded already have PHP installed (i can create a php project). But, for some reason when i run the project, nothing happens. I dont really think i have Apache Tomcat installed in my netbeans, that what i need help for. When adding the "tomcat 6.0" server, this information is needed:
server location (catalina home)
username
password
I have no idea what is that. I would apreciate help on this - How to install PHP + ApacheTomcat on neatbeans.
Apache Tomcat is for running Java apps. You'll be wanting Apache HTTP server instead.
I've always kept the installation of Apache and netbeans separate, I would:
Install Apache on your system - doesn't matter if Windows or Linux, just follow install instructions.
Find out the Apache directory that you will add your php files into. That's usually /var/www/ on Linux, don't know about Windows.
Create a new PHP project in Netbeans and configure it to use sources from the Apache directory in #2. Say for a project called teststuff I create a dir called /var/www/teststuff/ and create a Netbeans project inside there.
You should be able to browse to http://localhost to see your new server running.
Iam not able to get familiar with XAMPP interface on Windows7 (Only prior experiencxe is with HTML,C,C++).
How to proceed to begin development work in PHP and MySQL and test developed contents using Apache Server.
Please help to understand its working flow.
Thanks in Advance.
First, find a good PHP book or tutorial to learn PHP. There are plenty out there, just Google or visit the PHP homepage.
As you follow the book or tutorial, save your .php files in the XAMPP htdocs folder. This will let you view your results using the XAMPP web server. For example, if you write a PHP script called test.php and save it in the htdocs folder, you can access it on your local XAMPP server via http://localhost/test.php.
XAMPP includes phpMyAdmin, which lets you manage the included MySQL database. You can learn more about phpMyAdmin here.
Be sure to read the XAMPP documentation so that you know how to start up Apache and MySQL and access phpMyAdmin.
XAMPP is only a service that provides a webserver, server side language (PHP), database and interface to connect to said interface. Once it is installed you are good to go, all you need to do is turn on Apache, then MySQL. All the rest of the installation requirements should be done automatically upon installation.
Maybe it is better to explain your particular issue...
I was beginning from Denwer. It was very easy to begin with him. He includes php, mysql, apache.
http://www.denwer.ru
You have to run the Apache server for php and the MySQL server for MySQL :D. You can run it by starting the XAMPP Control and than run them. Now you can go to the localhost http://localhost/
There are some instructions.
I hope it is useful.
Marcel
Do you really need XAMPP? Sumit, I also have Win7/x64 on one machine, where I installed
Apache 2.2.16 for 32bit Windows
PHP 5.3.2 (x32 Windows VC6 install binary)
Perl 5.12.1 32bit x86 from Activestate
MySQL 5.1 32bit x86 Windows installer)
I installed all-32-bit stuff (even if on 64bit Windows) because that guarantees you a much simpler life. You can handle or maintain every component individually, for including PHP or Perl into Apache, you just change a line or two in the Apache config file. There's no magic at all with all these programs. Install them by yourself and learn a lot in the process.
I want to do a sample program in PHP on Windows XP.
Do I need any special software to get this to work?
I am afraid that I simply open notepad type the PHP program and save it with php extension. Then I open it with the browser as a HTML file. But it does not work.
Please help
Thanks in advance
However you decide to install a webserver and php (or just php and use it in the console like someone mentioned):
Check out the PHP Manual, especially the Getting Started section.
Apache (Very, very easy)
Check out the WampServer getting started presentation.
Download and install WampServer.
And you are ready to go.
Microsoft (Not tested this myself)
Check out PHP on Windows.
Download and install the Microsoft Web Platform Installer.
Let me know how that work out... (never tried it myself, since WampServer is so easy)
You need to have a web server with PHP installed on your PC to make this work.
I highly recommend installing wampserver on your computer. It is a Windows installer that will put PHP, MySQL and Apache in your computer and let you manage all the services and such very easily. If you have problems getting it to work, you can also try out XAMPP, although I've never used it myself.
Some answers containing the hint for using wamp.
You should better use the Zend Server Community Edition.
This is also free and can be downloaded here:
http://www.zend.com/de/community/zend-server-ce
This contains Apache, Mysql, PHP and some Zend related Tools.
Benefit: its much better preconfigured than wamp.
Another easy one to set up (though it takes extra config to support PHP5) is easyPHP
you can simply install PHP, and then run the program and redirect the output
php foo.php > output.html
and then use any browser to open up that html file.
Since you have IIS on the windows cd I would suggest you go to control panel, install/uninstall programs and click on windows components and install IIS. Then install ASP.NET 3.5 from www.asp.net and finally install Phalanger from http://www.php-compiler.net/
That will give you the benefit of both worlds, you can program in ASP.NET using PHP as the language, you can use only PHP if you prefer that or you can mix using ASP.NET/C# on some pages and PHP on other pages within the same application.
I use XAMPP, works out of the box with his installer and is more than enough for a simple developer windows environment.
The simplest way - use www.microsoft.com/web platform installer. get the whole stack to run PHP all from one place.
i would like to share that before starting PHP we have to set environment for that and then we can start working with PHP.
http://code.freefeast.info/php-tutorials/setting-up-the-environment-for-php-php-tutorial/
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