A question can only have one accepted answer. Are you sure you want to replace the current answer with this one?
You previously marked this answer as accepted. Are you sure you want to unaccept it?
Write for DigitalOcean
You get paid, we donate to tech non-profits.
Find and meet other developers in your city.
Contribute to Open Source
I have created LAMP with 1 GB memory but i have got only 128 ini php.ini, why?
Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below.
I know I can change that, but I just want to know why default settings didn’t set it. There is some recommend settings? So if my service support 1GB better if I will use 128 any way?
They didn’t change it because it’s practically impossible to know what setting you’ll actually want it at, so using the reliable, known default from the distribution makes perfect sense.
It is done as a safety measure as some poorly written scripts can consume all the available memory on a server.
You can type !ref in this text area to quickly search our full set of tutorials, documentation &
marketplace offerings and insert the link!
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt is the command, E: package "php5" has no installation candidate is the response, same for libapache2-mod and the other one.
I have a 'Ubuntu Wordpress 4.7 on 16.04' droplet (1 click install). PHP-FPM and Varnish have been added. I've created an apache conf for the main domain and another for the blogs subdomain, and deactivated the default conf. I've edited my local hosts file to point to this server for testing.
Everything appeared to be working fine, until I hit a strange problem with cookies. I can login and use Wordpress just fine - cookies are created as expected, including the PHPSESSID cookie.
But if I create a simple session_start() test script, the PHPSESSID cookie is not created (and the session doesn't persist).
$_SESSION["favcolor"] = "green";
echo $_SESSION["favcolor"] . "<br>";
The same script works when tested locally. I'm trying it on the server in the same directory as Wordpress. And I can see the session is being created on the server in /var/lib/php/sessions. But no browser cookies. Same if I test using setcookie(). Same if I test under the main domain.
At first I suspected a conflict with Varnish, but I've temporarily bypassed it while testing (using 'return (pass)' as the first entry in vcl_recv).
Also intriguing is that if I let Wordpress create the PHPSESSID cookie by logging in. Then my session test script DOES work. Until I delete the PHPSESSID cookie, then it won't create it.
What am I missing? Why is this working with Wordpress but not with a regular php test script..?
My code works fine in my local environment but when i push to DO. It doesn't. How do i access my error logs in ubuntu 16
I recently updated Ubuntu and updated most of the apps. Somewhere along the way php got updated and is no longer being rendered, it shows up as a text file. Php works from the command line, and returns appropriate version information (7.0.15). Apache shows php7_module in the module list and is otherwise working fine. Restarting Apache didn't help.