Im on Windows 7, 64/bit running xampp v3.1. The php version is 5.4, Im trying to install memcache locally on the box so I can use memcache with php. I have searched google and followed directions about installing memcached.exe as a service, then downloading the memcache dll extension file for php and putting it into the ext folder under the php folder. I then add it to the php.ini folder, restart apache and memcache does not show up when running phpinfo() and when I try to run memcache via php it tells me this function does not exist. Can anyone help me figure this out? I verified the service is up and running, I tried different versions of the dll php extension file but still same issue. Any suggestions? Here is one site I used for instructions on installing memcache:
http://shikii.net/blog/installing-memcached-for-php-5-3-on-windows-7/
There must be some error logged into your apache logs. What is the error?
Looks like I grabbed the incorrect version of memcache for php. You must grab the correct memcache dll file for the php version you are using. I found the correct download here:
http://windows.php.net/downloads/pecl/snaps/memcache/3.0.6/php_memcache-3.0.6-5.4-ts-vc9-x86.zip
It has the correct php version, 5.4 and its thread safe. Once I downloaded it, extracted the dll and put into php extension folder and restarted xampp/apache, it now works.
Related
I am trying to get memcahe enabled on my Phpinfo().
Hi everyone, I am a newbie when its comes to working with memcache. So I have been trying to get memcache enabled on my php, but I have had very little luck.
According to my phpinfo() my php build version is API320190902,TS,VC15 and entails that I have to enable php_memcache.dll which is of the same VC (i.e VC15).
I have done that, by placing the php_memcache.dll file in my php/ext folder and enabling the extension in my php.ini by stating "extension=php_memcache.dll". But despite doing all this, I can't seem to get the memcache enabled, and my phpinfo() does not show the desired memcached section.
Additionally my Apache log states
PHP Warning: PHP Startup: Unable to load dynamic library
'php_memcache.dll' (tried: C:\xampp\php\ext\php_memcache.dll (The
specified module could not be found.)"
Can someone kindly help me figure out where I am missing it, or not doing right?
By the way, I tested this on Xampp and the .dll file was downloaded from the link https://github.com/nono303/PHP7-memcache-dll
Attached are screen shots of my Apache logs, php.ini, php/ext and phpinfo().
There are common things that are often encountered in PHP and Memcache(D) related issues:
Do you need the MEMCACHED or the MEMCACHE extension?
Is the MEMCACHED server already running? (in your case, that's not the problem yet)
Is the installed PHP extension x64 and Threadsafe compatible (as your system requires by looking at your phpinfo).
Personally, I use another PHP extension which works perfectly under PHP7 and PHP8:
memcached 3.2.0 for Windows
https://pecl.php.net/package/memcached/3.2.0/windows
Note: in addition to the usual DLL extension that you will copy to php/ext/ (and enable in your php.ini), you will also need to copy libmemcached.dll and libhashkit.dll to a directory belonging to your system path.
Hy! I'm trying to use oci on windows, I found some linked issues, but I don't have any xampp, or apache, or anything, I'm only using the php built-in server. I enabled the oci extension in the php.ini file, but it does not work. I was looking for answer. I don't need any oracle database, there is a database, I only want to connect it with my app. I have the error above every time, when I'm trying to run any php command. So it does not work. The missing dll file is there, so I don't understand, why is it missing. I installed pear, and pecl, but pecl installations need openssl, openssl needs visualC++ and some other things... is there any other solution? Even though why does it not find that dll, if it's there... I downloaded Oracle Instant client and Oracle SDK, I unzipped it, set the environmental variables, but nothing changed... Please, help!
You need to download the correct oci8_19.dll if not already there and placed it under your_xampp_directory\php\ext folder.
Enable/add this extension in your php.ini file.
Add environment variable path for PHP.
Then, you also need Oracle Instant client to load/run this properly. Download it from here. Be mindful about x86 or x64 architecture of your windows machine and download the one that matches your machine specs.
Add this Oracle instant client path too in your environment variable.
Restart command prompt and type php -v. Voila! It runs smoothly and shows you just the PHP version, which means your oci extension loaded properly.
I have an application where i need to connect my web (PHP based) application with desktop application database so that both desktop and web can communicate with each other.
On ubuntu OS connectivity is working fine but when i comes to windows 7 codeigniter sql server connectivity is not working.
i tried visual c++ redistributional packages as well as other instructions provided on many platforms but fails.
i also added extensions in php\ext and dll files as well as include that extensions like sql_serv55_nts like that but nothing is working.
last error that i am receiving is
application not be run as php5.dll is missing .
can some one help to figure this out as soon as possible and can send me proper tested procedure for this.
As you say you have installed the sql_serv55_nts version of the SQLServer libraries, this is your problem.
Instead install the TS (Thread Safe) version of the SQLServer libraries. XAMPP on windows runs Thread Safe.
The php5.dll is the Non Thread Safe version of php5ts.dll which is supplied with the XAMPP install of PHP.
Once you install the TS version of SQLServer libraries delete the php5.dll it is not required, also you got it from a source that you cannot be sure is safe. A simple rule of thumb If it was required it would have come with the XAMPP install.
NOTE: You should never need to copy anything related to Apache/PHP/MYSQL into the Windows system folders. If you do, when you come to install another version of XAMPP it will still be there and will cause you hours of debugging to find out why you are having odd issues.
ALSO: It is also dangerous adding anything XAMPP or WAMPServer related to the Windows PATH as this will also cause you issues when you come to update XAMPP/WAMPServer as you are bound to forget that this was done.
Try adding your php directory and your php extensions directory to your PATH environment variables.
I resolved issue in following way.
Install xampp with php 5.5
install microsoft re distributional package
download php5.ddl file from php5.dll
if window is 32 bit than just copy downloaded php5.dll into windows/system32
if you have 64bit window than you need to copy it into windows/SysWOW64 too.
best is to restart your PC
All done......
I need help installing the driver so I can use the mongo database in php.
This is what I have done so far:
I installed php and am using the built in webserver
I installed mongodb
I added the driver from https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
in to my ext php folder
I added
[Mongo]
extension=php_mongo.dll
in my php.ini file
I did everything right, but it will not load the module.
did I miss something?
I found it is not loading it because phpinfo() does not show it.
Maybe you are using the wrong extension on the mongodb driver, you could check that in here to see wich version of mongodb driver correspond to your PHP version, once you've done that, if you're using windows, you need to tell PHP to use the extension modifying the php.ini file adding the extension like this
Finally you'll need to restart your web server (apache or nginx) so you can use that extension, you verify that making a file with phpinfo(); in it and it should show something like this, if it does then you're ready to go
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!?!??!?!