Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 05:31PM

Hello,

I am very confused and frustrated about this issue I encountered. I am trying to solve this for many hours since yesterday.

This is NOT an ordinary issue! I tried every possible solution I could find on the net, but nothing worked. Something strange happend (see below).

So I'm on WAMP 3.1.9 which I installed 2 days ago, and while trying to import a MySQL dump back into a database via phpMyAdmin the script times out after 360 seconds.

I edited every possible php.ini file - yes, I checked phpinfo() and located the php.ini in use:

-WAMP\bin\php\php7.2.18\php.ini => max_input_time = 3600 => didn't do anything
-WAMP\bin\php\php7.2.18\phpForApache.ini => max_input_time = 3600 => didn't do anything
-WAMP\alias\phpmyadmin.conf => php_admin_value max_execution_time 3600 => didn't do anything
-WAMP\apps\phpmyadmin4.8.5\config.inc.php => $cfg['ExecTimeLimit'] = 3600 => didn't do anything
-WAMP\apps\phpmyadmin4.8.5\import.php => added ini_set('max_execution_time',3600) => didn't do anything
-switched to PHP version 5.6.40 and 7.3.5 => didn't do anything
-edited few more files I can't remember now in directories deep down => didn't do anything
-added .htaccess file inside \phpmyadmin4.8.5\ directory trying to increase time limit there => didn't do anything

Then I started to DEBUG the error which I should have done in the first place, but who would expect such a nightmare - it should only be a simple setting in a config file. A few more hours spent.

So here now is the strange conclusion I came to:

Running phpinfo() in a CLEAN file without ANY other code... I get under...
CORE -> max_execution_time:

file run inside the 'www' directory:
Local Value: 3600 (from \php7.2.18\phpForApache.ini) - confirmed file
Master Value: 3600 (from \php7.2.18\phpForApache.ini) - confirmed file

file run inside the 'phpmyadmin4.8.5' directory:
Local Value: 360 (changed 'somewhere' !!!!!)
Master Value: 3600 (from \php7.2.18\phpForApache.ini) - confirmed file

So this now is REALLY strange! I even scanned WAMP's folders doing a text search for '360' on all files, but nothing useful was found either. Although a DLL that I didn't look at any further.

Is this a bug? Hardcoded error? Variable scopes? Or what else could be the reason? As you can tell, I am pulling my hair out over this.

Thank you!

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: Otomatic (Moderator)
Date: October 23, 2019 05:36PM

Hi,

See wamp/alias/phpmyadmin.conf
modify the value
launch PhpMyAdmin by either localhost page or lecft-click -> PhpMyadmin

------------------------------------------------------------------------------------------------------------
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 10/23/2019 06:17PM by Otomatic.

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 06:19PM

You didn't read my post.

The file is mentioned there.

Any help?

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 06:25PM

It would be enough if you could explain WHY the 'max_execution_time' variable changes when phpinfo() is run from inside the 'phpmyadmin4.8.5' directory. What is changing it's value to 360 ????



Edited 2 time(s). Last edit at 10/23/2019 06:50PM by wampuser123.

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: Otomatic (Moderator)
Date: October 23, 2019 06:33PM

Hi,

phpinfo() read value from PHP, not that from PhpMyAdmin.

------------------------------------------------------------------------------------------------------------
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: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 06:48PM

This is obvious. I would like to have an explanation WHY the SAME file containing ONLY

<?php

phpinfo();

?>


shows different values when run in 'www' and 'phpmyadmin' folder for 'max_execution_time'.


How can you explain this?

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: RiggsFolly (Moderator)
Date: October 23, 2019 07:44PM

Because the amendment made by
WAMP\alias\phpmyadmin.conf

Only has any effect WHILE you are running phpMyAdmin via the phpMyAdmin Alias.
Thats the idea with an alias or a Virtual Host, you can tailor the environment specifically to that Alias or VH

