I have a web, and running well on my localhost.
After I Upload on my godaddy hosting, My web got a bug. the conclusions is, I MUST change the memory_limit on the php.ini file, BUT cant find php.ini on FTP manager.
I have tried to:
My Questions is : How I can Fix this? I Must change php.ini file. does anyone have experience like me?
To open the default php. ini file for editing, use one of the following commands (depending on which Linux distribution you're using): Ubuntu 16.04: sudo nano /etc/php/7.0/apache2. CentOS 7: sudo nano /etc/php.
You can find the path to php. ini in the output of phpinfo() . See under "Loaded Configuration File".
Create php.ini
file with your desired setting and upload it in your root folder of server. It will take effect with this new setting.
You can't edit the php.ini
file of godaddy
server, but you can upload your own copy of your php.ini
with your new setting.
This new setting will be available only to you. Other websites will not be affected with this new setting.
Previously I faced the same issue, but after doing this my problem was resolved.
Procedures:
You can also follow this screencast
https://www.youtube.com/watch?v=tdUlIkZcOe0
As pointed out by @Jason, for most shared hosting environments, having a copy of php.ini file in your public_html directory works to override the system default settings. A great way to do this is by copying the hosting company's copy. Put this in a file, say copyini.php
<?php
system("cp /path/to/php/conf/file/php.ini /home/yourusername/public_html/php.ini");
?>
Get /path/to/php/conf/file/php.ini from the output of phpinfo(); in a file. Then in your ini file, make your amendments Delete all files created during this process (Apart from php.ini of course :-) )
To check whether your php.ini
file takes effect, open a plain text editor and create a file called phpinfo.php
. Insert the following line:
<?php phpinfo(); ?>
Save this file to the root of your Web site and then browse to yourdomain.com/phpinfo.php to test the settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With