EasyPHP httpd.conf changes cannot be saved - apache

I installed and used EasyPHP before it was working well. Now I try to install it in another desktop, but having problems saving httpd.conf. Every time I change anything in there and saved it, and if i reloaded the file in notepad, the changes are not taking effect.
Seems there is another program reverting it back to default values. I checked in the dash board, all services are not installed and none of them are running as it is first time install.
So how do I find out which program is reverting it? Or how do I make the changes take effect.

Ok I found the culprit who is modifying the httpd.conf. It is the Dashboard page itself!
For my case, the desktop had setup a virtual network (for running Linux OS in VM), so the "Local Network" ip is always not getting the same as the IP set in my ethernet network.
In the dashboard index.php (C:\Program Files (x86)\EasyPHP-Webserver-14.1b2\dashboard\index.php), there is a code to check both IP when it is not same, the original one is overwritten again. What i did to prevent the overwrite is to comment out the related codes:
// file_put_contents('..\binaries\httpserver\conf\httpd.conf', $httpdconf);
This of course only prevents the overwrites. The IP issue was solved by disabling the virtual network.

Related

wkhtmltopdf hangs on 10% and does not generate PDF

I'm using WKHtmlToPdf to generate some docs here at work, in internal applications, for over one and half year without any problem. Some applications are coded in C++, some in AutoIt3, and today, after restarting all the computers due to external reasons (power generator would be tested), wkhtmltopdf stopped working on all machines at my company.
I can't even run it from command line. Whether I try to convert a webpage or a local HTML file, it always hangs on 10%. All our machines are Windows 8 32 bits and runs their own install (the applications aren't running under a network share).
I tried downloading wkhtmltopdf again from the website, installing it, etc, but nothing worked. I also tried adding --disable-javascript option, which also didn't work. Cleaning %TEMP% folder did not help too.
I never faced anything like this. All the machines were restarted normally, going to start menu, etc. And it does not look like a network issue, since I'm accessing internet to write this, and we are a small company, we use a standard Wi-Fi router, just like your house. Nothing was changed, no file deleted, no Windows update, no network settings... just a restart. I saw some guys facing the same problem when trying to run wkhtmltopdf from PHP, but in this case, I have this problem even by running it from DOS, as anyone would do.
wkhtmltoimage is working fine. Just wkhtmltopdf stopped working.
Screenshot
In my case, wkhtmltopdf was hanging on files locally stored after the progress counter had made an initial jump to the percentage corresponding to 1 page. It turned out that I had an http_proxy variable set to some unaccessible proxy server. Clearing this environment variable solved the issue.

Remote web server pages do not update after making changes via SSHFS

I've been troubleshooting this for a while now and can't seem to find a solution. I have a remote LAMP server in my office and sometimes need to work from home. I use a SSHFS between my home computer and work to accomplish this.
However, I have run into an issue where when I update the local files, the changes get pushed to the server immediately as they should. I have verified that the changes are there via SSH and VIM. However, if I refresh and even force refresh the page in Chrome the changes do not appear.
I also created a local file which showed up immediately on the server and I could view in Chrome, but any subsequent changes to the file are not rendered.
Any time that I'm in the office the changes are rendered immediately as well.
Anybody have any ideas?
Apache 2.4.7
Sublime Text 3 Editor
Client SSHFS: win-sshfs 0.0.1.5
Server SSH: OpenSSH_6.6.1p1
My guess is that the modified time isn't updated correctly on the remote filesystem. I'm not so sure what would be the fix for this but this at least could be a first trail to follow?
In fact, I just did a little search around and found this bug : https://code.google.com/p/win-sshfs/issues/detail?id=99
With a possible workaround in Sublime 2, I'll let you check if there is such a setting in Sublime 3

Headless Raspbian server diagnostics (on RaspberryPi)

I own a RaspberryPi that I can connect only through ssh. A few days ago it was unsafely powered off. Now when I turn it on I cannot access it. It looks like it turns on but can't get an ip or so.
It is ptovided by fixed IP from router, and when I try to ping this IP, it tells me that the destination host is unreachable.
Is there a way to find out what has happened or the only way is to complete reinstall the OS?
One possibility is that the systems rootfs has been corrupted, this happened to me once with unsafe powerdown on a raspi.
If you have another sd-card, the easiest would be to install a fresh image on it and check if it boots correctly. If not, make an image of your current sd-card, format and reinstall.
Hopefully you've got backups, as there's no guarantee to recover your files if the data has been corrupted.

Website sometimes gets jammed(timeout)

I'm hosting my website www.xgclan.com with the latest apache 2.4.1 and sometimes my server gets jammed, it doesn't seem to send any data but you don't get a timeout like when the Apache process isn't running.
A reboot of the process resolves this issue.
It seems to happen when you open the website in multiple browsers on the same system.
I've tested it on 2 different systems to make sure its not a bandwith or cpu problem.
Putting this without the quotes "AcceptFilter http none" in the httpd.conf fixed the issue for me.
I found the solution here: http://www.apachelounge.com/viewtopic.php?t=4543&postdays=0&postorder=asc&start=20

Ubuntu Lucid, cgi-bin, and MathTex

So I have several dedicated servers out there running Ubuntu Lucid server. They primarily run WordPress sites - LAMP. However, one of my original sites is a controls engineering site that uses MathTex to render the equations.
MathTex is pretty hard on servers. The engineering site is still hosted on the original VPS which runs something like CentOS (but that's irrelevant). The traffic and numbers of renderings that MathTex creates cause resource issues with my VPS. I've been able to allocate more resources to the VPS but ultimately this gets expensive. So I'd like to offload the equation rendering to my dedicated servers all of which are much more powerful and under-utilized.
So I've followed the instructions on installing and compiling MathTex. And MathTex works fine from the command line. However, when I attempt to call the script via my browser the browsers all try download the cgi file (I've tested on Firefox and Chrome on 2 machines).
This led me to attempt to compile and install on my home Ubuntu box that is Ubuntu desktop. The command line works fine. However, again when calling the function in my browser it wanted to download the file instead of rendering an equation. So I moved the mathtex.cgi script to /usr/lib/cgi-bin. Still no go. Then I changed /usr/lib/cgi-bin to 777 and it worked. I changed /usr/lib/cgi-bin to 755 and it stopped working.
So my home box works when /usr/lib/cgi-bin is 777. I tried that one of my dedicated Ubuntu servers and still no go. My browser still attempts to download the file.
The directive for Apache to find the cgi-bin directory is in /etc/apache/site-available/default. And at a quick glance they appear to be identical (I haven't yet studied every character).
FYI
I got some help from my hosting company. They are generally pretty good but this is outside the scope of what they provide for free. So when I was switching servers I had a couple of password issues and managed to tack this question on as well.
The support person finally got the mathtex.cgi script to run by creating a /cgi-bin under the domain's folder. Making that folder 777 and adding an AddHandler cgi-script to the http.conf. Then he restarted Apache2.
I had been putting mathtex.cgi under a generic /cgi-bin directory that I had intended to share among all the domains as needed. And this generic /cgi-bin directory appeared to be what the MathTex installation instructions were suggesting.
Hope this helps someone else.