2017-08-05 3 views
0

J'ai actuellement un serveur dédié qui exécute WHM/cPanel.
J'ai rencontré un problème après avoir téléchargé mon projet sur mon site Web. L'erreur:Erreur dans php.ini personnalisé: "Commande invalide 'php_value', peut-être mal orthographiée ou définie par un module non inclus dans la configuration du serveur"

Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration 

Ma question est:
Est-il possible d'exécuter la coutume php.ini pour obtenir mon fonctionnement du projet?
J'ai essayé d'éditer le php-70u (que je cours sur mon serveur) pour éditer mon fichier php.ini personnalisé.
Mais cela n'a pas fonctionné pour une raison quelconque. Pourrais-je avoir un coup de main?

Et mon .htaccess

php_value post_max_size 500M 
php_value upload_max_filesize 500M 
php_value max_execution_time 60000 

Mon php.ini personnalisé

[PHP] 

;;;;;;;;;;;;;;;;; 
; Data Handling ; 
;;;;;;;;;;;;;;;;; 

; The separator used in PHP generated URLs to separate arguments. 
; PHP's default setting is "&". 
; http://php.net/arg-separator.output 
; Example: 
;arg_separator.output = "&" 

; List of separator(s) used by PHP to parse input URLs into variables. 
; PHP's default setting is "&". 
; NOTE: Every character in this directive is considered as separator! 
; http://php.net/arg-separator.input 
; Example: 
;arg_separator.input = ";&" 

; This directive determines which super global arrays are registered when PHP 
; starts up. G,P,C,E & S are abbreviations for the following respective super 
; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty 
; paid for the registration of these arrays and because ENV is not as commonly 
; used as the others, ENV is not recommended on productions servers. You 
; can still get access to the environment variables through getenv() should you 
; need to. 
; Default Value: "EGPCS" 
; Development Value: "GPCS" 
; Production Value: "GPCS"; 
; http://php.net/variables-order 
variables_order = "GPCS" 

; This directive determines which super global data (G,P,C,E & S) should 
; be registered into the super global array REQUEST. If so, it also determines 
; the order in which that data is registered. The values for this directive are 
; specified in the same manner as the variables_order directive, EXCEPT one. 
; Leaving this value empty will cause PHP to use the value set in the 
; variables_order directive. It does not mean it will leave the super globals 
; array REQUEST empty. 
; Default Value: None 
; Development Value: "GP" 
; Production Value: "GP" 
; http://php.net/request-order 
request_order = "GP" 

; This directive determines whether PHP registers $argv & $argc each time it 
; runs. $argv contains an array of all the arguments passed to PHP when a script 
; is invoked. $argc contains an integer representing the number of arguments 
; that were passed when the script was invoked. These arrays are extremely 
; useful when running scripts from the command line. When this directive is 
; enabled, registering these variables consumes CPU cycles and memory each time 
; a script is executed. For performance reasons, this feature should be disabled 
; on production servers. 
; Note: This directive is hardcoded to On for the CLI SAPI 
; Default Value: On 
; Development Value: Off 
; Production Value: Off 
; http://php.net/register-argc-argv 
register_argc_argv = Off 

; When enabled, the ENV, REQUEST and SERVER variables are created when they're 
; first used (Just In Time) instead of when the script starts. If these 
; variables are not used within a script, having this directive on will result 
; in a performance gain. The PHP directive register_argc_argv must be disabled 
; for this directive to have any affect. 
; http://php.net/auto-globals-jit 
auto_globals_jit = On 

; Whether PHP will read the POST data. 
; This option is enabled by default. 
; Most likely, you won't want to disable this option globally. It causes $_POST 
; and $_FILES to always be empty; the only way you will be able to read the 
; POST data will be through the php://input stream wrapper. This can be useful 
; to proxy requests or to process the POST data in a memory efficient fashion. 
; http://php.net/enable-post-data-reading 
;enable_post_data_reading = Off 

; Maximum size of POST data that PHP will accept. 
; Its value may be 0 to disable the limit. It is ignored if POST data reading 
; is disabled through enable_post_data_reading. 
; http://php.net/post-max-size 
post_max_size = 2G 

; Automatically add files before PHP document. 
; http://php.net/auto-prepend-file 
auto_prepend_file = 

; Automatically add files after PHP document. 
; http://php.net/auto-append-file 
auto_append_file = 

; By default, PHP will output a character encoding using 
; the Content-type: header. To disable sending of the charset, simply 
; set it to be empty. 
; 
; PHP's built-in default is text/html 
; http://php.net/default-mimetype 
default_mimetype = "text/html" 

; PHP's default character set is set to empty. 
; http://php.net/default-charset 
;default_charset = "UTF-8" 

; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is 
; to disable this feature. If post reading is disabled through 
; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated. 
; http://php.net/always-populate-raw-post-data 
;always_populate_raw_post_data = On 

;;;;;;;;;;;;;;;;;;;;;;;;; 
; Paths and Directories ; 
;;;;;;;;;;;;;;;;;;;;;;;;; 

; UNIX: "/path1:/path2" 
;include_path = ".:/php/includes" 
; 
; Windows: "\path1;\path2" 
;include_path = ".;c:\php\includes" 
; 
; PHP's default setting for include_path is ".;/path/to/php/pear" 
; http://php.net/include-path 

; The root of the PHP pages, used only if nonempty. 
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root 
; if you are running php as a CGI under any web server (other than IIS) 
; see documentation for security issues. The alternate is to use the 
; cgi.force_redirect configuration below 
; http://php.net/doc-root 
doc_root = 

