Ok so I have seen other questions regarding this but I still havent come right.
I need to connect to rabbitmq from php but I am using wamp on my windows machine.
I have seen that I need to download a pecl .dll. I have download a few but I still cant get it working.
Has anyone got this working if they have please tell me how.
Thanks
Have you look at AMQP PHP Extension?
http://www.php.net/manual/en/amqp.installation.php
This can be very easily achieved with php-amqplib .
This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.
Requirements: PHP 5.3 due to the use of namespaces.
And thus it works perfectly on windows too :)
Related
See, i'm trying to use OpenCV in Php, but i cannot find a proper way to do it. Neither in stackoverflow.
Over the internet, i found two different ways to try:
Using this git. https://github.com/mgdm/OpenCV-for-PHP
Problem: This code uses the dl function to import extensions on real-time execution , which has been removed from the last php versions (5.3 to 5.6 i think)
Solutions i've tried:
Link the extension .so at the php.ini file.
Problem: The code dosen't has any opencv.so file
Downgrade my php 5.6 to 5.2
Problem: Incompatibility with other parts of the code.
Using OpenCV Pecl package. http://pecl.php.net/package/opencv
Problem: The web shows the package but it has "no releases available". Neither if i try to download it on Centos using "(sudo) pecl download opencv". It gives me the same message, "no releases available. Download failed".
The thing is that i've seen a face-detection algorithm done with openCV over php, so i guess it is possible to use this library on Php. Anyone knows how?
Thank you in advance.
OpenCV has only C++ and Python implementation ,and its strictly machine vision library,However if you write "web service" say Json to interact with the machine vision script ,you can then access it via php client request.
image--->'json'--->python facedetect---->image--->'json'---->php
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
I am very new to php.... please tell me the most easiest way to install it and run a sample app, some tutorials which do that....
I read something on internet but most of the time, all the tutorials were not ok... so i decided to ask here to find someone's else opinion...
Thanks
If you're on Windows, you can use WampServer which is pretty straightforward (just click next 3 times and you have Apache+mySql+PHP. For you development box of course (not for production).
In windows I would use WAMP or XAMP, in OSX I would use either the Native php installs or MAMP if you want to make it easy to configure.. On linux you should compile it from source.
Edit: As samuel says, only use these on Development machines, you should always compile your own versions for a production box!
You could use the MS Web Platform Installer.
I use AppServ it sets up Apache/PHP/MySQL and phpMyAdmin in about 5 clicks!
I'm getting started with a side project that will be developed using PHP and I'm looking for guidance on getting my Windows machine up and running and ready for development (as quickly as possible). Being that PHP development is more geared towards Linux users/developers (which I am not), I'm trying to figure out how to get all the pieces in place to get a 'WAMP' stack operational locally on my Windows machine.
Any good tutorials/quick start guides out there and if not, does someone have all the steps that they could provide me with here?
Install Apache Friends XAMPP.
PHP on Windows:
Install Xampp because it is really easy to install.
Use version control system like for example git to store your code.
Use an IDE like netbeans/eclipse/aptana for faster PHP development(autocomplete, code formatting, PHPdoc, etc).
Learn a PHP framework like for example codeigniter to ease your development. The video/screencast to create a blog in 20 minutes will learn you how to use it.
Practice TDD to test your code, which will result in more stable code-base.
Good luck coding!
Learning Linux/Ubuntu:
As a sidenote when installing ubuntu which is really a straight forward process you will see that using linux isn't that difficult as you think(It used to be difficult compiling source manually etc). when you install a dual boot and play with every day. I guarantee you that in no time you will really love linux like I do. I really think linux is the best option for coding. Also redis main creator shares this opinion with me.
Probably the quickest way to get a PHP server up and running on Windows is WAMP 2.0. Wamp Site. I use it on my Vista machine. Download it, run the 'exe', and start coding. It is only 16 MB but it is powerful and very simple to use.
Why not go the official Microsoft route:
Microsoft Web Platform Installer 2.0
installs both PHP (to run in IIS) and MySQL.
My two cents. I use Netbeans for my windows PHP development. Here is a quick start guide
As previously mentioned, XAMPP is probably the easiest and fastest way to get started with PHP. Search installing xampp on youtube, they got a good video on how to install it to your system.
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/