Manual PHP-Values .htaccess/en
Aus EUserv Wiki
Svtr1 (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „{{Languages|Manual_PHP-Values_.htaccess}} Kategorie:Shared Hosting '''''Setting PHP values via .htaccess file''''' __TOC__ <div style= "font-size: 1.571em;"> …“) |
Svtr1 (Diskussion | Beiträge) |
||
Zeile 9: | Zeile 9: | ||
= General = | = General = | ||
- | If you have a hosting plan at EUserv you can't access the '''php.ini''' file. Anyway there is the possibility to set PHP values via .htaccess file. The following guide shows you how to do this. | + | If you have a hosting plan at EUserv you can't access the '''php.ini''' file. Anyway there is the possibility to set PHP values via a .htaccess file. The following guide shows you how to do this. |
Zeile 28: | Zeile 28: | ||
</pre> | </pre> | ||
- | * Save the file under '''info.php''' and upload the file via FTP | + | * Save the file under '''info.php''' and upload the file via FTP to your webspace under '''www/data/''' |
* Enter the following address in your browser (Replace [domain] with the domain of your webspace): | * Enter the following address in your browser (Replace [domain] with the domain of your webspace): | ||
Zeile 46: | Zeile 46: | ||
=== Checking PHP values for your hosting plan === | === Checking PHP values for your hosting plan === | ||
- | To check | + | To check for the possible PHP values within your hosting plan please check the detail view on our homepage: |
[http://www.euserv.com/en/ http://www.euserv.com/en/] | [http://www.euserv.com/en/ http://www.euserv.com/en/] | ||
Zeile 54: | Zeile 54: | ||
* Edit/Create the .htaccess file | * Edit/Create the .htaccess file | ||
- | * Add the following line | + | * Add the following line in the following format (Replace '''[parameter]''' with the parameter which should be changed and '''[value]''' with the value): |
<pre> | <pre> | ||
Zeile 60: | Zeile 60: | ||
</pre> | </pre> | ||
- | * Upload the .htaccess file via FTP | + | * Upload the .htaccess file via FTP to your webspace under '''www/data/''' |
- | * Set the user-rights for .htaccess file to '''644''' (readable and writeable by owner, just readable by other users). | + | * Set the user-rights for the .htaccess file to '''644''' (readable and writeable by owner, just readable by other users). |
Zeile 109: | Zeile 109: | ||
</pre> | </pre> | ||
- | * Upload the .htaccess file via FTP | + | * Upload the .htaccess file via FTP to your webspace under '''www/data/''' |
- | * Set the user-rights for .htaccess file to '''644''' (readable and writeable by owner, just readable by other users). | + | * Set the user-rights for the .htaccess file to '''644''' (readable and writeable by owner, just readable by other users). |
Zeile 167: | Zeile 167: | ||
* Check if the set value has been changed. | * Check if the set value has been changed. | ||
- | * Finally delete '''info.php'''. So the configuration of your webspace | + | * Finally delete '''info.php'''. So the configuration of your webspace can't be seen by others. |
Aktuelle Version vom 09:08, 30. Okt. 2014
Languages: |
Deutsch • English |
Setting PHP values via .htaccess file
Inhaltsverzeichnis |
Setting PHP values via .htaccess file
General
If you have a hosting plan at EUserv you can't access the php.ini file. Anyway there is the possibility to set PHP values via a .htaccess file. The following guide shows you how to do this.
Setting PHP values
Preparation
Checking PHP version
To check which PHP version is installed on your webspace, please follow these steps:
- Create a new file with the following content:
<?php phpinfo(); ?>
- Save the file under info.php and upload the file via FTP to your webspace under www/data/
- Enter the following address in your browser (Replace [domain] with the domain of your webspace):
http://www.[domain].com/info.php
You can find the installed PHP version of your webspace on the header of the file.
Checking PHP values for your hosting plan
To check for the possible PHP values within your hosting plan please check the detail view on our homepage:
Setting PHP values for PHP 5.2
- Edit/Create the .htaccess file
- Add the following line in the following format (Replace [parameter] with the parameter which should be changed and [value] with the value):
php5_value [parameter] [value]
- Upload the .htaccess file via FTP to your webspace under www/data/
- Set the user-rights for the .htaccess file to 644 (readable and writeable by owner, just readable by other users).
Examples
Setting PHP value memory-limit
- Add the following line to set the php value memory_limit to 128 MB:
php5_value memory_limit 128M
Setting PHP value post_max_size
- Add the following line to set the php value post_max_size to 128 MB:
php5_value post_max_size 128M
Setting PHP value max_execution_time
- Add the following line to set the php value max_execution_time to 30 s:
php5_value max_execution_time 30s
Setting PHP value upload_max_filesize
- Add the following line to set the php value upload_max_filesize to 32 MB:
php5_value upload_max_filesize 32M
Setting PHP values for PHP 5.3 or higher
- Edit/Create the .htaccess file
- Add the following line with the following format (Replace [parameter] with the parameter which should be changed and [value] with the value):
php_value [parameter] [value]
- Upload the .htaccess file via FTP to your webspace under www/data/
- Set the user-rights for the .htaccess file to 644 (readable and writeable by owner, just readable by other users).
Examples
Setting PHP value memory-limit
- Add the following line to set the php value memory_limit to 128 MB:
php_value memory_limit 128M
Setting PHP value post_max_size
- Add the following line to set the php value post_max_size to 128 MB:
php_value post_max_size 128M
Setting PHP value max_execution_time
- Add the following line to set the php value max_execution_time to 30 s:
php_value max_execution_time 30s
Setting PHP value upload_max_filesize
- Add the following line to set the php value upload_max_filesize to 32 MB:
php_value upload_max_filesize 32M
Checking set PHP values
To check if the set PHP values have been set, proceed as follows:
- Enter the following address in your browser (Replace [domain] with the domain of your webspace):
http://www.[domain].com/info.php
- Search for the corresponding PHP value under the section Core.
- Check if the set value has been changed.
- Finally delete info.php. So the configuration of your webspace can't be seen by others.