PHP Session/Cookies Not Working - Multiple Servers [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have an Nginx load balancer load balancing two nginx servers serving PHP content (Moodle) up. They share the same database and use the same sessions directory using an NFS share on a separate server.
I am running PHP 5.4.1 and the latest version of Moodle.
Right now the load balancing works just fine, and I am able to access both worker nodes using the proxy. However, when logging in to Moodle, I get an error saying that cookies are disabled. They obviously are not, and logging into one of the worker nodes works just fine. When accessing the nodes individually, the MoodleSession cookie gets set, but when accessing it through the load balancer, no cookie is set.
I have tried changing the cookie mode to use the MySQL database, but this does not work, either.
What can I do get multiple worker nodes to set cookies that the server is storing in a common directory (NFS)?

Try checking for spaces or unknown characters in config.php. This may be preventing cookies from being set and return that warning.

Related

Moodle Data size freeup [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to reduce my moodle data size as the size is more than 115GB, i have installed moodle 2.9.1. Please help me with the methods to reduce the size of the moodle data folder by deleting old data or unwanted data from it without affecting the working application. Also please let me know if any moodle plugins available for this. Thanks in advance
I'm assuming you are using Moodle 2.0 or above (you don't specify in your question).
You can probably safely remove files from the "temp" subdirectory.
It is likely, however, that the vast majority of files will be found in the "filedir" subdirectory. There is no safe way to manually remove files from here - they must be deleted via the user interface or by writing code to use the Moodle files API to delete unwanted files.
Deleting files directly from the "filedir" without allowing Moodle to also update the relevant entries in the mdl_files table will result in fatal errors if the file is accessed via the Moodle code.
I suggest you start by looking to see if there are old, unused courses that can be deleted via the Moodle interface.

How to setup remote php on my server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I made a PHP based webapp and a customer of my needs it on his website. Now I want to put the PHP code on my server and let the customer's website include it remotely. How do I set this up? And can I restrict the acces when the customer doesn't need the app anymore and is it secure?
There is nothing such as remote PHP. Doesn't work that way. However you can setup some API to communicate between the two servers on backend. You'd still need both servers to be capable of this interaction, that means both servers still need to be fully functional. And if your code on client's server can talk to your API on host server, then they can take that code and see how it interacts with your host and replicate it.
A very simple solution would be to put the PHP-generated content from your website in an <iframe> on their website.

Malware spaming from my site [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Seomeone placed script in my site that send email, how I cant found this script ?
I use parallels and Linux CentOs.
I'm search keyword in site "mail(", but also cant be that code is like hash
It could be anywhere, and it could be anything. It could even have been deleted.
We did have a situation a while back where a client lost control of their password due to a keylogger and someone was uploading a CGI script to spam emails, running it then deleting it. We only found out via FTP logs what was going on.
Try checking your ftp logs, web server logs and if all that fails and you are sure it is php then try searching for eval( as that is an often used tactic to hide what a script is doing.
More importantly though, my suggestion would be to get someone who is experienced in server management to have a look at your site as a matter of urgency. If they were able to upload a file to your site once, then even if you remove it, it won't stop them doing it again until you find exactly how they were able to do it.
You might also have a look at your scripts. Is there a contact form somewhere on your site? You might have not escaped userinput very well, which gives an attacker the ability to send mails to other recipients.
I had a similar situation in my early days until the host blocked the script and told me to fix it.

How does a server handle multiple users [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a question in my mind that if answered can solve my problem.
How does server handle multiple user request for PHP scripts?
For example, if a user open a page that access a PHP script using ajax request, and for instance that PHP script has a long process ( actually very long ) and another more user open the same page in other machines, and another more and more user.
Does the process in PHP needed to be finished first before the second user who access to the script can be handled or will they be handled in parallel way the server?
The web server, say Apache, will launch a new independent PHP process for every request. There may be several instances of PHP executing the same script independently of each other running simultaneously. They do not wait for each other* nor do they interfere with each other**.
* If they are trying to access shared, locked resources simultaneously, they may have to wait for each other. Say, files or sessions.
** Unless of course they modify some external resource (say files or database records) in a way where they interfere.

Pagespeed still works on a new server even though it shouldnt [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I had mod_pagespeed installed on my previous server. I didn't use it and disallowed via .htaccess because after some testing it turned out that it actually slowed down my site. So it remained "disallowed" via .htaccess for a long time.
Today I moved to a new server and migrated user accounts using cPanel VHM migration feature. Supposedly it migrates only accounts and not configuration, but I have many problems now and I suspect this is primarily due to pagespeed. It's not installed on the new server because I dont need it, but somehow various logs and console messages show that pagespeed versions of files are still requested from time to time like the following "d14dafe2dc85d5ff8142236c3f55e0d4.pagespeed.jm.ReWsy_33cT.js" which causes random 404 errors and even 500 internal server errors.
How can it request pagespeed versions if pagespeed isnt installed? how is it possible? can anyone explain, please.
Ok, fixed it. It was DNS problem.. data was being loaded from both servers. That is, had to wait for DNS propagation to finish.

Categories