php SOLR extension is not loaded in wamp - php

I am trying to configure SOLR on PHP and using WAMP.Added extension in php.ini also pasted the
php_solr.dll in the extension directory.
Unfortunately the extension details is not appearing in my php info.
I am just confused that may be I am missing any configuration step/
Thanks in advance.

If you are using Linux then go to /etc/php5/apache2/conf.d/. If you find another .ini then create a solr.ini file, add the following line and restart the Apache service.
extension=solr.so
See my blog post for more information.
Let me know if you need more help.

I couldn't get that plugin to work and ended up going for solr-php-client from http://code.google.com/p/solr-php-client/
It does everything you need it to and you can include_once it into your scripts and know that you can deploy them on a standard PHP installation.

Installing Solr on Windows with Wamp
Solr is a great tool for full-text searching and more, from Apache Software Foundation. Its based on Apache Lucene search library and extends it. In this post I will let you know how to install Solr on Windows and integrating it with WAMP. Integration with WAMP is not mandatory if you are not using it.
The esyest way to install solr on Windows is to use Solr installer from BitNami. This can be found here http://bitnami.com/stack/solr. Download the installer and run it with administrative rights. Try to keep the installation path simple something like “c:/solr/” will be appropriate.
It will also install an apache server so if you don’t have wamp or apache already install than its super easy, just go with the flow. If you already have wamp installed than make this apache listen on some available port other than 80 (where wamp apache is listening).
Once the setup is complete Solr will be available for use in port selected during setup (see no big deal). Now if you have wamp and you don’t want to have two apache services running do the following steps.
Enable proxy_module and proxy_http_module via wamp menu or directly from apache conf file.
Open httpd.conf file and add following line at the end of the file
Include "c:/solr/apache-solr/conf/solr.conf"
Note that the path here should be correctly pointing to the solr.conf file. Use the path where you installed the Solr.
Now restart the wamp apache via wamp menu. If it starts correctly than its cool, otherwise check if you have correctly enabled the said modules, and path to solr config file.
Now check http://localhost/solr/ this should show the dashboard for solr.
Remember the extra apache service we need to disable it so it does not start automatically as we don’t need it. So goto Control Panel > Administrative Tools > Services , double click “solrApache” service and change its “Startup Type” to “Manual”. Now it will not start once your system is restated.
Happy solr searching

Related

Using Pthread in Azure web app in a PHP site

I have a webapp (PHP site using CodeIgniter) hosted on Azure. I have a situation where I want to use the pthread module. Since pthread is not available in PHP out of the box, when I install it using Xampp server, I suspect that it won't be possible to use threading on Azure.
But I am not sure. Azure documentation also doesn't talk about it. Is there a way I can use it pthread on Azure?
I am able to use it on my local Windows machine, using pthread.dll.
To enable extension in Azure Web APP, we should customize PHP runtime on Azure. Please refer to official site.
For this issue,I have tried to install pthreads successfully. And I toke those steps as following:
1, I obtained a PHP 5.4 (5.4.43) VC9 x86 Thread Safe package from PHP site explored to folder named PHP. And followed the pthreads site, got the lasted version of pthreads.
2,Added pthreadVC2.dll (included with the Windows releases) to the same directory as php.exe and added php_pthreads.dll to PHP extention folder.
3,I uesd phpinfo() to find default php.ini file in Azure, which should be similar with the picture:
,
Then I browsed Kudu Console of my web app via https://<your_web_app_name>.scm.azurewebsites.net/DebugConsole/?shell=powershell.
Locate to the directory found above. Download the content to local saved as php.ini in the PHP directory. Uncommented extension_dir = "ext" in this file.
4, Add a bin directory to your root directory (for example, bin\php), and use FTP tool to upload the PHP runtime on it.
5,Browse to the web app in the Azure Portal and click the configure tab.
Add *.php to the Extension field and add the path to the php-cgi.exe executable at the Handler mappings section.
At last, we check the PHP env,we should see the result as below
and run the test code of pthreads to check the extension
If you have any concern, please feel free to let me know.

On Windows 8 and Internet Information Service 8.5 - how to setup PHP?

