I am trying to run php on my computer, but I have encountered series of problems when loading modules. This is the most recent one and I would be very happy if someone could help me out. I have been searching the net for a solution all day, but nothing has done the trick yet. I am using XAMPP.
So I get this error
httpd: Syntax error on line 182 of C:/xampp/apache/conf/httpd.conf: Cannot
load C:\xampp\apache\modules\mod_userdir.so into server: %1 is not a
valid Win32 application.
This is the line I added to the httpd.conf file.
LoadModule php7_module "c:/php-7.0.1-Win32-VC14-x64/php7apache2_4.dll"
I have installed both the php and apache for thread safe win64
Any suggestions?
Related
this is probably something simple but I have a problem with my local server. I set up a local server for building websites about 3 months ago and it worked fine until last evening the php will show as text instead of being executed by apache. I'm on a Mac. When I type:
$ apachectl -S
in terminal I get this error:
httpd: Syntax error on line 173 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so, 10): image not found
I have not been able to find a solution. Any help is appreciated.
I am using LiteCart opensource e-commerce platform. When i run xampp server, apache and mysql server starts without any error and warning. But when i open browser and hit the url to open my installed litecart application it gives me an error
I also checked for online solution but nothing happened.
Can anyone will help me in this.
Problem details:
Problem Event Name: APPCRASH
Application Name: httpd.exe
Application Version: 2.4.17.0
Application Timestamp: 561cc534
Fault Module Name: php5ts.dll
Fault Module Version: 5.5.37.0
Fault Module Timestamp: 576b2166
Exception Code: c00000fd
Exception Offset: 0005a5ba
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 64c6
Additional Information 2: 64c64714e3c644daeb62f47ad597dc84
Additional Information 3: 36e8 Additional
Information 4: 36e8add2564fc225e8a656ba7214b7ab
To fix this problem:
Stop the Apache web server from the XAMPP control panel
Choose httpd.conf from config menu on XAMPP control panel
Insert this code to the end of the file:
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</IfModule>
I guess, It's a memory problem.
Search “memory_limit” in your php.ini, and change the value of it.
If no “memory_limit” found, add the following line at the end of php.ini:
memory_limit = 128M ; /* Change the 128M to your needs */
Save file.
Restart Apache.
This happens because of errors in you java code.
First of all check your tomcat or GlassFish logs.
Then just debug your code, and you will find your problem.
I've been away from Laravel/Unix for some time but I have a project to setup and hit some snags. The most recent version of Laravel required PHP >=5.6 so I got that updated, setup my new project with laravel new project and made some modifications to the user/group permissions for storage/ and bootstrap/cache folders as normal.
I'm getting HTTP/500 error from Nginx so I checked the error log and I'm getting this in /var/log/nginx/error.log:
FastCGI sent in stderr: "PHP Message: PHP Fatal Error: Class PDO not found in /home/user/public_html/project/config/database.php on line 16" while reading upstream ... upstream: "fastcgi://unix:/var/run/php5-fpm.sock"
PHP Version 5.6.28-1~dotdeb+7.1
When I check /etc/php5/fpm/php.ini the normal extension=pdo.so and extension=pdo_mysql.so were not there so I added them to test it, however those are being requested in the conf.d folder and PHPINO shows those files being scanned/loaded.
However, later in PHPINFO results, PDO/PDO_MYSQL is not listed
UPDATE
I just attempted to use find /-name pdo.so and the same for pdo_mysql.so to find the path to those files and manually modified the loading configuration files to point to them correctly, started the server and that doesn't change anything.
I apologize this is long. I've spent a couple hours scouring to make sure I wasn't just missing something silly, and I may still be.
Any ideas overlfowers?
Well, after much consternation and fiddling I figured this one out...
There was a recursive / endless loop being created in the php-fpm.conf config as shown here:
include=/etc/php5/fpm/*.conf
This was causing PHP5-FPM .conf to attempt including itself, which I caught in a bootup error: Failed to load configuration file /etc/php5/fpm/php-fpm.conf from /etc/php5/fpm/php-fpm.conf
So I modified that to include=/etc/php5/fpm/conf.d/*.conf and everything started back up and now PDO/PDO_MSYQL is loading.
I've been battling this annoying issue for quite some time now, and it's bugging me a lot that I can't find any fix for it.
When I use "tail -f" to my error_log file to check for errors on my webserver, one specific error keeps popping up all the time, every visitor and page-refresh generates this issue.
I've been googling and searching here on Stack Overflow for a looong time, but nothing is directly related to the problem.
So the error that is thrown looks like this:
[Fri Aug 17 00:16:23 2012] [error] [client xx.xx.xx.xx]
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/openssl.dll' - /usr/lib/php5/20090626/openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0, referer: http://mysite.dk/
What could I do?
I have tried to remove OpenSSL, and re-installed it again with no luck. I've tried to upgrade every PHP-related package and still didn't work.
grep -ir ssl /etc/php*
gives:
/etc/php5/cli/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/apache2/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/apache2/php.ini.saved_by_psa.08.03;20:24:;extension=openssl.dll ; moved to conf.d/zend_extensions_psa.ini by Plesk
/etc/php5/apache2/php.ini:;extension=openssl.dll ; moved to conf.d/zend_extensions_psa.ini by Plesk
/etc/php5/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/cgi/conf.d/zend_extensions_psa.ini:extension=openssl.dll
So you've got four copies of zend_extensions_psa.ini and all of them are trying to load this nonexistent file. Edit them all, delete or comment out the lines mentioning openssl.dll, and all should be well.
The Debian package management system treats your modifications to configuration files with great respect. It doesn't undo them when you upgrade or reinstall a package unless you remove the the package with dpkg --purge or install the new one with --force-confnew.
It could be that you have something like this in your PHP configuration (php.ini maybe):
extension_dir=/usr/lib/php5/20090626/
and then
extension=openssl.dll
And it could cause a problem because there is no file like that in a given path. This could be caused by manually copying extensions and/or different extensions installers.
I am getting both modules listed as installed / configured when I use:
php -m
or if I use:
php -i
but when I use:
$m = new Memcache;
// or
$m = new Memcache();
// or
$m = new Memcached();
//or
$m = new Memcached;
I get the following error:
Fatal error: Class 'Memcached' not found
I am running on a Mac - OS X (10.5.7) with default install of apache & php. Additionally, I have memcached running as a daemon on 127.0.0.1:11211 and libmemcache as required by the php-memcached library. I have restarted apache tons of times and even done a machine restart.
Does anyone know why the modules/extensions show up in the command line but not in my phpinfo()? I am literally stumped, after 3 hours of googling, I am just about ready to give up.
Also, please note, my phpinfo() outputs my ini files as follows AND they are both the exact same file:
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /private/etc/php.ini
UPDATE:
Apache is failing to load the extension.
[Fri May 14 04:22:26 2010] [warn]
Init: Session Cache is not configured
[hint: SSLSessionCache] PHP Warning:
PHP Startup: Unable to load dynamic
library
'/usr/lib/php/extensions/no-debug-non-zts-20060613/memcached.so'
- (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load
dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20060613/memcache.so'
- (null) in Unknown on line 0
Does anyone know why or how this would happen? Both of the files referenced above DEFINITELY ARE there. Should I move this question to server fault?
Your webserver is probably using mod_php, which is a seperate bit of code from the standalone (CLI) interpreter. If they are both using the same ini file, and the memcache extension is configured in the ini file, then it sounds like for some reason, the mod_php is failing to load the extension - check your webserver error_log for startup errors.
It may be that the mod_php was compiled without memcache support (most extensions need to have a stub file linked into the php code, even though the bulk of the code is not linked until run time). Or it may be a permissions problem on the shared object file. Or your webserver may be running chroot, and unable to find the extension (which would also mean that although the ini files appear to have the same path, this is relative to different roots).
HTH
C.
because both versions use different php.ini
place your php.ini into location noted in the phpinfo() outout
I would suspect that the issue revolves around permissions. When you run php from comand line, it runs as the user invoking it. When run as an apache module, it runs as "nobody".
I would assume that the memcached.so file, or the directory it's in does not have proper permissions.
I stumpled upon this post and was having the exact same problem with an extension in my php -i but not in phpinfo(). Mine was a permissions problem because of selinux on a CentOS machine. I had to change ownership and permissions and now it is working as expected.
Set php path in environment variables as given below.
Right-click on "My Computer"
Properties
Advanced Tab > Environment Variables
Under System variables, scroll down to find "Path", select and click on Edit.
Add path to your php install on the end (make sure to precede with semi-colon ";"). Example: ";C:\php7"
Click Ok.