Quantcast
Channel: Tutorials – TechSansar.com
Viewing all articles
Browse latest Browse all 72

Increase Web Hosting PHP5 memory limit on GoDaddy Shared Linux Hosting

$
0
0

(adsbygoogle = window.adsbygoogle || []).push({}); var data = { placementid: '159743347438708_1021738951239139', format: 'native', testmode: false, onAdLoaded: function(element) { console.log('Audience Network [159743347438708_1021738951239139] ad loaded'); element.style.display = 'block'; }, onAdError: function(errorCode, errorMessage) { console.log('Audience Network [159743347438708_1021738951239139] error (' + errorCode + ') ' + errorMessage); } }; (function(w,l,d,t){var a=t();var b=d.currentScript||(function(){var c=d.getElementsByTagName('script');return c[c.length-1];})();var e=b.parentElement;e.dataset.placementid=data.placementid;var f=function(v){try{return v.document.referrer;}catch(e){}return'';};var g=function(h){var i=h.indexOf('/',h.indexOf('://')+3);if(i===-1){return h;}return h.substring(0,i);};var j=[l.href];var k=false;var m=false;if(w!==w.parent){var n;var o=w;while(o!==n){var h;try{m=m||(o.$sf&&o.$sf.ext);h=o.location.href;}catch(e){k=true;}j.push(h||f(n));n=o;o=o.parent;}}var p=l.ancestorOrigins;if(p){if(p.length>0){data.domain=p[p.length-1];}else{data.domain=g(j[j.length-1]);}}data.url=j[j.length-1];data.channel=g(j[0]);data.width=screen.width;data.height=screen.height;data.pixelratio=w.devicePixelRatio;data.placementindex=w.ADNW&&w.ADNW.Ads?w.ADNW.Ads.length:0;data.crossdomain=k;data.safeframe=!!m;var q={};q.iframe=e.firstElementChild;var r='https://www.facebook.com/audiencenetwork/web/?sdk=5.3';for(var s in data){q[s]=data[s];if(typeof(data[s])!=='function'){r+='&'+s+'='+encodeURIComponent(data[s]);}}q.iframe.src=r;q.tagJsInitTime=a;q.rootElement=e;q.events=[];w.addEventListener('message',function(u){if(u.source!==q.iframe.contentWindow){return;}u.data.receivedTimestamp=t();if(this.sdkEventHandler){this.sdkEventHandler(u.data);}else{this.events.push(u.data);}}.bind(q),false);q.tagJsIframeAppendedTime=t();w.ADNW=w.ADNW||{};w.ADNW.Ads=w.ADNW.Ads||[];w.ADNW.Ads.push(q);w.ADNW.init&&w.ADNW.init(q);})(window,location,document,Date.now||function(){return+new Date;}); .thirdPartyRoot { background-color: white; color: #444; border: 1px solid #ccc; border-left: 0; border-right: 0; font-family: sans-serif; font-size: 14px; line-height: 16px; width: 320px; text-align: left; position: relative; } .thirdPartyMediaClass { width: 320px; height: 168px; margin: 12px 0; } .thirdPartySubtitleClass { font-size: 18px; -webkit-line-clamp: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; height: 16px; -webkit-box-orient: vertical; } .thirdPartyTitleClass { padding-right: 12px; line-height: 18px; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; height: 36px; -webkit-box-orient: vertical; } .thirdPartyCallToActionClass { background-color: #416BC4; color: white; border-radius: 4px; padding: 6px 20px; float: right; text-align: center; text-transform: uppercase; font-size: 11px; } .fbDefaultNativeAdWrapper { font-size: 12px; line-height: 14px; margin: 12px 0; height: 36px; vertical-align: top; }

PHPInfo exhibiting memory_limit increased memory value

With no second thought, GoDaddy is a cheaper option for beginner web hosting and blogging users. However, GoDaddy’s tries to upsell their products on their support. Even for a very small fix, you are allured to upgrade. Wait, without discussing about the GoDaddy’s web hosting features and premium offerings, lets increase our Web hosting account’s memory limitations.

How much memory power do your websites require to run – 8MB, 16MB, 32MB or 64MB or how about 128MB of memory on GoDaddy’s shared linux hosting?

Irrespective of what kind of web hosting account you have with GoDaddy – yes we referring to deluxe and ultimate inclusive – while standard is always a vanilla standard – all web hosting profiles are most likely to suffer memory deficit while on GoDaddy. On this simple yet effective tutorial, let’s work to increase the web hosting PHP 5 memory limit on GoDaddy’s shared Linux hosting.

Login to your GoDaddy hosting account.

From the Hosting Control Center, open the file manager or FTP file manager. Here our aim is to edit some files.

Try to find php.ini and/or php5.ini. Without a second thought, open php5.ini file if it already exists if not create one. Just ignore php.ini for now (more info at the end of this tutorial.)

PHP5.ini File location in GoDaddy Linux Shared Hosting

Open the php5.ini file, and append or add the following memory_limit parameter assigning values of 128M. In most of the cases, default memory_limit value assigned by GoDaddy is just 64MB.

memory_limit = 128M

Save that php5.ini file.

Now, try to look for a file named phpinfo.php if no luck, create a new file named temp.php (or any_name.php) and include the following line in that php file. The main purpose here is to check whether the memory limit has been upgraded successfully.

<?php phpinfo(); ?>

Open the phpinfo.php (for this file no edit was necessary) or temp.php file (which was just edited) and search for memory_limit and Loaded Configuration File. (Opening these file should follow your default domain like techsansar.com/temp.php or /phpinfo.php )

PHPInfo exhibiting memory_limit increased memory value
PHPInfo exhibiting memory_limit increased memory value

Check if Loaded Configuration File has some values other than none. If you have memory_limit value 128M, you are good to go with. If not, follow simple steps below to make things on server processes happen good.

Go to the hosting control center, open System Processes, and then click End Web or End All.

Monitoring System Processes in GoDaddy Control Panel Hosting
Monitoring System Processes in GoDaddy Control Panel Hosting
[note]Caution: Clicking End will shut down your Web host’s System Processes and restart them within a second. Your server’s fastcgi process and php5.ini will be reloaded killing existing run.[/note]

Now that your system processes have re-run, your temp.php or phpinfo.php file should give you the updated values for both memory_limit and Loaded Configuration File. Now, you can safely delete those temp.php and/or phpinfo.php files to hide from public.

That’s the end of the tutorial on how to increase memory limitation on your Linux web hosting shared account. Share your issues below.

[box title=”Note on php.ini & php5.ini files” box_color=”#FFFF66″ title_color=”#6d37ec”]
  • Many people ignore php5.ini file thinking that php.ini already exist and does all good. However, php.ini is obsolete now, and GoDaddy supports php5.ini file by default.
  • Ensure the php file you edited is from the root directory in the GoDaddy’s hosting account, not in the FTP directory for individual domain. Find php5.ini in the root html directory.
  • DO NOT edit memory values from .htaccess file; php_value_memory_limit in .htaccess file shouldn’t be edited as it leads to some server issues.
  • Related: Giving Joomla its own installation directory
  • Related: Block Spam Referrers on Your Website or Blog [/box]

(adsbygoogle = window.adsbygoogle || []).push({}); var data = { placementid: '159743347438708_1021738951239139', format: 'native', testmode: false, onAdLoaded: function(element) { console.log('Audience Network [159743347438708_1021738951239139] ad loaded'); element.style.display = 'block'; }, onAdError: function(errorCode, errorMessage) { console.log('Audience Network [159743347438708_1021738951239139] error (' + errorCode + ') ' + errorMessage); } }; (function(w,l,d,t){var a=t();var b=d.currentScript||(function(){var c=d.getElementsByTagName('script');return c[c.length-1];})();var e=b.parentElement;e.dataset.placementid=data.placementid;var f=function(v){try{return v.document.referrer;}catch(e){}return'';};var g=function(h){var i=h.indexOf('/',h.indexOf('://')+3);if(i===-1){return h;}return h.substring(0,i);};var j=[l.href];var k=false;var m=false;if(w!==w.parent){var n;var o=w;while(o!==n){var h;try{m=m||(o.$sf&&o.$sf.ext);h=o.location.href;}catch(e){k=true;}j.push(h||f(n));n=o;o=o.parent;}}var p=l.ancestorOrigins;if(p){if(p.length>0){data.domain=p[p.length-1];}else{data.domain=g(j[j.length-1]);}}data.url=j[j.length-1];data.channel=g(j[0]);data.width=screen.width;data.height=screen.height;data.pixelratio=w.devicePixelRatio;data.placementindex=w.ADNW&&w.ADNW.Ads?w.ADNW.Ads.length:0;data.crossdomain=k;data.safeframe=!!m;var q={};q.iframe=e.firstElementChild;var r='https://www.facebook.com/audiencenetwork/web/?sdk=5.3';for(var s in data){q[s]=data[s];if(typeof(data[s])!=='function'){r+='&'+s+'='+encodeURIComponent(data[s]);}}q.iframe.src=r;q.tagJsInitTime=a;q.rootElement=e;q.events=[];w.addEventListener('message',function(u){if(u.source!==q.iframe.contentWindow){return;}u.data.receivedTimestamp=t();if(this.sdkEventHandler){this.sdkEventHandler(u.data);}else{this.events.push(u.data);}}.bind(q),false);q.tagJsIframeAppendedTime=t();w.ADNW=w.ADNW||{};w.ADNW.Ads=w.ADNW.Ads||[];w.ADNW.Ads.push(q);w.ADNW.init&&w.ADNW.init(q);})(window,location,document,Date.now||function(){return+new Date;}); .thirdPartyRoot { background-color: white; color: #444; border: 1px solid #ccc; border-left: 0; border-right: 0; font-family: sans-serif; font-size: 14px; line-height: 16px; width: 320px; text-align: left; position: relative; } .thirdPartyMediaClass { width: 320px; height: 168px; margin: 12px 0; } .thirdPartySubtitleClass { font-size: 18px; -webkit-line-clamp: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; height: 16px; -webkit-box-orient: vertical; } .thirdPartyTitleClass { padding-right: 12px; line-height: 18px; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; height: 36px; -webkit-box-orient: vertical; } .thirdPartyCallToActionClass { background-color: #416BC4; color: white; border-radius: 4px; padding: 6px 20px; float: right; text-align: center; text-transform: uppercase; font-size: 11px; } .fbDefaultNativeAdWrapper { font-size: 12px; line-height: 14px; margin: 12px 0; height: 36px; vertical-align: top; } This post Increase Web Hosting PHP5 memory limit on GoDaddy Shared Linux Hosting appeared first on TechSansar.com.


Viewing all articles
Browse latest Browse all 72

Trending Articles