; The directory under which PHP opens the script using /~username used only 
; if nonempty. 
; http://php.net/user-dir 
user_dir = 

; Directory in which the loadable extensions (modules) reside. 
; http://php.net/extension-dir 
; extension_dir=/opt/php/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212 
; On windows: 
; extension_dir=/opt/php/php-5.5.0/lib/php/extensions/no-debug-non-zts-20121212 

; Directory where the temporary files should be placed. 
; Defaults to the system default (see sys_get_temp_dir) 
; sys_temp_dir = "/tmp" 

; Whether or not to enable the dl() function. The dl() function does NOT work 
; properly in multithreaded servers, such as IIS or Zeus, and is automatically 
; disabled on them. 
; http://php.net/enable-dl 
enable_dl = Off 

; cgi.force_redirect is necessary to provide security running PHP as a CGI under 
; most web servers. Left undefined, PHP turns this on by default. You can 
; turn it off here AT YOUR OWN RISK 
; **You CAN safely turn this off for IIS, in fact, you MUST.** 
; http://php.net/cgi.force-redirect 
;cgi.force_redirect = 1 

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with 
; every request. PHP's default behavior is to disable this feature. 
;cgi.nph = 1 

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape 
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP 
; will look for to know it is OK to continue execution. Setting this variable MAY 
; cause security issues, KNOW WHAT YOU ARE DOING FIRST. 
; http://php.net/cgi.redirect-status-env 
;cgi.redirect_status_env = 

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's 
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok 
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting 
; this to 1 will cause PHP CGI to fix its paths to conform to the spec. A setting 
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts 
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED. 
; http://php.net/cgi.fix-pathinfo 
;cgi.fix_pathinfo=1 

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate 
; security tokens of the calling client. This allows IIS to define the 
; security context that the request runs under. mod_fastcgi under Apache 
; does not currently support this feature (03/17/2002) 
; Set to 1 if running under IIS. Default is zero. 
; http://php.net/fastcgi.impersonate 
;fastcgi.impersonate = 1 

; Disable logging through FastCGI connection. PHP's default behavior is to enable 
; this feature. 
;fastcgi.logging = 0 

; cgi.rfc2616_headers configuration option tells PHP what type of headers to 
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that 
; is supported by Apache. When this option is set to 1 PHP will send 
; RFC2616 compliant header. 
; Default is zero. 
; http://php.net/cgi.rfc2616-headers 
;cgi.rfc2616_headers = 0 

;;;;;;;;;;;;;;;; 
; File Uploads ; 
;;;;;;;;;;;;;;;; 

; Whether to allow HTTP file uploads. 
; http://php.net/file-uploads 
file_uploads = On 

; Temporary directory for HTTP uploaded files (will use system default if not 
; specified). 
; http://php.net/upload-tmp-dir 
;upload_tmp_dir = 

; Maximum allowed size for uploaded files. 
; http://php.net/upload-max-filesize 
upload_max_filesize = 2G 

; Maximum number of files that can be uploaded via a single request 
max_file_uploads = 20 

;;;;;;;;;;;;;;;;;; 
; Fopen wrappers ; 
;;;;;;;;;;;;;;;;;; 

; Whether to allow the treatment of URLs (like http:// or ftp://) as files. 
; http://php.net/allow-url-fopen 
allow_url_fopen = On 

date.timezone = "Europe/Paris" 

; Whether to allow include/require to open URLs (like http:// or ftp://) as files. 
; http://php.net/allow-url-include 
allow_url_include = On 

; Define the anonymous ftp password (your email address). PHP's default setting 
; for this is empty. 
; http://php.net/from 
;from="[email protected]" 

; Define the User-Agent string. PHP's default setting for this is empty. 
; http://php.net/user-agent 
;user_agent="PHP" 

; Default timeout for socket based streams (seconds) 
; http://php.net/default-socket-timeout 
default_socket_timeout = 60 

; If your scripts have to deal with files from Macintosh systems, 
; or you are running on a Mac and need to deal with files from 
; unix or win32 systems, setting this flag will cause PHP to 
; automatically detect the EOL character in those files so that 
; fgets() and file() will work regardless of the source of the file. 
; http://php.net/auto-detect-line-endings 
;auto_detect_line_endings = Off 
+0

Bonjour, Bienvenue dans Stack Overflow. Est-il possible de réduire le code pour nous montrer seulement les bits utiles à ce problème. Alternativement, y at-il quelque chose que vous pensez qu'il pourrait être lié à - tout ce que vous avez essayé? – SherylHohman

+0

Copie possible de: https://stackoverflow.com/q/27683366/5411817? – SherylHohman

+0

Copie possible de [Référence - Que signifie ce symbole en PHP?] (Https://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php) –

Répondre

0

Vous devez utiliser le MultiPHP Editor de MHF. Vous pouvez définir une version personnalisée de php pour chacun de vos comptes cPanel. Ensuite, à partir de l'interface Web cPanel de votre compte, vous pouvez modifier/ajuster vos paramètres php en conséquence. Il suffit de rechercher PHP dans cPanel. Ces paramètres doivent être effectués à l'aide de l'interface cPanel/WHM et non en modifiant manuellement les fichiers sur votre serveur. Les fichiers édités manuellement (via ssh/ftp etc.) seront écrasés quand vous ferez un changement via cPanel ou WHM.