Results 1 to 9 of 9

Thread: Browser problems with php

  1. #1
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Browser problems with php

    No matter what browser I use, trying to open phpscript it asks me to save file or to open with some application.

    Probably has to do with some system settings/local apache settings, as it happens within my local apache.

    I noted php (on system level) is registered to Kate.
    I do not know exactly what is causing the problem.

    Just want to be opened as index.html
    http://localhost/index.php and not to ask me to save file.

    How do I correct this?
    Thanks
    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

  2. #2
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,693
    Blog Entries
    1

    Default Re: Browser problems with php

    The file association for a particular file type can be set via

    KDE System Settings > Advanced > File Associations

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Browser problems with php

    If you want to view a PHP script as it would appear on a website, you have to do it through a web server. PHP files are programs, and need to be run by the PHP interpreter in the web server. Accessing the file directly won't do it.

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,693
    Blog Entries
    1

    Default Re: Browser problems with php

    Just want to be opened as index.html
    http://localhost/index.php and not to ask me to save file.
    As ken_yap mentioned, if you're trying to view the results via a browser, set up an apache web server first.

  5. #5
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: Browser problems with php

    Yes, that was original question. How do I make apache open?
    I seem to miss some setting and I do not know which one.
    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,039
    Blog Entries
    14

    Default Re: Browser problems with php

    install yast-http-server, start yast-network services-http server to configure things to your need. Then remove the index.html from the webserver's root (default /srv/www/htdocs/ ) and replace it by your index.php, that should work.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: Browser problems with php

    I dont have http server there listed. Strange, apache is installed by Yast...

    Anyways, if you say what settings, I can alter httpd.conf (or anyother conf) manually.. I may ever use webmin..
    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,768

    Default Re: Browser problems with php

    You need to install yast-http-server module to get the yast interface it is not installed by default.

  9. #9
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: Browser problems with php

    Yap, that was it.
    It reinstalled PHP5, with vendor change, and things begin to work.

    Thanks.
    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •