I have a joomla GIT repository of my project. We are using wamp and windows 7 as a development environment. This repository works fine on one machine. But when we tried to clone same repository on other two machines, we are facing a strange error.
Error is: Error 0 couldn't connect to host
As shown in screenshot.
All other repositories on those two machines work fine.
There is no error logged in under any of error logs file (apache, php and mysql).
I enabled joomla's error reporting. Searched on Google but, no luck.
Please help.
Thanks.
When you clone your Joomla to another machine, there are several things you need to double check:
Not only the files from the GIT, make sure the database is the same on the other two machines as well (export from the first one, import to 2 other one using phpMyAdmin).
Make sure the configuration.php file on two other machines re-corrected, includes: path to logs, tmp folders; database information (host, username, password, database name).
It should works.
Well, I debugged little bit more and finally found the solution. It was a small issue with missing web service link in one table. We are using com_api for web services. On first machine web service link value in table was local value respective to that machine.
On remaining two machines, we updated this to local value of those respective machines.
And it worked :)
This is not a standard Joomla error - it's either that this error is thrown by an extension or it is a server error.
Try adding a die(); at the beginning of your index.php file and see if it actually dies, if it doesn't, then this is definitely a server error.
If it does die, the use the function: get_included_files() and then make a quick search on all the files included on that page for the sentence "Couldn't connect". You will find the culprit easily this way.
Check your .htaccess file, maybe they have some rule which can not be met. (Rename this file if it exists and see what happening)
But I think that the problem is in the network settings. Errors often come from dns issues or, curl connection restrictions.
Check your DNS records
Check your Curl settings and try to create any Curl request.
Check your .htaccess
I don't think this error related to Joomla , I think it is connection from PHP to Linux, try to change the port of the Linux.
and restart the Apache and try again.
Related
I am currently developing a web application using AWS services and it's written in PHP. Previously, I used XAMPP to do the work, but now I use EC2 and RDS (MySQL) of AWS. And I also hosted the web on domain using Route 53 and it is secure with Certificate Manager (HTTPS enabled).
This is how I do my job. Sublime Text to write code, then copy paste the file from local to server using WinSCP. If nothing wrong, the code will instantly reflect in my webpage. However, unlike XAMPP, the ERROR will reflect exactly which line is going wrong. The approach I am using will only show HTTP 500 (Request cannot be handled) within the webpage.
For now, I have to test code by code to find the ERROR and it's a waste of time. So, if I want to view which part is going wrong like XAMPP, how can I do so?
Thank you.
In a production environment, it is recommended to switch off detailed errors so that your implementation details are not exposed. Sounds like this is the problem you're facing with the new setup. You need to enable this in your php.ini file, and you might want to look into your .htaccess as well.
Check out the answer here for a more detailed explanation - How can I make PHP display the error instead of giving me 500 Internal Server Error
Here's a guide on implementing the changes you need - https://stackify.com/display-php-errors/
By default, the Errors logs are stored at /var/log/apache2/error.log. So you can do something like the below to see the apache logs in real-time:
tail -f /var/log/apache2/error.log
OpenSuse Leap 42.1 (latest upgrade)
Apache2, PHP 5.5 installed
OCI8 installed
ORACLE 11g
Last week, I got some update issues with KDE and did an upgrade of OpenSuse Leap 42.1. I then went over the whole procedure of installing oci8 (as described in http://php.net/manual/en/oci8.installation.php and making sure to use the correct PECL) and everything worked fine.
But when I restarted my system a few hours later, I was't able to connect via hhtp to any vhost due to failed connection to the database.
I get no error logs anywhere, just a white 404 page or the message "Error: Could not connect to database. Aborting." (depending on which page I'm calling). Pages with no connection to the database work perfect!
SQLDeveloper connects without any proble, using the same parameters as in the config-files for the vhosts.
Anyone any idea?
Generally when you get a
ORA-12514
it means that the listenr you are connecting to knows not the servicename/SID you're attempting to connect to. If you get that error it should indicate that the client got some sort of response from the listener which should exclude all sorts of network issues.
This is very much similar to ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
only that the issue sprouted up after an update.
I would first look in the client side tnsnames.ora and the server side listener.ora to check that everything is ok. Also check that the database is registered on the listener. Possibly also check that the db is remotely reachable from a known good client to exclude any issues on the listener configuration.
problem(s) solved!
as there were two different of them provoking a problem salad.
first, the update somehow managed to change some parameters in my config files, first of all the database name.
then, apache update from 2.2 to 2.4 DID change some things in the vhosts config files and therefore the errors were never logged in the former x_error.log and the 404 message was shown.
thx a lot for your response, louigi600!
I'm starting to get crazy with this.
I have to do some modifications to a wordpress website that i didn't create. I have access to the hosting so I downloaded all the files and a copy of the database.
After creating and importing in the local database I went to wp-config.php and change the hosting parametres (user, pass, server,...) for the local ones.
But here comes the troubles. When I change the online server dbXXXX.db.1and1.com to localhost it suddenly stops working and files called index.php won't ever work again
(I get "localhost server not found" error),
even if I change the source folder, or restart MAMP or restart the laptop... The only solution is to unistall MAMP, restart the system and install it again, but when changing the name of the server to localhost it happens again...
Well... If I copy the content of index.php in another file (for example index2.php) and set the parameters to the online server it works again until I change server to localhost.
When I say "it works" means that at least I get "error database connection" from wordpress (due to the online hosting does not allow external requests to its databases).
Can somebody help? Do you need some extra information? Thanks!
MAMP did some crazy this on my PC to, so I decided to switch to WAMP -
http://www.wampserver.com/en/
You may give it a try ?!
Finally I found the error. It's due to the file ".htaccess" that Wordpress (or I don't know who) creates for using permalink and MAC OS X.
When unzipping the web downloaded from the hosting the OS deleted that file because only system files can start with a dot (".htaccess").
I didn't find the solution and just start to work in Windows with BootCamp and all was fine. I was in a hurry to finish this job so I didn't have more time to try new solutions.
So I have not the solution but the source of the problem. Hope this helps someone at least finding the problem and save some time.
I'm trying to get php's ftp methods to work from within a VM. I can connect using ftp_connect but not actually do anything afterwards.
HOST: Ubuntu 14.10
GUEST: Debian 7
Stack: Vagrant - VirtualBox - Debian - LAMP
I'm using vagrant to run a virtual box VM that runs a lamp stack. In php I'm running some method calls (ftp_pasv, ftp_nlist) that are not working.
I discovered that because of the FTP protocol using random ports for connections, the issue is caused by the use of NAT networking in virtualbox. I have the perfect vagrant-virtualbox setup except for this one issue. Does anyone know of a method to get ftp to work on the guest OS in this scenario. I know I could try using a bridged setup, but that means a bunch more work setting it up and the machine will be available to the public. So I would prefer to try to get it working behind that NAT.
I also have tried to use ftp_pasv to get passive mode turned on, which would fix the issue. But the method returns false when I call it to turn on passive mode.
As far as I know this isn't possible. Maybe if you want to hack some source code and compile custom solutions it will work. But that's harder than just using a different setup. I've resorted to using curl to make the ftp connections. Which works for listing files and downloading them.
Anyone that comes across this question and actually finds a solution please post it here.
The problem is most likely related to the network configuration. The fact that e.g. creating a directory works in contrary to getting the directory listing indicates, that theres an issue with the back channel.
A potential root cause is the configuration of the network router. It seems that some routers handle packages different if they are sent from different mac adresses (host vs guest system).
I had this issue and it turned out that upgrading Virtual Box solved the issue. Possibly some bug in the NAT interface.
Recently my ISP switched our website to an IIS7.0 high availibility cluster. The website is running on PHP5.2.1 and I can only upload files (so no registry tweaks). I had tested the website before and everything seemed to be working, but now the checkout page fails with:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
As error messages go, this isn't very informative. I've tried:
ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );
but both don't seem to do anything.
Anyone know how to get better debugging output?
Edit : Looks like we have a similar question in serverfault. Check it out
Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.
You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”
Source
It's very common when you change server you cannot load your apps. I have solved this problem running php.exe instead of loading your apps on the browser:
1) Run it using the Command line > C:\php\php.exe OR
2) Run Windows Explorer, look for it, and double click on c:\php\php.exe.
3) You are gonna see what DLL's are having conflicts and causing the 500 error.
4) Solve the conflicts finding the right DLL's for your windows version and you should be able to see your apps through the browser.
The best of the lucks.
IIS does this, it's really annoying and I could not find a fix, which is what caused me to switch to an Apache server for my local machine. Unfortunately, if you don't have control over your server, the best you can do is either test it locally on an apache set up or ask your host to allow the error messages.
I did some googling, thisthis looks like what you need. Wish that was around when I was trying to get IIS running.