Increase memory_limit of subdomains in the plesk panel - drupal-6

I increased memory_limit to 512M in the plesk panel, then i ran phpinfo() and tested this two addresses:
fanap.ir/phpinfo.php ----> memory_limit=512M
test.fanap.ir/phpinfo.php ----> memory_limit=128M
How can i increase memory_limit of subdomains?

As I know in Plesk 11 subdomains have own PHP settings.
Just click on subdomain name on sites list in "Websites & Domains" tab and there you will see "PHP settings" tab for subdomain.

Related

Unable to point Domain to the right public_html in Centos web panel and AWS

I have:
Set AWS EC2 Instance for Centos 7 up
Installed Centos Web Panel.
Associated an Elastic IP to my Insance
In Route 53 of AWS I added a record for my domain which was pointing to the Static IP of my instance.
And in My Domain DNS I provided Nameservers provided by AWS Route 53 for my instance.
I created a new Account in Centos WP and provided the domain.
But still when I open the domain in browser it is loading default Apache page in Centos that is in /usr/local/apache/htdocs/index.html.
which should actually point to /home/username/public_html/index.php
I tried to:
Manually edit the httpd.conf file in Apache
And point domain to user directory
I succeeded, but then the all .php files in that directory started to give 500 Internal error, I think it may be a problem of Nameservers but I don't have any clue,
Can anyone point me to right direction to setup a website in Centos Webpanel in AWS?
My Virtual Hosts Configuration, this is what I tried to put in httpd.conf but when 500 Error started to come I had to remove it.
# vhost_start devo.gq
<VirtualHost 52.56.234.217:80>
ServerName devo.gq
ServerAlias www.devo.gq
ServerAdmin xxxx#gmail.com
DocumentRoot "/home/devogq/public_html"
ScriptAlias /cgi-bin/ "/home/devogq/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/devogq/devo.gq/*.conf
<IfModule mod_suexec.c>
SuexecUserGroup devogq devogq
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup devogq devogq
suPHP_ConfigPath /home/devogq
</IfModule>
<Directory "/home/devogq/public_html">
Options all
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end devo.gq
After adding this code in httpd.conf file.
still I am still being pointed to default htdocs directory of apache.
in error logs i am getting this error
[Sun Apr 23 17:43:04.554884 2017] [:error] [pid 16402:tid 140288731281152] [client 103.69.219.30:27233] File does not exist: /usr/local/apache/htdocs/devo.php
For me, I installed ssl and it worked.
left menu : WebServer Settings -> SSL certificates
I experienced the same problem with Centos Web Panel on an Oracle Virtual Box where all domains were only displaying the default test page. After trying several methods including the official ones like:
https://wiki.centos-webpanel.com/default-page-displayed-for-all-domains
It boiled down to the IP the domain (account) was being set on.
When creating the account, the shared public IP was chosen by default (in my case). When I changed it to use the local VM IP which the CWP was running on, they started working again. You may have to rebuild the vHosts again (Left Menu --> Apache Settings --> Rebuild Apache vHosts); for me, I realized this after deleting all account so I did not have to rebuild them.

joomla 3 purity 3 template i cannot upload plugin

I am trying to upload the purity 3 template for joomla, I downloaded 4 filers from there homepage, an extention manager, this file i can upload. and T3 plugin, this i cannot upload, i recieve the following error when trying:
Error
There was an error uploading this file to the server.
Maximum PHP file upload size is too small: This is set in php.ini in both upload_max_filesize and post_max_size settings of your PHP settings (located in php.ini and/or .htaccess file).
Unable to find install package
without this plugin i cannot get the template to work, i recieve this error:
500 - T3 Plugin is not enabled
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a search engine that has an out-of-date listing for this site
a mistyped address
you have no access to this page
The requested resource was not found.
An error has occurred while processing your request.
Please try one of the following pages: Home Page
If difficulties persist, please contact the System Administrator of this site and report the error below..
T3 Plugin is not enabled
I have tried to change the .htaccess file by adding this:
php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M
I cannot find the right php.ini file.
Can anyone help me?

How to set upload file size in htaccess for uploading larger files ?

I have a upload script which allows uploads up to 2 GB. My apache2 server allowed only 8MB of post_max_size. Is there any solution to define such properties from the php.ini in the htaccess. The reason why i want it to get it worked like that? I just want to use such big post_max_size only for my application not for the whole apache2 server.
Any ideas?
You can set the upload_max_filesize property to whatever value you want within either php.ini, .htaccess, or even httpd.conf. If you are using PHP 5.3 above, you can also set this property in user.ini
you can try this in htaccess files:
php_value upload_max_filesize 100M
php_value post_max_size 100M
or you can create php.ini file in root folder of your project put these two lines
upload_max_filesize=100M
post_max_size=100M

Overriding php.ini on server

I have a page which allows users to upload images.
It is returning a 500 error when the user tries to upload larger images though.
The following code...
<?php echo ini_get("upload_max_filesize");
echo ini_get("post_max_size");
echo ini_get("max_input_time");
echo ini_get("max_execution_time");
?>
...returns:
100M
100M
60
3600
I'm guessing from this that it's the max-input-time that's causing the problem as i've tested with files under 100mb but taking longer than 60 seconds to upload.
I don't have access with my host to the php.ini file, so can I override these settings? I've tried adding an htaccess file but I'm not sure I've put it in the correct place.
Put a .htaccess file in the root folder of your website (where your php script is) and add the following values:
php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value max_execution_time 200
php_value max_input_time 200
Of course, you can put other size and time limits. That should work.
Setting up php ini directives depends on the nature of your service provider's configuration. Run a phpinfo() script to look at your configuration. If your provider is starting PHP using suPHP in a user UID context then it may look for a php.ini in the script's directory. This is how it works for my hosting provider.

How to increase the size of File Attachment in Drupal

I am attaching a file in a node in drupal using File Attachment. But it is not allowing me to upload a file greater than 1MB. I want to upload a file of 50MB. How to increase this size. Thanks in advance.
Add the below to the relevant php.ini file (recommended, if you have access). Note that for some hosts this is a system-wide setting. However, for hosts running PHP as a CGI script with suexec (for example) you may be able to put these directives in a php.ini file in your Drupal root directory.
upload_max_filesize = 50M
post_max_size = 50M
Add the below to your .htaccess file in your Drupal root directory.
php_value upload_max_filesize 50M
php_value post_max_size 50M
Apart the limit set by PHP, there is also a limit set by Drupal, which is per role. Once you changed the limit set by PHP, you should also change the limit set by Drupal, to get the desired effect.
"Administer » Site configuration » File uploads" ( /admin/settings/uploads ).
You can set Drupal limit per each role. The Drupal settings cannot be larger than those permitted by PHP, but may be smaller if you haven't updated them, so remember to check there also, after updating the php.ini.

Resources