edit on php.ini doesn't work - php

I have PHP in an Apache2.
When I do a modification in my php.ini, like uncomment a module to active it, it doesn't work.
In my phpinfo(), the Loaded Configuration File is on C:\php\php.ini, which is the right place.
I restart my Apache after every edition on the php.ini.
PHP run well on the Apache.
So why I can't active my module ? (Actually I'm trying to active the PDO driver for MySQL)

Uncomment this line to consider extensions :
; extension_dir = "ext"

extension_dir is the problem - make sure you have that pointing to the directory, where your DLL is.

Related

Settings of php.ini seem to be overwritten using xampp

I want to load some extensions, but my changes in the php.ini file do not have any effect. I have xampp installed on Windows and set extension_dir in php.ini to "C:\xampp\php\ext", which is where xampp installed my extensions. But when I call phpinfo(), extension_dir is shown as C:\php\ext which is not correct.
Already verified that it's the correct php.ini and did some stop and start of apache.
Also, I checked the loaded modules with get_loaded_extensions(), but my desired extension -mbstring etc- aren't displayed.
Any help is appreciated.
Finally, it was an unexpected sign & somewhere else in the php.ini file. Found it by typing prompt php.

missing php intl & xsl extensions while installing Magento 2 on readiness check point

I'm trying to run the Magento installer on Windows 7 with MAMP 3.3.0 . When I do that Readiness Check says to me that: xsl & intl extension is missing.
I have both dll in the /ext dir .
I have two php.ini files in conf\php7.0.13\ dir : php.ini-development & php.ini-production. I already uncomment the xsl and intl in the both php.ini files.
Copied icu***.dll from php to apache bin folder too but still gets the same
error.
Help me, please. If I have not clearly explained, what information is needed to solve the problem?
What could the issue be?
I suppose you're trying to make it run on Windows otherwise there is no meaning in using .dll files.
Before starting the configuration of the Magento drop a file in that configuration with
phpinfo();
and get the exact location of the used php.ini file so you'll be sure there's not a 3rd one.
Uncomment and check the location of the extensions.
Please edit php.ini in the php installed folder usually present in /etc/php
old code
...
;extension=php_intl.dll
...
...
;extension=php_xsl.dll
new code
...
extension=php_intl.dll
...
...
extension=php_xsl.dll
save and restart your apache.
IN xamp/php/php.ini search and modify php.ini file and search (;extension=php_xsl.dll) line and remove ; before line start same as remove ; before (;extension=php_intl.dll) in php.ini and save php.ini file.and open xamp manager and stop apache servises and restart again.

Edit php.ini File to include extension for mysqli

