Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Invalid command 'php_value'

  1. #1
    Join Date
    Feb 2007
    Location
    Missouri
    Beans
    19
    Distro
    Ubuntu 6.10 Edgy

    Question Invalid command 'php_value'

    I'm trying to migrate our web farm (about 25 servers) from gentoo to ubuntu. When I try start the server I get the following error message.

    Code:
    Syntax error on line 10 of /etc/apache2/sites-enabled/00_default_vhost.conf:
    Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
    I do NEED the php_value for the linuxodbc driver for as400. What module do I need to install to get this working?

    Ubuntu Server 10.4 64bit

  2. #2
    Join Date
    Jun 2010
    Location
    Vienna
    Beans
    109
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Invalid command 'php_value'

    please post the vhost section including this command

  3. #3
    Join Date
    Feb 2007
    Location
    Missouri
    Beans
    19
    Distro
    Ubuntu 6.10 Edgy

    Re: Invalid command 'php_value'

    Here is the 00_default_vhost.conf

    Code:
    <VirtualHost *:80>
    
            #[]--------------------------------------[]
            #[] default vhost                        []
            #[]--------------------------------------[]
            ServerName farmdefault
            DocumentRoot /u01/www/production/tb
            #DocumentRoot /var/www/localhost/htdocs
            <Location ~ /.* >
                    php_value include_path "/usr/share/php5:/u01/www/production/tb:/u01/www/production/mbs:/u01/www/settings/production"
                    php_value odbc.default_db "DBNAME"
                    php_value odbc.default_user "DBUSER"
                    php_value odbc.default_pw "DBPASS"
            </Location>
            <Directory /*>
                    Options +FollowSymLinks
                    Order allow,deny
                    Allow from all
            </Directory>
    </VirtualHost>

  4. #4
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Invalid command 'php_value'

    Code:
    sudo apt-get install libapache2-mod-php5
    sudo a2enmod php5
    sudo /etc/init.d/apache2 restart

  5. #5
    Join Date
    Jun 2010
    Location
    Vienna
    Beans
    109
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Invalid command 'php_value'

    I'm quite sure there's no php_value directive for apache - so, this piece of code has to be put in the related php files. apache don't knows what to do with that.

  6. #6
    Join Date
    Feb 2007
    Location
    Missouri
    Beans
    19
    Distro
    Ubuntu 6.10 Edgy

    Re: Invalid command 'php_value'

    I already have php installed.

    Code:
    libapache2-mod-php5 is already the newest version.
    I Figured I should post my other main config files.

    Here is my apache2.conf, without the comments

    Code:
    ServerRoot "/etc/apache2"
    LockFile /var/lock/apache2/accept.lock
    PidFile ${APACHE_PID_FILE}
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    
    <IfModule mpm_prefork_module>
        StartServers          5
        MinSpareServers       5
        MaxSpareServers      10
        ServerLimit         375
        MaxClients          375
        MaxRequestsPerChild   0
    </IfModule>
    
    <IfModule mpm_worker_module>
        StartServers          2
        MinSpareThreads      25
        MaxSpareThreads      75
        ThreadLimit          64
        ThreadsPerChild      25
        MaxClients          150
        MaxRequestsPerChild   0
    </IfModule>
    
    <IfModule mpm_event_module>
        StartServers          2
        MaxClients          150
        MinSpareThreads      25
        MaxSpareThreads      75
        ThreadLimit          64
        ThreadsPerChild      25
        MaxRequestsPerChild   0
    </IfModule>
    
    User apache
    Group apache
    
    AccessFileName .htaccess
    
    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
        Satisfy all
    </Files>
    
    DefaultType text/plain
    HostnameLookups Off
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    Include /etc/apache2/mods-enabled/*.load
    Include /etc/apache2/mods-enabled/*.conf
    Include /etc/apache2/httpd.conf #this is where we load modules from
    Include /etc/apache2/ports.conf
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
    Include /etc/apache2/conf.d/
    Include /etc/apache2/vhosts.d/
    And here is my http.conf where I load my modules (rather than mod-enabled/*.load files)

    Code:
    LoadModule actions_module /usr/lib/apache2/modules/mod_actions.so
    LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
    LoadModule asis_module /usr/lib/apache2/modules/mod_asis.so
    LoadModule auth_basic_module /usr/lib/apache2/modules/mod_auth_basic.so
    LoadModule authn_default_module /usr/lib/apache2/modules/mod_authn_default.so
    LoadModule authn_file_module /usr/lib/apache2/modules/mod_authn_file.so
    LoadModule authz_default_module /usr/lib/apache2/modules/mod_authz_default.so
    LoadModule authz_groupfile_module /usr/lib/apache2/modules/mod_authz_groupfile.so
    LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
    LoadModule authz_user_module /usr/lib/apache2/modules/mod_authz_user.so
    LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
    
    <IfDefine CACHE>
    LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so
    </IfDefine>
    LoadModule cern_meta_module /usr/lib/apache2/modules/mod_cern_meta.so
    LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
    LoadModule charset_lite_module /usr/lib/apache2/modules/mod_charset_lite.so
    <IfDefine DAV>
    LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
    </IfDefine>
    <IfDefine DAV>
    LoadModule dav_fs_module /usr/lib/apache2/modules/mod_dav_fs.so
    </IfDefine>
    LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
    LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
    <IfDefine CACHE>
    LoadModule disk_cache_module /usr/lib/apache2/modules/mod_disk_cache.so
    </IfDefine>
    LoadModule env_module /usr/lib/apache2/modules/mod_env.so
    LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so
    LoadModule ext_filter_module /usr/lib/apache2/modules/mod_ext_filter.so
    <IfDefine CACHE>
    LoadModule file_cache_module /usr/lib/apache2/modules/mod_file_cache.so
    </IfDefine>
    LoadModule filter_module /usr/lib/apache2/modules/mod_filter.so
    LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
    LoadModule include_module /usr/lib/apache2/modules/mod_include.so
    <IfDefine INFO>
    LoadModule info_module /usr/lib/apache2/modules/mod_info.so
    </IfDefine>
    LoadModule log_config_module /usr/lib/apache2/modules/mod_log_config.so
    LoadModule logio_module /usr/lib/apache2/modules/mod_logio.so
    <IfDefine CACHE>
    LoadModule mem_cache_module /usr/lib/apache2/modules/mod_mem_cache.so
    </IfDefine>
    LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
    LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so
    LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
    LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
    LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so
    
    <IfDefine SSL>
    LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
    </IfDefine>
    <IfDefine STATUS>
    LoadModule status_module /usr/lib/apache2/modules/mod_status.so
    </IfDefine>
    LoadModule unique_id_module /usr/lib/apache2/modules/mod_unique_id.so
    <IfDefine USERDIR>
    LoadModule userdir_module /usr/lib/apache2/modules/mod_userdir.so
    </IfDefine>
    LoadModule usertrack_module /usr/lib/apache2/modules/mod_usertrack.so

  7. #7
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Invalid command 'php_value'

    Quote Originally Posted by dapperdanny77 View Post
    I'm quite sure there's no php_value directive for apache - so, this piece of code has to be put in the related php files. apache don't knows what to do with that.
    http://php.net/manual/en/configuration.changes.php
    There are several Apache directives that allow you to change the PHP configuration from within the Apache configuration files.

  8. #8
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Invalid command 'php_value'

    Quote Originally Posted by TheDigitalNinja View Post
    And here is my http.conf where I load my modules (rather than mod-enabled/*.load files)
    Well, you have to load the php module. I already told you the correct way to do that in ubuntu. I wouldn't recommend using httpd.conf to load modules.

  9. #9
    Join Date
    Feb 2007
    Location
    Missouri
    Beans
    19
    Distro
    Ubuntu 6.10 Edgy

    Re: Invalid command 'php_value'

    I should also add that all of these config files do work and are currently hosting a site that gets 100k hits a day.

    I'm just trying to move from Gentoo to Ubuntu.

  10. #10
    Join Date
    Jun 2010
    Location
    Vienna
    Beans
    109
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Invalid command 'php_value'

    ahh - learned something new

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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