php does not work
am 13.08.2007 11:17:17 von cs.st.ng
Hi all,
i am just trying to install myphproject (the first php on this server) on
Suse linux 10.2, Apache 2.something.
Dns is working, virtual domain is ok. But when i try to call
myphpadm.os2.local/index.php, my browser always asks what to to ... open
with / save to disk.
Looking with yast to the http server setup tells me, that module php5 is
active. /etc/apache/conf.d/php5.conf tells me that AddHandler for .php and
some other file types is (should be?) done.
Where else must i have a look to get it working?
Thanks in Advance!
greetings from germany
Chris
Re: php does not work
am 13.08.2007 12:13:34 von unknown
Post removed (X-No-Archive: yes)
Re: php does not work
am 13.08.2007 16:22:58 von cs.st.ng
Hello Davide,
i tried to include php5.conf in the httpd.conf, i tried to set it in
/etc/sysconfig/apache2 (without .conf ???), in
/etc/apache2/sysconfig.d/include.conf it has been already included.
I always started apache new (with yast, when i ecit the http server config
it tells mw that the congiguration is written and apache activated).
No chance, the index.php is always offered to be downloaded.
Where can i find apachectl and how is it used? a find / apachectl didnt give
a result
greetings, Chris
Re: php does not work
am 13.08.2007 16:41:10 von unknown
Post removed (X-No-Archive: yes)
Re: php does not work
am 13.08.2007 17:19:34 von Mark Taylor
Christian Stüben wrote in news:f9p7mp$j4m$1
@news01.versatel.de:
> But when i try to call
> myphpadm.os2.local/index.php, my browser always asks what to to ... open
> with / save to disk.
>
This is also a symptom of your browser attempting to open a file rather
than your browser requesting apache to parse the file to the browser.
Just how are you "calling" that file? Is the browser on the same machine as
apache?
Where is myphpadm.os2.local/index.php in relation to your document root?
What happens when you put http://myphpadm.os2.local/index.php into your
browser address bar?
What happens when you put http://localhost
into your browser address bar?
What happens when you put http://localhost/index.php into your browser
address bar?
What ip address is returned when you ping or trace myphpadm.os2.local? Is
it the address of the machine running apache?
Just questions to help diagnose..
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Re: php does not work
am 13.08.2007 19:44:12 von pr0f3550r
Christian Stüben wrote:
> Hi all,
> i am just trying to install myphproject (the first php on this server) on
> Suse linux 10.2, Apache 2.something.
> Dns is working, virtual domain is ok. But when i try to call
> myphpadm.os2.local/index.php, my browser always asks what to to ... open
> with / save to disk.
Open a shell and run:
php -f /index.php
If it doesn't work, the problem could be with php.
If it does, try to run the same script as a cgi.
Ottavio
http://www.pledgebank.com/boycottvista
Re: php does not work
am 14.08.2007 07:55:38 von cs.st.ng
Hi Mark, Davide, Ottavio,
trying myphpadmin.os2.local or http://myphpadmin.os2.local in the browser,
with or without /index.php, always the same result. The browser wants to
download / open the file as sourcecode.
And yes, the browser is running on the same machine as the apache.
And the solution / workaround is ... when i try the same adress
myphpadmin.os2.local from a different linux or windows machine, the browser
shows the page as it should be. Tadaaaa. Funny, really funny.
Browser on same machine ... opens / downloads the file directly as
sourcecode.
Different machine ... works perfectly!!!
So many thanks to all of you for your help and hints, maybee tomorrow (or
today?) i will post the next problem(s).
greetings from germany
Chris
Re: php does not work
am 16.08.2007 15:30:36 von henri
On Mon, 13 Aug 2007 11:17:17 +0200, Christian Stüben wrote:
> Hi all,
> i am just trying to install myphproject (the first php on this server) on
> Suse linux 10.2, Apache 2.something.
> Dns is working, virtual domain is ok. But when i try to call
> myphpadm.os2.local/index.php, my browser always asks what to to ... open
> with / save to disk.
>
> Looking with yast to the http server setup tells me, that module php5 is
> active. /etc/apache/conf.d/php5.conf tells me that AddHandler for .php and
> some other file types is (should be?) done.
>
> Where else must i have a look to get it working?
>
> Thanks in Advance!
>
> greetings from germany
> Chris
have you tried putting those in your httpd.conf
AddType application/x-httpd-php .php .php5 .html .htm .inc
AddType application/x-httpd-php-source .phps
Re: php does not work
am 17.08.2007 09:36:55 von cs.st.ng
Hi Henri,
unfortunately the machine already is delivered and is working at my
customer, so i can´t try out your hint. As i have seen (posting from 14.08,
07:55) the effect is only shown when i call myphpadmin.os2.local from then
server machine itself. When i call this url from a different machine, all
works perfectly.
On my next suse / apache / php project i will check out if your hint helps
to get php working local on the same machine.
Thank you!
greetings from germany
chris