---------------------------------------------------------------------------------------------
(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: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: Otomatic (Moderator)
Date: October 23, 2019 07:56PM

There's nothing to explain.
This answers your first question.
In the file wamp\alias\phpmyadmin.conf you replace the time limit values with the ones you want, for example :
  php_admin_value max_execution_time 1800
  php_admin_value max_input_time 1800
you save the modified file then you launch PhpMyAdmin by its link in the localhost page or by left-click -> PhpMyAdmin
and the time limit for PhpMyAdmin will be the one you modified previously even if in the PHP settings you still see the old value :
Left-click -> PHP settings -> PHP settings -> max_execution_time = 120

I have done this dozens and dozens of times, as well as to increase the maximum import sizes via
  php_admin_value upload_max_filesize 1024M
  php_admin_value post_max_size 1024M

------------------------------------------------------------------------------------------------------------
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: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 09:39PM

Thank you for your answers.

It's a BUG !!!

I found the reason and had previously done all you suggested and edited 'phpmyadmin.conf' in the first 5 minutes I encountered the problem. No need to waste 2 days on something as simple as that. I'm not that much of a noob, sorry guys.

So here you go, something to fix:

The filename 'phpmyadmin.conf' is being read/parsed wrong somewhere in your code.

Reason:

I renamed 'phpmyadmin.conf' to 'phpmyadmin.conf.bak' to keep a backup of the original file.

Guess what?

It's being read as 'phpmyadmin.conf' !! So the backup file with the orignal value of 360 was always being read instead of the 'phpmyadmin.conf' file! No wonder nobody else encountered this issue before (just me always keeping an original copy of each file I modify, good habit and best practice I believe).

Try it. I believe you would be able to reproduce the bug. String parsing problem somewhere in your code or the Apache code.



Edited 1 time(s). Last edit at 10/23/2019 10:13PM by wampuser123.

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 09:48PM

Same thing with

'phpmyadmin.conf-bak'

being read as

'phpmyadmin.conf'

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 09:55PM

'phpmyadmin-bak.conf'

obviously works (being ignored)


Your code only takes the first part into account, not the WHOLE filename.

So a file called...

'phpmyadmin.conf-blahblahwhatever'

...would still be used as config file. No good ;-(

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 23, 2019 10:10PM

Another issue I just encountered in the same directory:

I created a text file 'bug.txt' with some notes. The server refused to start after that.

Why not taking only '.conf' files into account in this directory and ignore the rest?

Wouldn't it make sense to have clean code here?

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: RiggsFolly (Moderator)
Date: October 23, 2019 11:09PM

I am sure Oto will have more to say, but basically.... DONT put files in any of the wampserver folder structure except in newly created folders under the `www` folder unless you know what you are doing

It works the way it works, for a reason. The reasons are good!

Secondly!!!!!

Unless you are running the phpMyAdmin Alias you are NOT GETTING the parameters set that is done when you are running the phpMyAdmin Alias
So if you are running the `phpinfo()` link on the homepage YOU ARE NOT RUNNNING THE phpMyAdmin ALIAS and therefore are not getting the parameters set as if you were

---------------------------------------------------------------------------------------------
(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 2 time(s). Last edit at 10/23/2019 11:13PM by RiggsFolly.

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 24, 2019 06:28AM

> So if you are running the `phpinfo()` link on the homepage YOU ARE NOT RUNNNING THE phpMyAdmin
ALIAS

I put the file with phpinfo() into '\wamp\apps\phpmyadmin4.8.5\php.php'

This is the same directory where 'import.php' resides which is being excuted by phpMyAdmin on an IMPORT task.

As you can see, both files are in the SAME directory.

I would then execute it by

'http://localhost/phpmyadmin/php.php'

same way as

'http://localhost/phpmyadmin/import.php'

is being executed. There is no difference to me, same environment. Not sure what you think is wrong with that.

But I think I know what you are trying to say, just that I didn't do that mistake and mentioned it in my previous posts. I never said I had an issue running it "on the homepage" which means under the www directory - there everything works and shows up correctly.

Yes, inside the \apps\phpmyadmin4.8.5\ directory a different environment is present which is configured by '\wamp\alias\phpmyadmin.conf'.

All this doesn't change the bad code that is wrongly parsing the filenames inside \wamp\alias\. To me it's a mess, I'm sorry. I would never publish a code or product like this. If a script is not observing a full filename, but just part of it, then it's a BUG. Pretty obvious.

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 24, 2019 07:14AM

If your code 'scans' this directory for presents of *any* file there to use it as configuration file for a virtual host, then it should be sanitized - good practice to avoid this kind of thing from happening. Filter by *.conf and all problems are solved. Done.

Saying...

"don't put anything into that folder"

...would be the same if Microsoft said...

"Don't put any file under C:\WINDOWS\ unless you know what you are doing" - Windows will not boot anymore

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: Otomatic (Moderator)
Date: October 24, 2019 11:23AM

Hi,

Thanks to Superman for being the only one to have discovered a so-called problem that had existed for more than fifteen years, i.e. since the release of Wamp5 in 2004.

You'll tell me it's better late than never!

Despite everything, you can't say Superman is that strong. He did not find that it was enough to modify the last line of httpd.conf, replacing
Include "${INSTALL_DIR}/alias/*"
by
Include "${INSTALL_DIR}/alias/*.conf"
and then he could put all the files he wants in the alias reserved folder for Wampserver.

When a problem is so kindly and politely explained we take it into account, so it will be fixed with Wampserver 3.2.0, before it becomes an adult and refuses to be fixed.

------------------------------------------------------------------------------------------------------------
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: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: wampuser123 (69.6.23.---)
Date: October 24, 2019 01:06PM

Thanks for your sarcasm!

I still think it would make sense to check what you actually include there, instead of saying "include everything you can find in this directory". As you can see, a simple file backup in this directory messes things up or breaks it. I just couldn't believe that this is happening. In all those years (since 1995) I believe I never come across any software or script that breaks if any additional file is present in a directory where it is not expected. Sorry if I came across a bit harsh, I was just annoyed having wasted too much time on this trivial issue.

If someone would have pointed me to...

Include "${INSTALL_DIR}/alias/*"

...earlier, this would have saved me a lot of headaches. Why not making it *.conf by default?

Thank you for your ongoing work on WAMP which is highly appreciated! Using it for many years and love it.
Please keep up the great work! We all appreciate your time and effort you put into this project. I know very well how time-consuming and troublesome the life of a developer can be :-)

Options: ReplyQuote
Re: Bug? phpMyAdmin - php.ini -> max_execution_time - var scope
Posted by: Otomatic (Moderator)
Date: October 24, 2019 01:44PM

Hi,

> Why not making it *.conf by default?
Because it had been like that for fifteen years and it had never caught my attention or that of another user.
You are probably the first one who put a file that cause error in the wamp/alias/ folder

I quickly correct the errors that are reported to me and make many changes and evolutions according to users' requests - well, not all requests, some are a little crazy.

------------------------------------------------------------------------------------------------------------
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


Sorry, only registered users may post in this forum.