No output from newly built PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nwsgrp

    No output from newly built PHP

    Am using apache (2.0.48) and php (4.3.4) running on Linux.
    Configuring with ./configure --with-mysql
    --with-apxs2=/usr/local/apache2/bin/apxs

    Build works and no errors.
    Installing software and restarting (stop / start) apache.
    Putting php.ini into /usr/local/lib (???) according to documentation..
    However running any php (say <?php phpinfo(); ?>) script results in no
    output (at the browser) but also no errors at apache.

    I have tried this with different installations and all result in no output.
    Note that this has worked with older versions of apache and php.

    The problem is I don't know how to debug this. I have enabled all of the
    debug flags I can find in apache and have set --enable-debug whilst
    building php but cannot find any debug output from php and apache thinks
    everything is working great.

    I suspect that this may be a php.ini problem, but again have consulted
    Programming php (no real use in defining php.ini) and have looked in google
    for php.ini examples that may help but, as yet no luck.

    Any clues welcomed.

    Gr, Tim
  • Pedro Graca

    #2
    Re: No output from newly built PHP

    Nwsgrp wrote:[color=blue]
    > Am using apache (2.0.48) and php (4.3.4) running on Linux.
    > Configuring with ./configure --with-mysql
    > --with-apxs2=/usr/local/apache2/bin/apxs
    >
    > Build works and no errors.
    > Installing software and restarting (stop / start) apache.
    > Putting php.ini into /usr/local/lib (???) according to documentation..
    > However running any php (say <?php phpinfo(); ?>) script results in no
    > output (at the browser) but also no errors at apache.
    >
    > I have tried this with different installations and all result in no output.[/color]
    (...)[color=blue]
    > Any clues welcomed.[/color]

    Have you seen the HTML source?

    I suspect your Apache's httpd.conf isn't configured with

    AddType application/x-httpd-php .php
    --
    USENET would be a better place if everybody read: : mail address :
    http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
    http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
    http://www.expita.com/nomime.html : to 10K bytes :

    Comment

    • Nwsgrp

      #3
      Re: No output from newly built PHP

      Pedro Graca wrote:
      [color=blue]
      > Nwsgrp wrote:[color=green]
      >> Am using apache (2.0.48) and php (4.3.4) running on Linux.
      >> Configuring with ./configure --with-mysql
      >> --with-apxs2=/usr/local/apache2/bin/apxs
      >>
      >> Build works and no errors.
      >> Installing software and restarting (stop / start) apache.
      >> Putting php.ini into /usr/local/lib (???) according to documentation..
      >> However running any php (say <?php phpinfo(); ?>) script results in no
      >> output (at the browser) but also no errors at apache.
      >>
      >> I have tried this with different installations and all result in no
      >> output.[/color]
      > (...)[color=green]
      >> Any clues welcomed.[/color]
      >
      > Have you seen the HTML source?
      >
      > I suspect your Apache's httpd.conf isn't configured with
      >
      > AddType application/x-httpd-php .php[/color]
      I have configured the httpd.conf and am not seeing anything at all. In other
      words if the index.html file has html in it, then this works fine and I see
      the html correctly presented. However all php code simply results in a
      totally blank field. It is as if the output is generated and then thrown
      away.

      I have seen this problem reported elsewhere (with random lack of display)
      but have, as yet seen no solution.

      I have found a page that describes how to build the thing completely and I
      am going to try that. I am fairly convinced it is a configuration problem,
      either the file is in the wrong palce (I can't really believe that php.ini
      belongs in /usr/local/lib).
      Gr, Tim

      Comment

      • Nwsgrp

        #4
        Re: No output from newly built PHP

        Pedro Graca wrote:
        [color=blue]
        > Nwsgrp wrote:[color=green]
        >> Am using apache (2.0.48) and php (4.3.4) running on Linux.
        >> Configuring with ./configure --with-mysql
        >> --with-apxs2=/usr/local/apache2/bin/apxs
        >>
        >> Build works and no errors.
        >> Installing software and restarting (stop / start) apache.
        >> Putting php.ini into /usr/local/lib (???) according to documentation..
        >> However running any php (say <?php phpinfo(); ?>) script results in no
        >> output (at the browser) but also no errors at apache.
        >>
        >> I have tried this with different installations and all result in no
        >> output.[/color]
        > (...)[color=green]
        >> Any clues welcomed.[/color]
        >
        > Have you seen the HTML source?
        >
        > I suspect your Apache's httpd.conf isn't configured with
        >
        > AddType application/x-httpd-php .php[/color]
        I have followed the documentation contained in
        dan.drydog.com/apache2php.html and have completed the installation without
        any error.

        I have then made a file (say phpconf.php) and I can then see this file as a
        directory entry. When I click on the file then the browser (Mozilla) says
        that it recognises the file type (application/x-httpd-php) but doesn't know
        how to handle it. I would have thought that Apache would have launched the
        php file and returned the output.

        Just to keep me sane, I then took an older version of apache (but still
        apache2) and an older version of php and these work fine.

        By the way can anyone tell me where php puts it error logs. I have enabled
        all of the error logging in php (php.ini, contained in
        /usr/local/apache2/php) and have looked in all the normal places and can't
        see a thing. I suspect however that php isn't even getting invoked.

        Again any help welcome.

        Comment

        Working...