php on slackware 11.0 - Slackware

This is a discussion on php on slackware 11.0 - Slackware ; I can get this test.php script to execute from localhost: phpinfo(); ?> The results seem OK except for one notation: Virtual Directory support |disabled But nothing more complicated with the suffix .php will execute. I enabled everything I could find ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: php on slackware 11.0

  1. php on slackware 11.0

    I can get this test.php script to execute from localhost:
    phpinfo();
    ?>
    The results seem OK except for one notation:
    Virtual Directory support |disabled

    But nothing more complicated with the suffix .php will execute.
    I enabled everything I could find in httpd.conf relating to php.

    What more need I do? Must I download and reinstall apache and php?

    I have several web page templates that are built out of php files.
    None of them execute correctly.

    John Culleton


  2. Re: php on slackware 11.0

    john@wexfordpress.com schreef:
    > I can get this test.php script to execute from localhost:
    > > phpinfo();
    > ?>
    > The results seem OK except for one notation:
    > Virtual Directory support |disabled
    >
    > But nothing more complicated with the suffix .php will execute.
    > I enabled everything I could find in httpd.conf relating to php.
    >
    > What more need I do? Must I download and reinstall apache and php?
    >
    > I have several web page templates that are built out of php files.
    > None of them execute correctly.

    Did you check:
    /etc/apache/mod_php.conf ?

    Bart

  3. Re: php on slackware 11.0

    On Jun 14, 8:00 am, "B." wrote:
    > j...@wexfordpress.com schreef:> I can get this test.php script to execute from localhost:
    > > > > phpinfo();
    > > ?>
    > > The results seem OK except for one notation:
    > > Virtual Directory support |disabled

    >
    > > But nothing more complicated with the suffix .php will execute.
    > > I enabled everything I could find in httpd.conf relating to php.

    >
    > > What more need I do? Must I download and reinstall apache and php?

    >
    > > I have several web page templates that are built out of php files.
    > > None of them execute correctly.

    >
    > Did you check:
    > /etc/apache/mod_php.conf ?
    >
    > Bart


    Yes. Here it is:
    ----------------
    #
    # mod_php - PHP Hypertext Preprocessor module
    #

    # Load the PHP module:
    LoadModule php4_module libexec/apache/libphp4.so

    # Tell Apache to feed all *.php files through the PHP module:
    AddType application/x-httpd-php .php

    # This will display PHP files in colored syntax form. Use with
    caution.
    #AddType application/x-httpd-php-source .phps
    --------------------------------
    Should I add or change anything?

    JRC



  4. Re: php on slackware 11.0

    john@wexfordpress.com schreef:
    [snip original question]
    >> Did you check:
    >> /etc/apache/mod_php.conf ?
    >>
    >> Bart

    >
    > Yes. Here it is:
    > ----------------
    > #
    > # mod_php - PHP Hypertext Preprocessor module
    > #
    >
    > # Load the PHP module:
    > LoadModule php4_module libexec/apache/libphp4.so
    >
    > # Tell Apache to feed all *.php files through the PHP module:
    > AddType application/x-httpd-php .php
    >
    > # This will display PHP files in colored syntax form. Use with
    > caution.
    > #AddType application/x-httpd-php-source .phps
    > --------------------------------
    > Should I add or change anything?

    If the file suffix is indeed .php then this should be all you need if
    you've enabled PHP in httpd.conf. If you see the phpinfo() page this
    tells you that Apache and PHP are correctly configured.

    You did start Apache again with:
    /usr/sbin/apachectl stop
    /usr/sbin/apachectl start
    I presume?

    So the problem must be elsewhere. Please be more precise in your
    question than just stating 'it doesn't work'. Where are your files
    located (under /var/www/htdocs on a stock Slackware 11 install), do they
    have the right permissions set, do you get an error message, etc.?

    B

  5. Re: php on slackware 11.0

    On Jun 14, 9:06 am, "B." wrote:
    > j...@wexfordpress.com schreef:
    > [snip original question]
    >
    > >> Did you check:
    > >> /etc/apache/mod_php.conf ?

    >
    > >> Bart

    >
    > > Yes. Here it is:
    > > ----------------
    > > #
    > > # mod_php - PHP Hypertext Preprocessor module
    > > #

    >
    > > # Load the PHP module:
    > > LoadModule php4_module libexec/apache/libphp4.so

    >
    > > # Tell Apache to feed all *.php files through the PHP module:
    > > AddType application/x-httpd-php .php

    >
    > > # This will display PHP files in colored syntax form. Use with
    > > caution.
    > > #AddType application/x-httpd-php-source .phps
    > > --------------------------------
    > > Should I add or change anything?

    >
    > If the file suffix is indeed .php then this should be all you need if
    > you've enabled PHP in httpd.conf. If you see the phpinfo() page this
    > tells you that Apache and PHP are correctly configured.
    >
    > You did start Apache again with:
    > /usr/sbin/apachectl stop
    > /usr/sbin/apachectl start
    > I presume?
    >

    Yes,
    > So the problem must be elsewhere. Please be more precise in your
    > question than just stating 'it doesn't work'. Where are your files
    > located (under /var/www/htdocs on a stock Slackware 11 install), do they
    > have the right permissions set, do you get an error message, etc.?
    >
    > B

    The files are in subdirectories of the /var/www/htdocs directory. When
    I address
    e.g., /http://localhost/sample I get a list of the files in the
    directory. When I click on e.g, index.php I just get a blank window,
    with "done" in the lower left corner.

    Here is index.php:
    ---------------------------








    -----------------------------------
    There are files header.php and footer.php etc. in the same directory.
    All these files have permissions of 777.


  6. Re: php on slackware 11.0

    john@wexfordpress.com schreef:
    > On Jun 14, 9:06 am, "B." wrote:
    >> j...@wexfordpress.com schreef:
    >> [snip]

    > The files are in subdirectories of the /var/www/htdocs directory. When
    > I address
    > e.g., /http://localhost/sample I get a list of the files in the
    > directory. When I click on e.g, index.php I just get a blank window,
    > with "done" in the lower left corner.
    >
    > Here is index.php:
    > ---------------------------

    [snip content of index.php]
    > -----------------------------------
    > There are files header.php and footer.php etc. in the same directory.
    > All these files have permissions of 777.

    That looks like an attempt to install WordPress?

    If you're not a newbie I apologize in advance for the next question ;-):
    but you did install the MySQL dbase and followed the install
    instructions that can be found at www.wordpress.org?

    Bart

  7. Re: php on slackware 11.0

    On Jun 14, 9:26 am, "j...@wexfordpress.com"
    wrote:
    > On Jun 14, 9:06 am, "B." wrote:
    >
    > > j...@wexfordpress.com schreef:
    > > [snip original question]

    >
    > > >> Did you check:
    > > >> /etc/apache/mod_php.conf ?

    >
    > > >> Bart

    >
    > > > Yes. Here it is:
    > > > ----------------
    > > > #
    > > > # mod_php - PHP Hypertext Preprocessor module
    > > > #

    >
    > > > # Load the PHP module:
    > > > LoadModule php4_module libexec/apache/libphp4.so

    >
    > > > # Tell Apache to feed all *.php files through the PHP module:
    > > > AddType application/x-httpd-php .php

    >
    > > > # This will display PHP files in colored syntax form. Use with
    > > > caution.
    > > > #AddType application/x-httpd-php-source .phps
    > > > --------------------------------
    > > > Should I add or change anything?

    >
    > > If the file suffix is indeed .php then this should be all you need if
    > > you've enabled PHP in httpd.conf. If you see the phpinfo() page this
    > > tells you that Apache and PHP are correctly configured.

    >
    > > You did start Apache again with:
    > > /usr/sbin/apachectl stop
    > > /usr/sbin/apachectl start
    > > I presume?

    >
    > Yes,
    > > So the problem must be elsewhere. Please be more precise in your
    > > question than just stating 'it doesn't work'. Where are your files
    > > located (under /var/www/htdocs on a stock Slackware 11 install), do they
    > > have the right permissions set, do you get an error message, etc.?

    >
    > > B

    >
    > The files are in subdirectories of the /var/www/htdocs directory. When
    > I address
    > e.g., /http://localhost/sampleI get a list of the files in the
    > directory. When I click on e.g, index.php


    Ok. this implies that you haven't set apache to recognize index.php as
    a DirectoryIndex

    So, edit your httpd.conf file to modify the DirectoryIndex directive
    to look something like
    DirectoryIndex index.php index.html index.htm
    and restart apache


    > I just get a blank window,
    > with "done" in the lower left corner.

    [snip]
    > There are files header.php and footer.php etc. in the same directory.


    Like Bart said, have you installed and enabled MySQL? Have you
    installed the MySQL db for Wordpress? Did you follow the other install
    procedures related to the package?

    > All these files have permissions of 777.


    Gaak!! chmod a-x *.php *.htm*
    You don't need (or want) execute access on those files!




  8. Re: php on slackware 11.0

    Lew Pitcher wrote:
    >> All these files have permissions of 777.

    >
    > Gaak!! chmod a-x *.php *.htm*
    > You don't need (or want) execute access on those files!


    And not even WRITE access for the http server. Attributes
    rw-r--r-- (644) with owner the "maintainer" of those pages
    should be more then enough.
    --
    ************************************************** ******************
    ** Eef Hartman, Delft University of Technology, dept. EWI/TW **
    ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
    ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
    ************************************************** ******************

  9. Re: php on slackware 11.0

    On Jun 14, 9:06 am, "B." wrote:
    > j...@wexfordpress.com schreef:
    > [snip original question]
    >
    > >> Did you check:
    > >> /etc/apache/mod_php.conf ?

    >
    > >> Bart

    >
    > > Yes. Here it is:
    > > ----------------
    > > #
    > > # mod_php - PHP Hypertext Preprocessor module
    > > #

    >
    > > # Load the PHP module:
    > > LoadModule php4_module libexec/apache/libphp4.so

    >
    > > # Tell Apache to feed all *.php files through the PHP module:
    > > AddType application/x-httpd-php .php

    >
    > > # This will display PHP files in colored syntax form. Use with
    > > caution.
    > > #AddType application/x-httpd-php-source .phps
    > > --------------------------------
    > > Should I add or change anything?

    >
    > If the file suffix is indeed .php then this should be all you need if
    > you've enabled PHP in httpd.conf. If you see the phpinfo() page this
    > tells you that Apache and PHP are correctly configured.
    >
    > You did start Apache again with:
    > /usr/sbin/apachectl stop
    > /usr/sbin/apachectl start
    > I presume?
    >
    > So the problem must be elsewhere. Please be more precise in your
    > question than just stating 'it doesn't work'. Where are your files
    > located (under /var/www/htdocs on a stock Slackware 11 install), do they
    > have the right permissions set, do you get an error message, etc.?
    >
    > B


    I reinstalled the mysql that comes with Slack. I deinstalled it with
    pkgtool then I reinstalled it with pkgtool. I ran mysql_install_db. I
    changed all the ownership in /var/lib/miysql to mysql:mysql. The user
    mysql and group mysql
    already exist. I rebooted. msqld_safe is up and running. Next I need
    to provide a password. Here is the command and the error:

    mysqladmin -u root password 'mypassword'
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password:
    NO)'
    I also tried the same command with -h localhost and -h hdb4. Both
    failed the same way.

    This is a consistent result. It is a catch 22. The first thing I must
    do is create a password but that step fails every time.

    It appears that I am not fated to make this combination of php, apache
    and mysql work.

    Can I have the wisdom of the group one more time?

    John C.


  10. Re: php on slackware 11.0

    On 2007-06-16, john@wexfordpress.com wrote:

    > already exist. I rebooted. msqld_safe is up and running. Next I need
    > to provide a password. Here is the command and the error:
    >
    > mysqladmin -u root password 'mypassword'
    > mysqladmin: connect to server at 'localhost' failed
    > error: 'Access denied for user 'root'@'localhost' (using password:
    > NO)'




    Try: mysql -uroot -p
    then enter the password when prompted. If that works,
    try: mysqladmin -uroot -p status
    then enter the password when prompted.

    Best of luck,

    Charles

  11. Re: php on slackware 11.0

    On Jun 16, 3:29 pm, Charles Polisher wrote:
    > On 2007-06-16, j...@wexfordpress.com wrote:
    >
    >
    >
    > > already exist. I rebooted. msqld_safe is up and running. Next I need
    > > to provide a password. Here is the command and the error:

    >
    > > mysqladmin -u root password 'mypassword'
    > > mysqladmin: connect to server at 'localhost' failed
    > > error: 'Access denied for user 'root'@'localhost' (using password:
    > > NO)'

    >
    >
    >
    > Try: mysql -uroot -p
    > then enter the password when prompted. If that works,
    > try: mysqladmin -uroot -p status
    > then enter the password when prompted.
    >
    > Best of luck,
    >
    > Charles


    That worked, but for a different reason. Per your example I
    eliminated
    the space between the -u and root and between the -p and
    my password thus:
    mysqladmin -uroot -pmypassword
    Then I tried your second line and it worked too.
    That's a little gotcha not explained in the books.

    Thanks very much.

    Onward and upward! (before breakfast yet!)

    John C.



+ Reply to Thread