Let me begin by saying that I am very new to Microsoft's Internet Information Service. I need to setup IIS on my PC and it should also execute PHP files. So far I got everything installed and running - the latest PHP and enabled IIS service. I can view the Default Webpages (*.html) files ONLY. It will not execute PHP files. If I try to request any PHP files, I get 403 error.
I have been researching online and seems to be more confused about setting up PHP (extension) on IIS. Some websites say you need to configure PHP through its MANAGER. Others say I need to add Role and FastCGImodule through IIS manager. According to Microsoft I need to rename php.ini-development to php.ini and point php to some DLL file.
I am using Windows 8, IIS 8.5 and PHP 5.6. I hope someone could point me in the direction.
You can set this up manually or with the IIS Manager. I would set this up my own, so you know whats going on.
You will need to setup the CGI role feature. This includes FastCGI. Here is some information how to do that: http://www.iis.net/configreference/system.webserver/cgi
Then you will need the PHP package somewhere. Lets say in C:\PHP. You can change that if you want.
You will need the fastCGI settings. You can easily set this up by commandline:
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='C:\php\php-cgi.exe',activityTimeout='1200',requestTimeout='1200',arguments='-c%20C:\php\php.ini']
This example uses a timeout of 20min.
This will set the handler:
%windir%\system32\inetsrv\appcmd set config /section:handlers /+[name='PHP_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='"C:\php\php-cgi.exe|-c%20C:\php\php.ini"',responseBufferLimit='0',resourceType='Either']
php.ini setup:
[cgi-fcgi]
fastcgi.impersonate=1
cgi.force_redirect=0
cgi.fix_pathinfo=1
For write access you will need to grant "modify" access for the the IURS.
More Information: http://php.net/manual/de/install.windows.iis7.php
I did try the answer posted to heart, but I kept running into problems. In fact, I also followed the Microsoft step by step PHP setup tutorial to the TEETH. I still couldn't get PHP working on my IIS. Although Microsoft warned against using Windows Platform Installer(WPI), I downloaded WPI and ran the installer. Under frameworks, I found PHP 5.6 and clicked on Add button. Then, clicked on the Install button. It took only about 30 seconds to install. Just to be sure. I checked IIS manager and there it was PHP Manager. After opening PHP manager I noticed that all the settings were there and enabled and it already had 15 different extension enabled. Plus, it also had about 35 extension disabled, but it gives you option to enable them right there.
Now, my PHP files are rendered as expected. I even did phpinfo(); and the browser displayed all the PHP settings and information. :)

Can't check services module in xampp

xampp v3.2.1 do I need to check the service module first so that I can view it on localhost?, because I can't see my sample.php in localhost.
I noticed the checkbox is disabled:
and another one how do I normally open my sample.php. the localhost in the browser always
redirect me here: http://localhost/xampp/index.php ..which is the mainsite of xampp. hmm.
Please help, I'm a novice in php using xampp. Google almighty can't find me a solution.
You must start the XAMPP Control Panel as Admin. Go to your XAMP directory, usually its C:\XAMPP\, look for the "xampp-control.exe". Right click on that and hit "Run as Administrator." After confirming the UAC or user account control, you should be able to check and install Apache and MySQL as services. That works for me so it should work for you too as I can tell on your screenshot, we run the same version of XAMPP. Goodluck.
First of all make sure that you haven't installed XAMPP Lite (and portable) version.
Only the full version provide the use of services because Windows needs absolute paths to launch these.
For your redirection problem you will have to tweak apache's configuration files (httpd.conf and/or httpd-xampp.conf). Use the XAMPP Controller's "Config" buttons.
You will have to create aliases for your web folders, see: Apache mod_alias
-Just Run "xampp-control.exe" as administrator
-and stop apache service action port.
-and tick this(in snapshot) check box it will ask for install as service just install it
-then go to service.msc where you will see
-new service name as apache2(or similar)
-just set it as automatic if you want it to run as startup.
(this method is for apache for mysql you will do same above steps)

Installing PHP+ Apache on netbeans

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.

Install PHP on XP / IIS 5.1?

I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP script from my localhost test directory that I created, I get a slew of missing DLL errors. I have seen posts out there which indicate that its possible and has been done. I dont see any bug reports for this MSI at PHP.NET support. Any ideas?
Not sure if you already have this but I use WAMP from http://www.wampserver.com/en
It's easy and simple to set up, it has an icon in the system tray to show that its active and you can make it go online or available to the outside by clicking the icon and setting it. I used this when I was first learning PHP since it has everything in one, no need to setup any other service like IIS.
Probably the installer didn't configure your server to use PHP properly. Check out Microsoft's page on enabling PHP on IIS or alternatively switch to Apache if that's a viable option.
I'll see if I can remember it correctly:
Unzip PHP zip file into c:\Program Files\php (or run the installer)
Copy php5ts.dll into c:\windows\system32
Copy php.ini.dist into c:\windows and rename it to php.ini
Edit c:\windows\php.ini and look for extension dir - make it point to c:\Program Files\php\extensions (or wherever you put it)
This is where my memory gets fuzzy: Edit your IIS application settings, add a script map for .php files, and set the executable to php5ts.dll
Profit!?!??!?!

Categories