I get errors with some WordPress themes (Layers and Dynamic Website Builder) when using UwAmp and versions of PHP 7. With Layers there is an error about an empty category array and with Dynamic Website Builder, the admin pages cannot be reached (connection reset).
I have UwAmp 3.1 and have tried PHP 7.0.3 and PHP 7.1.1. There are no errors with PHP 5.6.18.
I installed the Visual Studio redistributable when I installed UwAmp. At first, I thought it was a problem with the Themes and maybe PHP 7.1.1, but I tried PHP 7.0.7 using the Uniform Server and those themes worked fine. That lead me to conclude it is more likely related to UwAmp.
There are no related errors in the Apache log and even though logging is enabled for PHP and I specified a log file in the INI file, there are no PHP error logs. I have not enabled or disabled any PHP extensions.
I suspect it may be something missing from the UwAmp versions of PHP 7.x. Any ideas?
Thanks.
So it is not an issue with UwAmp. I found that there was a change with PHP 7.1 where empty string arrays must be initialized. Previously PHP would handle it automagically. You can see a discussion of it here: https://github.com/spotweb/spotweb/issues/243
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.
This question already has answers here:
program cant start because php5.dll is missing
(9 answers)
Closed 6 years ago.
I have a Win 2008 r2 server that has been running PHP 5.3 and convinced client to upgrade to 5.6.19 which is the latest available at the time of this post. This instance runs Apache 2.2.
Because I want to keep this instance lean but able to move back to 5.3 if I failed I downloaded the non-thread-safe version. I've updated the soon-to-be commissioned php.ini (formerly the example production file) to be aligned with the params in the 5.3 php.ini. Then I pointed the server's PATH from the 5.3 folder to the new one containing the 5.6.19 files. I have not attempted to run Apache yet opting instead to test that the new PHP works at least with CMD. That's when I got the above message.
It would seem the consensus of these posts:
http://www.touchoftechnology.com/the-program-cant-start-because-php5ts-dll-is-missing-from-your-computer-error/#ixzz42KMHyQFz
program cant start because php5.dll is missing
that I should rename the php5.dll file to 'ts' or 'nts' in its file name and/or add this designation in the php.ini. But I don't see where to put it in the .ini file. Renaming php5.dll (from the installation files) to php5nts.dll returns the message that php5.dll is missing. I've tried many different combinations of these filenames, and even adding a php5ts.dll from a thread-safe distribution. I can't get one without the other.
One of the posts suggests adding the 'nts' to some of the Zend extensions but I'm not running zend on this production box. Where in the php.ini do I need to set the file I got (php5.dll) to solve this? I hope once I get the CLI working that the Apache should not have this problem.
Other comments say to run Microsoft's Platform installer but that seems to introduce more things that are not needed on this production box and I do not want any extra baggage. I just want to point Windows and Apache to this newer PHP install.
I had read that for early Windows OS I should use the non-thread safe version of PHP. That version is missing the php5apache2_x.dll which caused doubt about this package. An acquaintance said to use the thread safe version which had the php5apache2_4.dll. It seemed to work in the Windows CMD browser after I set my environment variable to that folder. But digging further, it appears that I should also upgrade my Apache to 2.4 as later PHP and later Apache are using different Visual Studio compilers.
I'm using Ubuntu 12.04 LTS and needed PHP 5.4 so I'm using Ondřej Surý's (php5-oldstable) package.
Both phpinfo and the CLI show that JSON is enabled:
#php -i | grep -i json
json
json support => enabled
json version => 1.2.1
My application mostly works. But periodically (approx one page refresh in ten) there is a PHP error. This only happens intermittently.
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/json.so'
- /usr/lib/php5/20100525+lfs/json.so: cannot open shared object file:
No such file or directory "json.so"
How do I fix this?
I think that possible culprit (as I have answered in email) is that you are loading json extension somewhere from the configuration file.
The JSON extension is compiled in the core for PHP 5.4, so you should not load it by hand.
Please check that you don’t have:
json.ini somewhere in the /etc/php5/{mods-available} left over from previous PHP 5.5 installation
you are not loading JSON extension from the mentioned script, e.g. no dl(json.so).
Make sure you have stopped and started Apache2 (same applies to php5-fpm) when changing major versions. The symptoms might indicate that there was some stuck Apache2 thread with previous PHP from package loaded (that would be PHP 5.5 with json-c based JSON extension in this case).
Since you're saying that the json extension is loaded in phpinfo()'s output you could be dealing with a bug. Have you checked if the module file is actually there in the filesystem?
You have the following options:
Compile PHP 5.4 from source with Apache 2.4
Upgrade to the same repo's stable version which will give you PHP 5.5 + Apache 2.4.
Submit a bug with the Ondrej in Ubuntu's PPAs and wait for it to be resolved.
For more information check the debphp site.
Submitting a bug is a must, since if it is a real one it must be fixed for all users.
You could firstly go with option 2 if you don't conflict with the Migration guidelines like backward compatibility, deprecated functions, etc.. SO check it and decide.
It also strongly varies depending on the machine you have to do this with. If it is a critical production server, you may not want to compile of change versions on it. Go file the bug and see what the package maintainers have to say about this.
Also please write a reply here when your problem is resolved. I am quite curious as to what it is and hopefully was. :D
One point that doesn't diagnose or solve the issue (and seems to refer to PHP 5.5), but might help with tracing its root cause:
This Debian bug report and Phil Sturgeon's blog explain that some Linux distributions have chosen to replace the official PHP implementation of ext/json with the drop-in compatible pecl-json-c. The rationale was that Douglas Crockford's implementation contains a non-free clause in the license ("The Software shall be used for Good, not Evil"). See also this blog post.
I'm hoping someone can help me with this, as I've kinda hit a wall. Here's the situation:
I'm currently setting up a knowledge base using MediaWiki. I'm using XAMPP to aggregate my tools. The site itself is working fine, and coming along nicely.
I'm now trying to set up a cache to speed things up. I've opted to use PHP APC, as it is recommended for MediaWiki. The troubles started here.
Current versions are:
PHP: 5.4.4
Apache: 2.4.2 (apache2handler)
SQL: 5.5.25a
XAMPP: 1.8.0
MediaWiki 1.19.1
I am currently using Windows, so the first issue I had was finding the correct php_apc.dll file for my PHP. I tried numerous versions unsuccessfully (with log errors stating the .dll cannot be found). I eventually was able to secure a version which seems to work, APC 3.1.14 for PHP 5.4, downloaded from http://dev.freshsite.pl/php-accelerators/apc.html. It is the TS version, as this option is enabled on my PHP.
Now, with this presumably correct version of APC, Apache is now able to start fine. phpinfo() also shows the APC extension as available. The problem is now that no pages on the wiki will load. Precise situation is that:
All pages on the Wiki do not load (IP/mediawiki/*)
Pages on XMAPP itself do seem to load correclt (IP/XAMPP/*).
Other utilities are not able to load either, (e.g. phpMyAdmin).
No error messages seem to be created either in apache logs or php logs. Now, I am by no means an expert on this.
I have confirmed that environment variables in Windows TMP and TEMP both point to the same folder (C:\WINNT\TEMP), on which I gave "everyone" full access rights.
Here is an image showing the phpinfo() for APC that I can see:
http://i.stack.imgur.com/hYHwP.png
Any ideas?
edit: I forgot to mention: there actually are 0kb sized files that seem to be related to APC being created under c:\winnt\temp. For instance, one of them is called ".apc.a02684".
This has come up previously on the MediaWiki Support Desk. MediaWiki apparently doesn't run under Apache 2.4.
I've followed the answer to this question to the letter:
Connection between MSSQL and PHP 5.3.5 on IIS is not working
I'm using XAMPP with threadsafe 5.3. I've copied the files to the extension directory (while leaving them in the /php folder) and I've added the extension lines:
extension=php_sqlsrv_53_ts.dll
extension=php_pdo_sqlsrv_53_ts.dll
When I do this, Apache fails to start, giving me errors in eventvwr like:
Application popup: Warning : PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_sqlsrv_53_ts.dll'
- The specified module could not be found.
Except, obviously, that that file DOES exist in that spot, and php.ini is pointed at that extension directory.
What's the problem?
Windows reports this when a shared lib dependency of what you're loading is missing. Use depends.exe to view the dependencies of php_sqlsrv_53_ts.dll and make sure it's either previously loaded or in the shared library search path.
http://www.dependencywalker.com/
See below url
php_sqlsrv.dll: gives error when checking PHP version but extension works
Read it:-
Since PHP 5.3, Microsoft has a new driver for windows :
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Maybe you can try this version, which seems quite recent (06/2011)
Hope that helps !
Sadly, none of the answers addressed the issue or were avenues I had already explored.
I have decided to use the ODBC drivers with a SQL Server connection string, which seems to work fine, minus the fact I can't use MSSQL and SQLSRV native functions.
I have written a page that might help when installing the SQLSRV driver:
http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html
Unfortunately the instructions got complicated when MSFT removed the download for the old XP/2003 driver (version 2.0), so read the whole page before starting.
Wrong technology, but I was having problems getting WAMP to connect to MSSQL, with the same types of errors.
I fixed the problem by installing the 32-bit version of WAMP (instead of 64, even though we were on a 64-bit system).
Even if that's not applicable to the OP, I hope someone finds this helpful!
I was getting the same error messages when I started the Drupal 7 stack after installation. I am using VM Ware with Win 7 x64 and acquia-drupal-win-7.31.36-6159.54300.
I went to the PHP site http://php.net/manual/en/sqlsrv.requirements.php and installed the x64 Package.
steps
1) Stop Drupal Stack
2) run the file: sqlncli.msi
3) restart Drupal, and no error messages.