virtual min php files downloading and not executing | |
---|---|
Subject: | |
The solution that worked for me was to edit /etc/httpd/conf.d/php.conf and replace these three lines: <FilesMatch \.php$>SetHandler application/x-httpd-php</FilesMatch> with: AddHandler php5-script .php More info: http://ilovevirtualmin.com/tag/virtualmin-upgrade-php-5-3-to-php-5-4/ ref: https://www.virtualmin.com/node/25521#comment-767120
| |
2016-12-06 08:46:15 | gstlouis |
sample: I blocked these lines and left the one without a pound block, reboot httpd and it worked #<FilesMatch .php$> #SetHandler application/x-httpd-php AddHandler php5-script .php #</FilesMatch> | gstlouis |
2017-01-23 14:34:39 | |
I did this on a new install and it was giving me an error for undefined get_result() extension
the problem was that I hadn't restart httpd The problem of downloading the .php files started again with webmin vim /etc/httpd/conf.d/php.conf #<FilesMatch .php$> #SetHandler application/x-httpd-php AddHandler php5-script .php #</FilesMatch> httpd reboot | gstlouis |
2017-01-23 14:35:34 | |
I did an install php 5.6 that wasn't from the remi repo and I didn't get this problem (got other mb_substr() problems mind you) | gstlouis |
2017-07-01 15:15:40 | |
test with a file <?php var_dump(extension_loaded('mbstring')); exit; echo phpinfo(); echo phpversion(); ?> | gstlouis |
2017-07-01 15:26:44 | |
I don't know how to explain it but I install centos 7 with virtualmin and had to remove php 5. some shit and install 7.3.
I tried multple times the solutions above and I could get it woking. It looks like the only thing I did was comment out <FilesMatch .(php|phar)$> #SetHandler application/x-httpd-php </FilesMatch>
save files and reboot htttpd | gstlouis |
2020-10-15 13:34:01 | |