WAMP Ignores settings
Posted by: Sksoft (---.178.207.126.adsl.012.net.il)
Date: January 26, 2015 03:46PM

Hi.

wamp 2.5 32bit Windows 7 Home Premium .

My problem is that WAMP doesn't care about settings that I made in php.ini and PHPMyAdmin settings. I mean execution time and max file size:

I want to import big DB through PHPMyAdmin. When I create new DataBase and click Import i see max file size is 128M. In php.ini I made all necessary changes:

max_input_time = -1
max_execution_time = -1
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = -1

But in the Import window it is still max file for Import is 128M

More than that.. Timeout error .

In wamp/apps/phpmyadmin/library configdefault.php I made this change

from $cfg['ExecTimeLimit'] = 300 to $cfg['ExecTimeLimit'] = 0

and I have timeout error after 5 min. Even with $cfg['ExecTimeLimit'] = 5 (only five seconds) and nothing happends - it works for 5 min and stops with timeout error - Script timeout passed, if you want to finish import, please resubmit same file and import will resume.

On other PC Windows 8.1 wamp 2.5 64 bit looks like has same problem.. And only XP with old version of wamp work fine!

And... yes, I know that it's need to make "Restart all services" after every change in settings files.

Options: ReplyQuote
Re: WAMP Ignores settings
Posted by: RiggsFolly (---.as43234.net)
Date: January 26, 2015 03:59PM

Ok so there are a couple of things here you should know.

1. Apache uses a file called \wamp\bin\php\php{version}\phpForApache.ini to get its php inin file setting from.
This is the file that will be edited when you use the
wampmanager -> PHP -> php.ini
MENU link to edit the php.ini file. THATS WHY ITS THERE!

2. There is a better way to UP the phpMyAdmin allocations and ONLY EFFECT phpMyAdmin and not the whole system

Edit \wamp\alias\phpmyadmin.cong

It should look like this

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin4.3.8/"

# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "d:/wamp/apps/phpmyadmin4.3.8/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require local
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
	  Deny from all
	  Allow from localhost ::1 127.0.0.1
	</IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>

NOW change the relevant parameter there at the bottom of the config file and the changes will only apply to the system when phpMyAdmin is running. So you want have to wait a year when you code a unterminated while loop by accident. I know I am sure you would never do that, me neither, except I do it all the time!!!



Also a better way of adding HUGH databases to MySQL would be to use the "MySQL Console" accessed AGAIN from the wampmanager menu system.

wampmanager -> MySQL -> MySQL Console

If you have not set a password on the root account, just hit enter on the password challenge.

Then at the "mysql>" prompt enter

source C:/path/to/backup.sql

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: WAMP Ignores settings
Posted by: Sksoft (---.178.207.126.adsl.012.net.il)
Date: January 26, 2015 04:19PM

Yes, there is a God!! I still don't understand why the developers had to do such a thing, but doesn't matter. Thank you very much.

Options: ReplyQuote
Re: WAMP Ignores settings
Posted by: RiggsFolly (---.as43234.net)
Date: January 26, 2015 04:38PM

I assume you mean the php.ini file.

Well the PHP CLI uses the php.ini file, thats why. Its far from unusual for there to be 2 php.ini files.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: WAMP Ignores settings
Posted by: Otomatic (Moderator)
Date: January 26, 2015 04:48PM

Hi,

> I still don't understand why the developers had to do such a thing, but doesn't matter.

- wamp/bin/php/phpX.Y.Z/php.ini file is only used by PHP CLI (Command Line Interface)

- wamp/bin/php/phpX.Y.Z/phpForApache.ini is used by PHP files served by Apache ie local web pages.

The files are differentiated because the CLI mode is used by all PHP scripts of WampServer and that there is no need of lots of extension or other stuff. In addition, any errors made in the phpForApache.ini file will have no impact on the operation of Wampmanager.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.