IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Apache Discussion :

Probleme avec suPHP


Sujet :

Apache

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Par défaut Probleme avec suPHP
    Bonjours voila j'ai un serveur sous RedHat 7.1

    Apache 1.3.x
    PHP4.x
    et le fameu suPHP-0.5.2 ...

    tout les make ce sont bien passer les install aussi puisque je peut ouvrir mes page php sans probleme mais suPHP ne prend pas en compte les droit du fichier ... donc je reste toujours en nobody

    en fait ce que je cherche a fair c'est juste de rebooter le serveur mais les command reboot et shutdown ne sont permise qu'SU ...

    je met mon httpd.conf si ca peut aider ...

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    ##
    ## httpd.conf -- Apache HTTP server configuration file
    ##
     
    #
    # Based upon the NCSA server configuration files originally by Rob McCool.
    #
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/> for detailed information about
    # the directives.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.  
    #
    # After this file is processed, the server will look for and process
    # /usr/local/apache/conf/srm.conf and then /usr/local/apache/conf/access.conf
    # unless you have overridden these with ResourceConfig and/or
    # AccessConfig directives here.
    #
    # The configuration directives are grouped into three basic sections:
    #  1. Directives that control the operation of the Apache server process as a
    #     whole (the 'global environment').
    #  2. Directives that define the parameters of the 'main' or 'default' server,
    #     which responds to requests that aren't handled by a virtual host.
    #     These directives also provide default values for the settings
    #     of all virtual hosts.
    #  3. Settings for virtual hosts, which allow Web requests to be sent to
    #     different IP addresses or hostnames and have them handled by the
    #     same Apache server process.
    #
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path.  If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
    # with ServerRoot set to "/usr/local/apache" will be interpreted by the
    # server as "/usr/local/apache/logs/foo.log".
    #
     
    ### Section 1: Global Environment
    #
    # The directives in this section affect the overall operation of Apache,
    # such as the number of concurrent requests it can handle or where it
    # can find its configuration files.
    #
     
    #
    # ServerType is either inetd, or standalone.  Inetd mode is only supported on
    # Unix platforms.
    #
    ServerType standalone
     
    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # NOTE!  If you intend to place this on an NFS (or otherwise network)
    # mounted filesystem then please read the LockFile documentation
    # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
    # you will save yourself a lot of trouble.
    #
    ServerRoot "/usr/local/apache"
     
    #
    # The LockFile directive sets the path to the lockfile used when Apache
    # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
    # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
    # its default value. The main reason for changing it is if the logs
    # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
    # DISK. The PID of the main server process is automatically appended to
    # the filename. 
    #
    #LockFile /usr/local/apache/logs/httpd.lock
     
    #
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    #
    PidFile /usr/local/apache/logs/httpd.pid
     
    #
    # ScoreBoardFile: File used to store internal server process information.
    # Not all architectures require this.  But if yours does (you'll know because
    # this file will be  created when you run Apache) then you *must* ensure that
    # no two invocations of Apache share the same scoreboard file.
    #
    ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
     
    #
    # In the standard configuration, the server will process httpd.conf (this 
    # file, specified by the -f command line option), srm.conf, and access.conf 
    # in that order.  The latter two files are now distributed empty, as it is 
    # recommended that all directives be kept in a single file for simplicity.  
    # The commented-out values below are the built-in defaults.  You can have the 
    # server ignore these files altogether by using "/dev/null" (for Unix) or
    # "nul" (for Win32) for the arguments to the directives.
    #
    #ResourceConfig /usr/local/apache/conf/srm.conf
    #AccessConfig /usr/local/apache/conf/access.conf
     
    #
    # Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 300
     
    #
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    #
    KeepAlive On
     
    #
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    #
    MaxKeepAliveRequests 100
     
    #
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    #
    KeepAliveTimeout 15
     
    #
    # Server-pool size regulation.  Rather than making you guess how many
    # server processes you need, Apache dynamically adapts to the load it
    # sees --- that is, it tries to maintain enough server processes to
    # handle the current load, plus a few spare servers to handle transient
    # load spikes (e.g., multiple simultaneous requests from a single
    # Netscape browser).
    #
    # It does this by periodically checking how many servers are waiting
    # for a request.  If there are fewer than MinSpareServers, it creates
    # a new spare.  If there are more than MaxSpareServers, some of the
    # spares die off.  The default values are probably OK for most sites.
    #
    MinSpareServers 5
    MaxSpareServers 10
     
    #
    # Number of servers to start initially --- should be a reasonable ballpark
    # figure.
    #
    StartServers 5
     
    #
    # Limit on total number of servers running, i.e., limit on the number
    # of clients who can simultaneously connect --- if this limit is ever
    # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
    # It is intended mainly as a brake to keep a runaway server from taking
    # the system with it as it spirals down...
    #
    MaxClients 150
     
    #
    # MaxRequestsPerChild: the number of requests each child process is
    # allowed to process before the child dies.  The child will exit so
    # as to avoid problems after prolonged use when Apache (and maybe the
    # libraries it uses) leak memory or other resources.  On most systems, this
    # isn't really needed, but a few (such as Solaris) do have notable leaks
    # in the libraries. For these platforms, set to something like 10000
    # or so; a setting of 0 means unlimited.
    #
    # NOTE: This value does not include keepalive requests after the initial
    #       request per connection. For example, if a child process handles
    #       an initial request and 10 subsequent "keptalive" requests, it
    #       would only count as 1 request towards this limit.
    #
    MaxRequestsPerChild 0
     
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    #Listen 3000
    #Listen 12.34.56.78:80
     
    #
    # BindAddress: You can support virtual hosts with this option. This directive
    # is used to tell the server which IP address to listen to. It can either
    # contain "*", an IP address, or a fully qualified Internet domain name.
    # See also the <VirtualHost> and Listen directives.
    #
    #BindAddress *
     
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Please read the file http://httpd.apache.org/docs/dso.html for more
    # details about the DSO mechanism and run `httpd -l' for the list of already
    # built-in (statically linked and thus always available) modules in your httpd
    # binary.
    #
    # Note: The order in which modules are loaded is important.  Don't change
    # the order below without expert advice.
    #
    # Example:
    # LoadModule foo_module libexec/mod_foo.so
    LoadModule php4_module        libexec/libphp4.so
    LoadModule suphp_module       libexec/mod_suphp.so
     
    #
    # ExtendedStatus controls whether Apache will generate "full" status
    # information (ExtendedStatus On) or just basic information (ExtendedStatus
    # Off) when the "server-status" handler is called. The default is Off.
    #
    #ExtendedStatus On
     
    ### Section 2: 'Main' server configuration
    #
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition.  These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    #
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    #
     
    #
    # If your ServerType directive (set earlier in the 'Global Environment'
    # section) is set to "inetd", the next few directives don't have any
    # effect since their settings are defined by the inetd configuration.
    # Skip ahead to the ServerAdmin directive.
    #
     
    #
    # Port: The port to which the standalone server listens. For
    # ports < 1023, you will need httpd to be run as root initially.
    #
    Port 80
     
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
    #  . On HPUX you may not be able to use shared memory as nobody, and the
    #    suggested workaround is to create a user www and use that user.
    #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
    #  when the value of (unsigned)Group is above 60000; 
    #  don't use Group "#-1" on these systems!
    #
    User nobody
    Group nobody
     
    #
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed.  This address appears on some server-generated pages, such
    # as error documents.
    #
    ServerAdmin root@grventes.ecole.org
     
    #
    # ServerName allows you to set a host name which is sent back to clients for
    # your server if it's different than the one the program would get (i.e., use
    # "www" instead of the host's real name).
    #
    # Note: You cannot just invent host names and hope they work. The name you 
    # define here must be a valid DNS name for your host. If you don't understand
    # this, ask your network administrator.
    # If your host doesn't have a registered DNS name, enter its IP address here.
    # You will have to access it by its address (e.g., http://123.45.67.89/)
    # anyway, and this will make redirections work in a sensible way.
    #
    # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your 
    # machine always knows itself by this address. If you use Apache strictly for 
    # local testing and development, you may use 127.0.0.1 as the server name.
    #
    ServerName localhot:80
     
    AddType application/x-httpd-php .php .php3
    AddType application/x-httpd-php-source .phps
    suPHP_Engine on
    php_admin_flag engin off
    AddType application/x-httpd-php .php
    AddHandler x-httpd-php .php
     
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/home/samba/www2"
     
    #
    # Each directory to which Apache has access, can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories). 
    #
    # First, we configure the "default" to be a very restrictive set of 
    # permissions.  
    #
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
     
    #
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    #
     
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    #<Directory "/usr/local/apache/htdocs">
    <Directory "/home/samba/www2">
    #
    # This may also be "None", "All", or any combination of "Indexes",
    # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
        Options Indexes FollowSymLinks MultiViews
     
    #
    # This controls which options the .htaccess files in directories can
    # override. Can also be "All", or any combination of "Options", "FileInfo", 
    # "AuthConfig", and "Limit"
    #
        AllowOverride None
     
    #
    # Controls who can get stuff from this server.
    #
        Order allow,deny
        Allow from all
    </Directory>
    ...

  2. #2
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    Vous ne pouvez plus utiliser PHP en tant que module Apache si vous souhaitez utiliser suPHP sinon ce dernier ne sert à rien.

    Voilà comment je l'avais mis en place avec une version 0.6.2, dans le fichier httpd.conf :

    Configurer suPHP, fichier suphp.conf (ne pas oublier qu'ils dépendent aussi des options de compilation utilisées) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    [global]
    ;Path to logfile
    logfile=/var/log/suphp.log
     
    ;Loglevel
    loglevel=warn
     
    ;User Apache is running as
    webserver_user=nobody
     
    ;Path all scripts have to be in
    docroot=/usr/local/apache/htdocs
     
    ; Security options
    allow_file_group_writeable=true
    allow_file_others_writeable=false
    allow_directory_group_writeable=false
    allow_directory_others_writeable=false
     
    ;Check wheter script is within DOCUMENT_ROOT
    check_vhost_docroot=true
     
    ;Send minor error messages to browser
    ;errors_to_browser=false
    errors_to_browser=true
     
    ;PATH environment variable
    env_path=/bin:/usr/bin
     
    ;Umask to set, specify in octal notation
    umask=0077
     
    ; Minimum UID
    min_uid=1000
     
    ; Minimum GID
    min_gid=1000
     
     
    [handlers]
    ;Handler for php-scripts
    x-httpd-php=php:/usr/local/php5/bin/php ; Chemin vers la commande PHP (CLI/CGI)
    Envisagez une mise à jour de suPHP, ce composant est important et a évolué entre temps !

  3. #3
    Nouveau membre du Club
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Par défaut
    Merci je vais tester ca ...

    parcontre ou metre le suphp.conf ?

    et pour PHP4 faut juste que je retire l'ouverture des fichier .PHP et le chargement du module dans httpd.conf c'est bien ca ?

    Dezoler je connaissai apaine Apache sous win alors la sous linux je decouvre un peut tout en meme temps le system et le prog

    Merci.

  4. #4
    Membre expérimenté

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Par défaut
    Citation Envoyé par darko91
    parcontre ou metre le suphp.conf ?
    ça dépend comment il est installé. Si vous le faites à partir des sources, il s'agit de $PREFIX/etc/suphp.conf (où $PREFIX est la valeur de l'option --prefix sachant qu'elle vaut par défaut /usr/local).

    Citation Envoyé par darko91
    pour PHP4 faut juste que je retire l'ouverture des fichier .PHP
    Vous voulez parler de AddHandler et AddType ? Oui, je vous ai donné un exemple plus haut. En fait il faut diriger la gestion de ces extensions vers suPHP au lieu de PHP. suPHP agira comme un intermédiaire. Par contre, PHP ne fonctionnant plus comme module, vous ne pourrez plus utiliser les directives php(_admin)_[flag|value].

    Citation Envoyé par darko91
    et le chargement du module dans httpd.conf c'est bien ca ?
    Oui PHP ne doit plus y figurer, suPHP le "remplace".

  5. #5
    Nouveau membre du Club
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Par défaut
    Bon alors j'ai tous reinstaller ... mais je peut pas ouvrir les page php maintenant

    voila ce que j'ai ...

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, ****@*******.** and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.
    donc je vais voir le log et il me met ca :

    [Mon Jul 09 22:20:32 2007] [error] UID of /usr/local/apache/htdocs/index.php or its target (0 / root) < 100
    C'est grave docteur ? je pense que je suis pas tres loin mais ca bloque encore

  6. #6
    Nouveau membre du Club
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Par défaut
    oup j'ai rebooter le pc et maintenant il me dit dans le log :

    [Mon Jul 09 22:31:27 2007] [error] Script (/usr/local/apache/htdocs/index.php) is writeable by others

Discussions similaires

  1. Probleme avec la copie des surfaces
    Par Black_Daimond dans le forum DirectX
    Réponses: 3
    Dernier message: 09/01/2003, 10h33
  2. Problèmes avec le filtrage des ip
    Par berry dans le forum Réseau
    Réponses: 9
    Dernier message: 30/12/2002, 07h51
  3. probleme avec la touche F10
    Par b.grellee dans le forum Langage
    Réponses: 2
    Dernier message: 15/09/2002, 22h04
  4. Probleme avec fseek
    Par Bjorn dans le forum C
    Réponses: 5
    Dernier message: 04/08/2002, 07h17
  5. [Kylix] probleme avec un imagelist
    Par NicoLinux dans le forum EDI
    Réponses: 4
    Dernier message: 08/06/2002, 23h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo