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
Ok, please excuse me probably for being thick here or my lack of research on StackOverflow but currently under pressure to get a live server stable so researching on various options.
We noticed on our server (Windows 2008/IIS7) that the tmp folder had like a million session files (Garbage Collection seems not to be working), so could this be causing problems with load time on my PHP sites as for the past 2/3 weeks I have noticed load problems.
My theory is that when PHP creates a session and wants to read it, it has to go thru them million records to find my session.
Any thoughts, happy to be told my theory is totally crap.
UPDATE SO FAR
Clearing over a million session files seems to have reduced pressure on the HDD and PHP sites seems to be more responsive compared to previously. Waiting for the load to increase to see if these session files where causing the initial issue.
Since this is an I/O operation it will slow down when it accesses sessions at tmp directory. Check your php ini setting for http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime
I saw similar issue asked on serverfault check
https://serverfault.com/questions/373024/php-processes-run-one-at-a-time-always-taking-100-of-one-core
php 5.4 provides a sessionhandler class to extend, so that sessions can be stored in a keyvalue extension, database or whatever. for older php versions there are similar functions.
this should be considered if sessions seem to be a bottleneck.
Related
Closed. This question is not about programming or software development. 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 3 days ago.
Improve this question
Am planning to install Moodle in Amazon EC2 with ELB. The approach am thinking of is couple of Moodle intance and couple of DB instances. each Moodle instance points the DB instances through a load balancer and each DB syncs automatically.
Please advice will it works.
I don't think that there is an option to have multiple DB instances in AWS synchronized between each other and all being both read and write. It seems they can only have read replicas, see here: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html and https://aws.amazon.com/rds/mysql/ (Replication chapter).
Also, it would also be a big overhead to synchronize a high number of DB instances. Will this be synchronous? In that case it would leave a performance penalty.
The best option would be to have a number of Moodle instances behing a LB, all of them pointing to the same DB. I do not think the bottleneck sits in the DB. If you also tune the DB, add some performant storage (SSDs, see the link above for details) everything should be ok.
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 6 years ago.
Improve this question
My website is entirely written by me in php on notepad, no WordPress or the like. The only known weakness is that due to a complicated hardware situation, I can not use HTTPS for the login area. It runs on a shared hosting account at iPage. It's 'LAMP'.
I am setup to monitor reasons why the 404 page is called. This is where my concern comes. Someone is making attempts on folders in all lower case. This more alarming because these folders words are in the login area sometimes. For example, if I have a file at /loginArea/myHidden/index.php these odd requests are aimed at /myhidden for some reason. Notice no caps and lack of the first directory. This has been happening at a rate of one per day, from random IP addresses all around the world. You might assume this was a coding mistake on my part at first, but I am 100% certain that has been ruled out by now. They are moving around my folder structure, poking like they are searching for something.
They seem to be limited to folder words they could sniff from http traffic of logged in users. They have not hit one that is known only to me.
No damage seems to have been done, but I am getting DAILY attempts and want to know what they are hoping for.
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 was just developing a website on NetBeans 7.4, using PHP, i have saved the file a dozen times before by CTRL + S.
The millisecond i hit CTRL + S again to save my last changes on the file, a power outage happens, and my computer just went off. (Yeah, i'm so lucky.)
After a while, the power came back on, and i opened my computer to see all the file is gone.
I had hundreds of lines of code and (stupidly) didn't use git or any CVS for the project. The other files are just fine, but my computer went off while it was writing into the file i was working on (home.php).
I took a screenshot because i can't copy and paste the contents, as it's a bunch of NULL's on line 1.
home.php :
My question is, is there any way i can recover this file, or did i just lose my 3.5 hours of work?
I've tried
To look for the file in windows cache
404 : my file wasn't there.
To look for the file in netbeans' own cache directory.
404 : my file wasn't there either
To look for the output in chrome cache
404 : no chance.
System recovery
That didn't help because i don't have a restore point for 4 hours ago.
As mentioned, if the file's contents have been overwritten, then there's not much you can do.
You could try and find an earlier version of your file using data recovery software and performing a deep scan of your drive. This will look for data that is not tied to a file (i.e. an earlier version of your work).
You could try:
Recuva: small and free, feature rich, gets the job done
GetDataBack: not free, but highly effective (I've used it in the past, was quite satisfied with the results)
There's also a wikipedia article on data recovery software here, where you can check many other options
Right Click the file and check for the older version Named as Previous Version or Restore Previous version, it will restore fraction of your file but not complete.
This might guide you: http://www.techrepublic.com/blog/windows-and-office/recover-data-files-in-windows-7-with-previous-versions/4992/
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.
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
Most results I get on Google is how to get both versions running simultaneously on the same page but at different URLS but that's not what I want, I'd like for example to get http:\localhost to run PHP4 and PHP5 at the same time on the same page because I got a website that has old code from PHP4 that breaks up when loaded only in PHP5, and it has some parts made only in PHP5, so I would like to run both PHP versions at the same spot.
I'm on Windows XP running Apache, I wouldn't mind switching to IIS 2007 if it's required. I really need to do this I'm already aware of the security risk.
I know it's a repost but I got downvoted to oblivion because some of you don't want me to do this but I know I need to do this.
Update: the issue is that I have a site running locally that connects to a database I was told some of the code was in PHP4 and some in PHP5 and that both versions were required, I was assigned to fix this by running both versions, it's not a website that's connected to the internet so I figured no issues would happen.
Nopez. Not possible.
I think you have two options:
'embed' the other php version (iframe / ajax)
'patch' the old project to PHP5
I had to the second option a couple of times and it is do-able (all depending on the size and the code used of the project of course).