How to edit php.ini
Posted by: LeMarque (---.cybermesa.com)
Date: October 23, 2019 05:51AM

I'm on a Win10 i7 w/16gigs running the latest version of the 32bit WAMP. 3.1.9

It seems if I click the green W choose PHP > php.ini it opens in my editor (editplus) and say I change Output Buffering to 'Off' or change the max upload file size and save the file, it mungs php/MySQL - or something because all my local sites return a Fatal Error and phpmyadmin errors out with unable to load MySQL.

So I'm asking is the above the correct method of editing php.ini?

TIA

Options: ReplyQuote
Re: How to edit php.ini
Posted by: Otomatic (Moderator)
Date: October 23, 2019 09:21AM

Hi,

It is the correct method -> Left-Click -> PHP -> php.ini
But, if you change a PHP parameter in this way, you must either restart Wampserver, or Right-click -> Refresh for the modification to be taken into account.


But a very large part of the PHP parameters can be modified directly by Click-Left -> PHP -> PHP settings

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28 - MariaDB 10.4.9
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.9
PhPMyadmin 4.9.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: How to edit php.ini
Posted by: LeMarque (---.cybermesa.com)
Date: October 28, 2019 07:39PM

Rather then start a new post -

"But a very large part of the PHP parameters can be modified directly by Click-Left -> PHP -> PHP settings"

No matter what technique I use to edit php.ini, I breaks wamp. The tray icon is gold'ish and from what I can tell Apache isn't running.

I work with WordPress and use a backup/restore utility, Akeeba. When I try and restore to my local machine Akeeba wants Output Buffering Off and display errors off.

If I edit php.ini and apply theses changes, I get the gold'sh W in the tray.

I can however, edit php.ini and increase things like upload file size, memory limit, etc. But not Output Buffering or Display errors.

When I edit and save the file, Editplus, saves a backup. But clicking on the symlink php.ini opens the file but my changes are not reflected.

Options: ReplyQuote
Re: How to edit php.ini
Posted by: Otomatic (Moderator)
Date: October 28, 2019 08:07PM

Hi,

It works fine as you can see below. display_error is off, ouput_buffering is off and icon is green.

I don't use EditPlus but UltraEdit or Notepad+++ (Default Wampserver text editor), but there is no automatic interaction between my text editor and Wampserver.
Maybe you could also disable xDebug.



------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28 - MariaDB 10.4.9
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.9
PhPMyadmin 4.9.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: How to edit php.ini
Posted by: LeMarque (---.cybermesa.com)
Date: October 28, 2019 09:36PM

Thanks again, but it seems the only way to set output buffering to "Off" is if I physically edit php.ini and then it breaks WAMP

Options: ReplyQuote
Re: How to edit php.ini
Posted by: RiggsFolly (Moderator)
Date: October 29, 2019 10:24AM

Actually what you should be doing is

1) Create a Virtual Host to contain your WordPress site.
- The need for Virtual Hosts

2) Amend the parameters that require specific values in the httpd-vhosts.conf file inside this specific Virtual Host definition. This ensures these changes are made for THIS SITE and not for any other site.

3) Once the Virtual Host has been created restore your Akeeba Backup into the VH.

For example


Assume this is the Virtual Host definition that came from step 1 found inside httpd-vhosts.conf (available to edit via menu system)

<VirtualHost *:80>
	ServerName yoursite.test
	ServerAlias www.yoursite.test
	DocumentRoot "c:/websrc/yoursite/www"
	<Directory  "c:/websrc/yoursite/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
                AllowOverride All
                Require local
	</Directory>

        # here you make changes to the default development oriented config
        # to match what you spacific site requirements are	
	php_flag display_errors off
	php_flag output_buffering off

</VirtualHost>

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.9 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: How to edit php.ini
Posted by: LeMarque (---.cybermesa.com)
Date: November 02, 2019 03:22AM

Riggs ...

If I ever get to France diner's on me. Nothing here in the States worthwhile shipping.

And I'm not looking to start a flame and just passing on something from another Dev that I WAS considering.

Just an FYI for full disclosure admitting that I'm ignorant of these things.

"The developers of WAMPserver have made a mistake. They are using the non-thread-safe version of PHP as an Apache module with a threaded Apache MPM. To cut a long technical explanation short when you try to run PHP scripts at an elevated rate on your local WAMP server PHP will crash because of thread safety issues"

Options: ReplyQuote
Re: How to edit php.ini
Posted by: RiggsFolly (Moderator)
Date: November 02, 2019 08:38AM

Well thanks for that.
I am in the UK actually, but Otomatic is the man that you should be buying dinner for, It's him that has done a huge amount of work on WAMPServer over the last few years.

As to the error, it would be an error if NTS versions of something had been used.
We as far as I know always use the Thread Safe versions of Everything.
Can you explain why you think something NTS has been used please?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.1.9 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 11/02/2019 09:29AM by RiggsFolly.

Options: ReplyQuote
Re: How to edit php.ini
Posted by: Otomatic (Moderator)
Date: November 02, 2019 09:27AM

Hi,

Quote
Lemarque
"The developers of WAMPserver have made a mistake. They are using the non-thread-safe version of PHP as an Apache module with a threaded Apache MPM. To cut a long technical explanation short when you try to run PHP scripts at an elevated rate on your local WAMP server PHP will crash because of thread safety issues"

Yes, I know, no one is immune to error. However, checking the use of TS-only versions is part of the validation process.
In addition, NTS versions are well noted as such in the file name, for example:
- php-7.3.11-nts-Win32-VC15-x64.zip
and it's obvious right away.

An TS version is seen by a phpinfo():
Thread Safety 	enabled

Or in a CLI:
j:\wamp\bin\php\php7.3.11>php -i | FINDSTR /C:"Thread Safety"
Thread Safety => enabled

With Wampserver 3.2.0, the TS verification of all modules will be performed by the tool:
Right-Click -> Tools -> Check compiler VC, compatibility and ini files

I would like the one you're quoting indicate which PHP version of Wampserver is NTS.
Also, if you or someone else finds a PHP Wampserver version that is not TS, please tell me.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28 - MariaDB 10.4.9
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.11/7.2.23/7.1.32/7.0.33/5.6.40 - MySQL 5.7.28/8.0.18 - MariaDB 10.4.9
PhPMyadmin 4.9.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



Edited 1 time(s). Last edit at 11/02/2019 11:07AM by Otomatic.

Options: ReplyQuote
Re: How to edit php.ini
Posted by: LeMarque (---.cybermesa.com)
Date: November 02, 2019 02:57PM

How can I put this?

There are those that have a talent for music, for example, and go on to not only become virtuoso but study the theory and contribute their knowledge.

That's not me. I enjoy listening to music, but can't read a note. So if there's a debate between musicians, in the end ...

" I dance with the one that brung me"

Have a great day guys and keep up the good work.

Options: ReplyQuote


Sorry, only registered users may post in this forum.