configure wamp apache for production environment - php

I have a web app am developing in-house and testing with wamp and it gives me all the normal results. PHP functions working well, errors reporting and responding when corrected. However, when I moved the site to a remote web hosting service, I get a Server 500 error as the first page tries to load. All the pages that have performed brilliantly in the local wamp setting suddenly reported errors with the same code.
I am wondering if there's something wrong in my wamp setting that makes it behave differently from the remote hosting sites. I have loaded the site on two linux hosting sites now with the same Serve 500 errors.
Please, I need help on how to tune my wamp for standard web operations so that I'd be sure to get the same results I get locally when I run it remotely.
Thanks

Related

Why curl Couldn't resolve host intermittently?

I have a web service application that works fine in my local. I have even installed ngrok and I'm able to call it on the public web. But as I put my code on our production server I keep getting the 'Couldn't resolve host' error. I'm using different APIs in my service and intermittently I get this error. (I use apache in my local and nginx on prod)
For example I work with googleapis.com and sometimes it works and sometimes it doesn't on the server. The exact same code works just fine on my local.
It's worth mentioning that I've had this application for few months on this server and it's only this past few days that I've started to get these type of errors.
BTW I've noticed that the Curl version in my local and production and their settings are different but I don't know if that could be the source of the problem because it was working just fine.
I would appreciate any kind of guidance.

500 Internal server error on php GET variables (CGI)

I'm currently writing a php API returning a JSON array. On my development environment everything seems to work fine.
So it was time for us to upload it on our dedicated server. But here is the deal. While our code is perfectly working on most environments, it is not on our server.
As I'm not an expert on multi-domain sites, we decided to try cPanel WHM, to easily configure our web server. Everything seems to work well, our API default page is running perfectly, showing the correct responses when a user is not permitted. As we are using custom urls, our .htaccess seems to work as well. But here is the rub! When I'm entering a $_GET variable to enter the API by using the correct keys, the server is automatically responding a 500 internal error.
I tried to look at the apache log file, it shows a
AH02812: attempt to invoke directory as script
I directly understood it was a httpd.conf problem. I replaced ScriptAlias by Alias, as most topics were saying. Now I don't have this error on my log, but its still showing the 500 internal server error.
We are currently running on Debian 7, with the latest stable version of cPanel. Our PHP version is 5.6.

New IIS 7 site not loading any PHP/HTML pages

we have an IIS 7 server hosting different sites/applications.
Take not that this server is hosting other site/site-applications running on either asp or php. There is already an existing site application running thru fastCGI php.
I now added a new site (not a site-application) - a laravel 5.1 framework, to the IIS server, but this new site is not loading anything. Tried a test php page which echos phpinfo() only and i also made a static html file with just "Hello world" on it but to no avail.
Checked my handlers, and my php handler is there.
When i try to browse the sites host name I get this error:
The server at [mysubdom].[domain].com can't be found, because the DNS
lookup failed. DNS is the network service that translates a website's name to
its Internet address. This error is most often caused by having no connection to
the Internet or a misconfigured network. It can also be caused by an
unresponsive DNS server or a firewall preventing Google Chrome from accessing
the network.
Is this really a DNS problem?
Can you open it local? http://127.0.0.1/{websitename}/index.html with the hello world ... Don't always go directly to your binding address.. try to load on the server itself first.

Locally Hosted Website / Email went down. Website still works on localhost. Firewall, or PHP error?

I'm working IT at a small company. We host our own exchange servers, and web server. Yesterday, at around 2pm, external emails stopped getting through to us, and our website began serving a 500 error to everyone.
I didn't do much to the firewall (sonicwall 240) or the servers yesterday to cause this. We run WordPress and do not have automatic updates turned on. Also PHP did not update itself.
I'm not sure where to look first. Any ideas on how to track down what's throwing the 500 error? It's not a single page or script that's doing it. Even if I create my own .php file, it'll have a 500 error.
Fixed: Our web server lost it's internal IP address. I changed it back to 192.168.0.3 as it was before, and all is well.

IIS 7 and PHP - Problem with remote access

After ten years of ASP.net development (i.e. I know very little about PHP), I have just installed my first PHP web site running on a Windows Server 2008 R2 IIS 7.5 web server.
The web server is one of three servers running in a small network.
I have set up DNS to reference the web server.
If I open a browser on any of the local network machines and enter the url, the web site opens and runs perfectly.
If I do the same thing with a PC that is not part of the network I am unable to open the web site.
I'm not sure if this is a PHP or IIS problem (or maybe both).
Can anyone point me in the right direction?
Thanks.
I'd be very surprised if it is a PHP problem. I have found some very odd behaviour in IIS with it apparently tunelling NTLM authentication to access resources on network drives, but you need to start by looking at the simple things first.
Can you access static content on the webserver? If not then you need to have a look at how your DNS, network routing and firewalls are configured.
If you can access static content but not PHP content, then the webserver should be lofgging the reason why it's turning down requests for PHP files - go read your logs.

Categories