[opensuse] Apache2 with php7 under Leap 15.1
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2. But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong? Thanks in advance, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op maandag 19 augustus 2019 20:00:56 CEST schreef Wolfgang Mueller:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
Thanks in advance, Wolfgang a2enmod php7 systemctl restart apache2.service
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 19 Aug 2019 at 20:03:56 +0200, Knurpht-openSUSE wrote:
Op maandag 19 augustus 2019 20:00:56 CEST schreef Wolfgang Mueller:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
a2enmod php7 systemctl restart apache2.service
Thank you, but "a2enmod php7" did not help. Google-chrome and Firefox continue treating a php script as a text file. Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op maandag 19 augustus 2019 20:18:32 CEST schreef Wolfgang Mueller:
On Mon, 19 Aug 2019 at 20:03:56 +0200, Knurpht-openSUSE wrote:
Op maandag 19 augustus 2019 20:00:56 CEST schreef Wolfgang Mueller:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
a2enmod php7 systemctl restart apache2.service
Thank you, but "a2enmod php7" did not help. Google-chrome and Firefox continue treating a php script as a text file.
Wolfgang Please show a2enmod -l
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 19 Aug 2019 at 20:24:04 +0200, Knurpht-openSUSE <knurpht@opensuse.org> wrote:
Op maandag 19 augustus 2019 20:18:32 CEST schreef Wolfgang Mueller:
On Mon, 19 Aug 2019 at 20:03:56 +0200, Knurpht-openSUSE wrote:
Op maandag 19 augustus 2019 20:00:56 CEST schreef Wolfgang Mueller:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
a2enmod php7 systemctl restart apache2.service
Thank you, but "a2enmod php7" did not help. Google-chrome and Firefox continue treating a php script as a text file.
Please show a2enmod -l
Here is the result produced by "a2enmod -l": actions alias auth_basic authn_core authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout php7 Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Wolfgang Mueller wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
The PHP script is not being put through the interpreter, and just served as text. What is the filename of your script? Maybe also check that the php module is in fact being loaded. -- Per Jessen, Zürich (19.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 19 Aug 2019 at 20:14:01 +0200, Per Jessen wrote:
Wolfgang Mueller wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
The PHP script is not being put through the interpreter, and just served as text.
That's what I observed.
What is the filename of your script?
index.php sidebar.php glossar.php glossario.php ... Are you sure that php7 can process certain filenames only? So far the filename did not matter at all.
Maybe also check that the php module is in fact being loaded.
See my reply to Knurpht-openSUSE. Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Wolfgang Mueller wrote:
On Mon, 19 Aug 2019 at 20:14:01 +0200, Per Jessen wrote:
Wolfgang Mueller wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
The PHP script is not being put through the interpreter, and just served as text.
That's what I observed.
What is the filename of your script?
index.php sidebar.php glossar.php glossario.php ...
Are you sure that php7 can process certain filenames only? So far the filename did not matter at all.
anything can be processed as php code, but apache needs to know which files to treat like code and which are just text or html. Check out /etc/apache2/conf.d/php7.conf - the sethandler directives tell apache2 how to process the files that match the criteria. I can't tell why your files are not being correctly processed as php code. -- Per Jessen, Zürich (17.2°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 19 Aug 2019 at 20:00:56 +0200, Wolfgang Mueller <wm@ariannuccia.de> wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong? My
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 19 Aug 2019 at 20:00:56 +0200, I wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
My mistake was relying on yast. But then I found an instruction on https://en.opensuse.org/SDB:Apache_installation which recommends the use of zypper. Consequently the command zypper in apache2 solved my problem immediately. Now php7 works on my computer. Thanks to all of you that tried to help me. Bye, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Wolfgang Mueller wrote:
On Mon, 19 Aug 2019 at 20:00:56 +0200, I wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
My mistake was relying on yast. But then I found an instruction on https://en.opensuse.org/SDB:Apache_installation which recommends the use of zypper. Consequently the command zypper in apache2 solved my problem immediately. Now php7 works on my computer.
Whether you install with zypper like above or with YaST, it makes no difference. You said you already had apache installed, so before the 'zypper in', you must have uninstalled it ? Anyway, good stuff, you got it solved. -- Per Jessen, Zürich (16.3°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 20 Aug 2019 at 07:18:22 +0200, Per Jessen wrote:
Wolfgang Mueller wrote:
On Mon, 19 Aug 2019 at 20:00:56 +0200, I wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
My mistake was relying on yast. But then I found an instruction on https://en.opensuse.org/SDB:Apache_installation which recommends the use of zypper. Consequently the command zypper in apache2 solved my problem immediately. Now php7 works on my computer.
Whether you install with zypper like above or with YaST, it makes no difference. You said you already had apache installed, so before the 'zypper in', you must have uninstalled it ?
No, I did not. At first, I used yast2 for installing apache2, but it did not work correctly. Then, without uninstalling apache2, I used zypper, just typing the command "zypper in apache2". zypper answered that apache2 had already been install such that nothing was left to be done by zypper. But nevertheless and against my expectation, it has made apache2 run correctly.
Anyway, good stuff, you got it solved.
Nothing is more convincing than the success, may it even be unexpected an incomprehensible. Bye, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 20 Aug 2019 15:37:08 +0200 Wolfgang Mueller <wm@ariannuccia.de> wrote:
On Tue, 20 Aug 2019 at 07:18:22 +0200, Per Jessen wrote:
Wolfgang Mueller wrote:
On Mon, 19 Aug 2019 at 20:00:56 +0200, I wrote:
Having installed apache2 and php7 under Leap 15.1, I started apache2 using the Services Manager of yast2.
But Google-chrome and Firefox do not recognize a php script. They treat it as a text file, trying to open and/or download it. What is wrong?
My mistake was relying on yast. But then I found an instruction on https://en.opensuse.org/SDB:Apache_installation which recommends the use of zypper. Consequently the command zypper in apache2 solved my problem immediately. Now php7 works on my computer.
Whether you install with zypper like above or with YaST, it makes no difference. You said you already had apache installed, so before the 'zypper in', you must have uninstalled it ?
No, I did not.
At first, I used yast2 for installing apache2, but it did not work correctly. Then, without uninstalling apache2, I used zypper, just typing the command "zypper in apache2".
zypper answered that apache2 had already been install such that nothing was left to be done by zypper. But nevertheless and against my expectation, it has made apache2 run correctly.
Sounds like a bug report might be appropriate.
Anyway, good stuff, you got it solved.
Nothing is more convincing than the success, may it even be unexpected an incomprehensible.
Bye, Wolfgang
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Dave Howorth
-
Knurpht-openSUSE
-
Per Jessen
-
Wolfgang Mueller