So, I'm trying to use a table in a php program and I got a fatal error (class mysqli not found) which after researching on stackoverflow means I don't have extension=php_mysqli.dll enabled (here's the php-website which talks about enabling it: http://php.net/manual/en/install.windows.extensions.php.)
But I looked in my php.ini file and the sort of ";extension=..." lines that it talks about commenting aren't there (I did ctrl + f to search through as well as manually searching through). I tried just adding the "extension=php_mysqli.dll" line but it still didn't work.
Someone else also said you need to uncomment the extension_dir line in php.ini and specify my location but that line only appears in an if loop in php.ini and it's not commented out. (from this stackoverflow question: Fatal error: Class 'MySQLi' not found).
How do I add "extension=php_mysqli.dll" to my php.ini file so my php program can create a mysqli table?
If you don't have mysqli extension in you php version you should download another version of PHP.
http://windows.php.net/download/
Get PHP 7 OR PHP 5.6 last version (thread safe recommended).
After, following the instructions on this page http://php.net/manual/en/install.windows.extensions.php to activate mysqli extension.
;extension=php_exif.dll
extension=php_mysqli.dll // Uncomment this line
;extension=php_oci8_12c.dll
You can define the path of your php extensions folder if you have problems.
To do this, uncomment line extension_dir.
extension_dir = "C:\php\ext" // Your ext folder path
Restart your apache / nginx and try to use mysqli functions.
Hope this will can help you.
In my case, I had the extension=mysqli set in my php.ini and the php_mysqli.dll file in the php/ext folder, I just had to uncomment (remove the ;) the extension_dir line in php.ini:
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "ext"
Save php.ini and restart php and the webserver.

php does not load ini file

I think this has been solved many times here but i have not found proper answer.
I installed apache 2.4.9 x64 VC11, PHP5.5 x64 thread-safe VC11. Then I tried to install phpmyadmin but I got error.
mbstring library is not enabled
So i uncommented it in php.ini file. My php.ini file is located in c:/php/. I added this line to my
httpd.conf file:
#configure the path to php.ini
PHPIniDir "c:/php/"
to set php.ini file path.
phpinfo()
says it loaded the file from c:/php. But the library mbstring is still not loaded so I can't use phpmyadmin it's not just about phpmyadmin its about I can't use any libraries that are not default installed.
And yes I tried to restart apache...and not just once :p. it still doesn't work I'm hopeless. Please help me solve this.
Ok, so after another while of hard brainstorming i figured it out. I have never had to set this but now.
Everything you have to do(check) is set the path to extension dir in your php.ini
look for line:
; On windows:
extension_dir = "c:\php\ext"
just change the path where are your extension located. If is this line commented with ; just uncomment it restart apache and you are good to go. Hope this help someone else too.

PHP - PHP Warning: PHP Startup: in Unknown on line 0

I installed apache2 and php 5.4.5.
When you start apache this error:
PHP Warning: PHP Startup: in Unknown on line 0
The extension does not work:
; extension = php_intl.dll
; extension = php_ldap.dll
; extension = php_oci8.dll
; extension = php_oci8_11g.dll
; extension = php_pdo_firebird.dll
; extension = php_pdo_oci.dll
; extension = php_pdo_pgsql.dll
; extension = php_pgsql.dll
; extension = php_pspell.dll
; extension = php_shmop.dll
And maybe more.
Extensin dir: extension_dir = "C :/ dev/prog/php5/ext /"
Path: C: \ dev \ prog \ php5
php.ini is copied to C: \ WINDOWS \
ssleay32.dll php5ts.dll and is copied to C: \ WINDOWS \ system32 \
Please simple instructions.
upgrade those modules using pecl command
Also, Check extension_dir directive in php.ini
I had the same problem. The issue is, that these lines are by default in php.ini
; On windows:
; extension_dir = "ext"
I assumed, that only an uncomment of the second line and Apache restart solves this problem. But it isn't!
I had to type a full path to the ext folder, such as below:
extension_dir = "d:\php-5.4.32\ext"
After this action, and restart of the Apache web server, the problem was solved.
You should check you php.ini file to make sure the extension_dir is exactly set.
I had the same problem when i enable these five extensions:
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_curl.dll
The number of warnings is the same as the extensions that enabled.
So i guess may be there is sth. wrong with the extension setting.
When i change the extension_dir directive to the right dir, the problem resolved.
I found this answer in this post on the wampserver forums, and it worked for me:
Click on the Apache version that you use in the WAMPServer menu, e.g.
wampmanager -> Apache -> Version -> 2.4.9 ( just click on the version number on this menu item )
this will rebuild the SYMLINKS for the extensions that are causing the "in Unknown on line 0" error.
The answer was given by RiggsFolly in this thread: http://forum.wampserver.com/read.php?2,128734
I had the same problem when I enabled extensions (see Error when enabling PHP extensions).
I resolved it adding the PHP folder to the path and restarting the computer.
You need to download and install Aspell for Windows “GNU Aspell-0.50.3 (win32)”.
http://aspell.net/win32/
http://ftp.gnu.org/gnu/aspell/w32/Aspel ... -Setup.exe
Your Dictionaries are also here. Aspell needs at least one Dictionary to operate.
or
ftp://ftp.gnu.org/gnu/aspell/w32/
ftp://ftp.gnu.org/gnu/aspell/w32/Aspell ... -Setup.exe
ftp://ftp.gnu.org/gnu/aspell/w32/aspell-w32-0.50.3.zip
Aspell should copy the “aspell-15.dll” to the “Windows/System32” directory which the php entension php_pspell.dll requires and looks for to execute.
If not then locate aspell-15.dll in C:/Program Files/Aspell/bin/aspell-15.dll and copy it to C:/Windows/System 32/aspell-15.dll
You only need now to uncomment this line in:
xampp/apache/bin/php.ini
;extension=php_pspell.dll
to this:
extension=php_pspell.dll
Restart Apache.
(If Apache won't start paste the error message here).
Check the pspell module is in place and enabled by lookin at your phpinfo() file from the menu within the XAMPP Welcome Page. http://localhost/index.php
For more info visit https://community.apachefriends.org/f/viewtopic.php?p=83942
The problem is not coming from there, the problem is from the path (I mean %PATH% for Windows users, because of %PATH% is a variable that contains many paths separated by ;). So to figure out the problem you have to:
1-make configuration in the httpd.conf file:
PHPIniDir "${path}/conf_files"
2-make configuration in your php.ini file (it must be in the same location with the httpd.conf file):
change this:
extension_dir = "${path}\php\ext\"
To
extension_dir = "D:\EasyPHP5.3.0\php\ext\"
(in my case the php is installed in D:\EasyPHP5.3.0)
Optional:
if you need to execute PHP from the CLI (Command Prompt)
you have to make copy of the php.ini file to the folder when the PHP is installed (in my case D:\EasyPHP5.3.0\php)
Restart/Start your web Server and enjoy!
I had similar problem. cURL required SSL layer. Problem was in installation of php_curl library, see http://php.net/manual/en/curl.installation.php. The firs problem: libeay32.dll and ssleay32.dll are required on PATH. I put them in apache/bin directory. The second problem is that php.ini required php_openssl loaded before php_curl so I modified ini file.
extension=php_openssl.dll
extension=php_curl.dll
I solved the problem on my windows 7 with two steps:
set extension_dir as absolute path in php.ini
extension_dir = "d:\php-5.4.32\ext"
comment the php_curl.dll module in php.ini
;extension=php_curl.dll
Same problem was solved by changing to full path:
PHPIniDir in httpd.conf and extension_dir in php.ini.

Categories