Change php configuration file in PhpStorm - php

I have installed WAMP server on my computer and tried to configure the PHP Interpreter in PhpStorm but it keeps pointing to the wrong php.ini file.
How can I change it to the correct one?
Let me know if you need more information.
Edit
The place where php.ini that WAMP tells me to edit is C:\wamp64\bin\apache\apache2.4.17\bin\php.ini
The one that PhpStorm is pointing to has a big DO NOT EDIT label on it.

If this is for a website you are attempting to write then you need to point your Configuration File at
C:\wamp\bin\apache\apache{version}\bin\php.ini
NOTE
There are PHP ADDONS provided for PHP7 that will install into the existing WAMPServer 3.0.x and the latest is PHP7.0.8 found here or from SourceForge

I had the same problem, and I backed up the original php.ini content inside bin\php\php7.0xxx folder, and I replaced the content with the php.ini inside C:\wamp\bin\apache\apache{version}\bin\php.ini, and then restarted phpstorm and it worked.

Related

PHP upgraded to 7.0 on Ubuntu/server, but hasn't updated on nginx/ajenti

I am trying to upgrade my server/websites to php 7.0. I have successfully updated via terminal, i.e. 'php -v' shows the correct version.
However, it's clear that as nginx is installed on my server, I need to change a setting in the nginx configuration file as well.
I don't know much about nginx and didn't set it up originally, but I know that the configuration files are generated automatically via Ajenti V, so I don't think it's as straightforward as editing a configuration file directly.
Maybe, if I share a couple of screenshots it would help clarify the set. First Ajenti:
Then I have a config file for each domain on my server, and these are located here: /etc/nginx/conf.d/[server name].conf. Here is a screenshot of one of the files:
I can see that the php7.0-fpm.sock file is located here on my server: run/php/php7.0-fpm.sock, but I don't know if that's relevant.
Unfortunately the person who set up nginx isn't around anymore to fix this, hence the need for some assistance.

WAMP Server: phpMyAdmin showing loads of Deprecation Notices & errors?

I'm working with WAMP Server for local development, As WAMP does not ship with PHP 7.1, I installed it manually as I needed that version for a project to work.
I downloaded the binaries from the PHP site (Thread Safe version) and placed it inside wamp64/bin/php/php7.1.8 and renamed the php.ini for development file to phpForApache.ini and had to change the extension dir for modules to load also.
After all of that I went on phpMyAdmin and here is an example:
There is many more errors of the same type.
My question is how do I solve them?
I am running 4.6.4 for phpMyAdmin...
These errors came mostly cause of your phpMyAdmin version is not compatible with php version please first sure the cause of issue.
So you have to download the latest version of phpMyAdmin phpMyAdmin-download-link
Download the latest version from upper right green button
Then extract that zip file in wampp/apps directory and remove all-languages from folder name and remove - from behind the version number this is not necessary but doing this to set a conventional name which will help us while we changing version number in files.
Copy config.inc.php file from older version folder and paste in new version folder which one you extract.
Edit phpMyAdmin version in phpmyadmin.conf file found in wamp/alias directory.
Edit wampmanager.conf file found in wampp/ directory if you found phpMyAdmin version defined in this file because I am not sure probably they removed it from latest version of wamp.
Hop you found this helpful if yes please vote, happy codding 😊

Unable to install MongoDB PHP driver on XAMPP Windows

I am using Windows OS (64-bit) and running XAMPP(PHP 5.4.7). I tried installing the PHP MongoDB Driver but it is not reflecting on the phpinfo() page.
I followed the same steps as listed:
I downloaded php_mongo-1.3.2RC1.zip (latest one) from https://github.com/mongodb/mongo-php-driver/downloads
I extracted the folder and copied the php_mongo-1.3.1-5.4-vc9.dll file and pasted in C://XAMPP/php/ext/.
My PHP extension build says API20100525,TS,VC9
I opened php.ini file and i inserted ;extension=php_mongo-1.3.1-5.4-vc9.dll at the last line.
I then looked at the phpinfo() page as well as I tried the
echo extension_loaded("mongo") ? "loaded\n" : "not loaded\n";
It says it is not loaded.
Try removing the ; from the beginning of ;extension=php_mongo-1.3.1-5.4-vc9.dll in your php.ini
After doing all the steps as mentioned in the question, xampp may not be able to load the ".dll" file. Just ensure to add the path of the ".dll" file's folder to the environment variable as a system variable path.
I was facing same issue, then after adding the path of the ".dll" file's folder to the environment variable as a system variable path, it worked. It is then able to find the file.
At the end that was the only step which was stopping xampp to load the ".dll" file, although it was present in that folder. Often people miss this step as it is no where pointed out clearly.

Load php_oauth.dll into local server

I'm facing problem to load the php_oauth.dll extension for my xampp. I downloaded the php_oauth.dll and added extension=php_oauth.dll in php.ini , but when i restart my apache, it cannot start the server anymore.
I'm using window 7 ,64bits.
Initially, I download the file from
http://downloads.php.net/pierre/
but i found that it was 32bits file , so I'm searching fo 64bit and found out
http://www.mediafire.com/php-win64-extensions
unfortunately,I still cannot load the oauth. Any solution to solve it? I look through many article, but it seems like dont have it, anyone can provide ,so that, others that using win 64bit can follow
Thank you!
This looks to be like a path problem. Make sure the extension is store in the correct extension directory.
The settings of this can be found inside php.ini as something like
extension_dir = C:\php\extensions
By default this is ext folder inside PHP installation.
Or, follow the instruction from PHP manual while installing extensions, if you are not sure what you are doing.

MySQL not working with php; and crashing apache when enabled

I just recently setup a fresh install of PHP, Mysql and Apache on my Windows 2003 server. Php is working fine and my Navicat MySQL browser can connect to my tables. However no matter what I do. MySQL doesn't show in phpInfo() even though I have the extensions in my ext folder. I installed PHP via the windows binary installer. Any idea what I'm missing? I'm pretty new to PHP is this is the first time I've tried to setup my own server I'm sure I'm missing something simple. Thanks.
--- EDIT ---
So as suggested by Alan Geleynse I added the extension to my php.ini, now Apache crashes every time I try to enable php_mysql.dll any ideas on this one? I may just restart my php from scratch if this is any more trouble.
You probably need to enable the extension in your php.ini
Search through php.ini for extension and you should see a list, some of which will be commented out. If you remove the comment for MySQL, it should load the extension.
If you do not see it, you should be able to add this line to your php.ini. Make sure that the dll listed is the one you want and is located in your extension directory.
extension=mysql.dll
Seems the issue was not only a missing php_mysql.dll but I was also missing libmysql.dll The installer still borked the install of the extension files though. Oh well it happens thanks to everyone for the help.
Probably apache crashes because of missing dll. There is probably a directory 'ext' in your php installation dir. Check whether there is a 'php_mysql.dll' file in it.
Also, check for directive 'extension_dir' in your php.ini, it must point to the location of extensions directory. For example, I have php installed in 'C:\php' and 'C:\php\ext' folder in it. My php.ini contains line:
extension_dir = "C:/php/ext"
I just fixed this problem on my computer by copying libMysql.dll from the MySql server directory to c:/windows/system32/, just a few minutes ago.

Categories