Asked  7 Months ago    Answers:  5   Viewed   34 times

I have tried this




and got this

Fatal error:  Call to undefined function apache_get_modules() in

Why the error for built in function and how to get list of modules



The manual page contains details about the PHP and Apache version that support apache_get_modules().

You must be running PHP >= 4.3.2 and using Apache 2 handler API, or PHP >= 5.0 and Apache 1 or Apache 2 filter API.

Wednesday, March 31, 2021
answered 7 Months ago

Apparently, when you access a VirtualHost through the alias, there is no trace of the original SERVER_NAME in any of the $_SERVER variables.

The only idea that comes to mind is setting an environment variable:


this should set the value of $_SERVER["MY_HOST"] to the correct host name. No guarantees though, I have never tried this in practice.

Wednesday, March 31, 2021
answered 7 Months ago

The solution here is very simple. There is a minor error that's causing all of your issues.

In your code you have this to calculate midnight.

$midnight = mktime(0, 0, 0, date('n'), date('j'), date('Y'));

This is incorrect for the simple fact that it's using TODAY's midnight (Which would have been 00:00 today, however many hours ago from now. You want midnight TOMORROW, since it's considered 00:00 on 24 hour time and is tomorrow. The correct way to do it is just like this:

$midnight = strtotime("tomorrow 00:00:00");

Just keep in mind that strtotime() bases everything off of GMT, so make sure you set a default timezone in the file/application.

I hope my answer is clear and explains why the code you posted is wrong and how to fix it.

Saturday, May 29, 2021
answered 5 Months ago

First of all, what is the version of PHP?

If other .php scripts work except for phpMyAdmin, the is pretty safe to assume something is wrong with phpMyAdmin installation. (either with the files or the Virtual Host)


  1. Can you run another script in phpMyAdmin directory? Try with a file containing phpinfo(); If it does not work then the problem is in your apache configuration.

  2. If the above is true, then the parser is not recognising phpMyAdmin/index.php as a php file, for some reason. Try reinstalling phpMyAdmin.


Remove AddType application/x-httpd-php .php. You should not need it.

In PHP 5.4 magic_quotes_gpc was removed. If you're running PHP5, remove that line.

As of PHP 4.0.3, track_vars is always turned on, so remove it also.

As of PHP 4.2.0, register_globals this directive defaults to off. In PHP5.3 register_globals is deprecated, as of PHP5.4 register_globals was removed. SO if running PHP > 4.2.0 remove that line.

Saturday, May 29, 2021
answered 5 Months ago
for entry in "$search_dir"/*
  echo "$entry"
Thursday, June 3, 2021
answered 5 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :