joomla, php, windows server - Could not instantiate mail function - php

Moving an old Joomla 2.5.x install from an old win 2008 server to a win 2016 server. We will be upgrading to the latest version of joomla/php in the future, but for now I'm trying to get the current (old) version working. PHP is 5.4.10
I have the joomla site itself working. Although the contact form does not work. It throws the error 'Could not instantiate mail function' when you try to send.
Joomla is running under the same php install - i copied it from the old server. The joomla config is the same as well, except for updating hostname/paths etc where relevant. I've searched through all the files on the new server looking to see if anything was pointing to the mail server on the old machine - did not find anything. And i have confirmed the mail server on the new machine is working - sent an email to myself as well as telneted to port 25 to confirm it's accepting local connections. But I'm guessing from the error, it's failing before it even tried to connect to the mail server. And the file paths should be the same between the two servers as well.
At this point my guess would be there's some difference between IIS 7.x and IIS 10.x that's causing this, but that's just a guess. Hopefully someone else might have a more specific guess? ;)
thanks in advance for any help.

Ok, looks like the issue isn't with the mailer, it's with dns. It's not resolving anything.
$dnsrecs = dns_get_record('google.com'); returns dns query failed. However, dns on the server itself appears to be working. nslookup from the command prompt works. I even tried switching name servers to googles server - which also works from the command prompt but not from within php. Since this is an entirely different issue from the original topic, I'll mark this as answered and open a new question.

Related

Issue with XAMPP and MySql

I am facing a problem pretty common, I have installed MySql Server because in the past I developed an CRUD app by using Java Swing and Maven, and now I am trying to create same thing, a CRUD app only this time with PHP.
I am following a tutorial from Udemy and this guy is using XAMPP to launch both an Apache Server and a MySQL. But somehow it's interfering with the one already installed on my laptop and cannot make the connection with XAMPP.
I opened my.ini and where says password i put my own from MySQL Workbench, and I see it's using the same port 3306 but still cannot work and I dont know why.
Is there any solution to modify my.ini and establish the connection without uninstalling the MySql Server installed before, because if I do that I ruin the other Java app using it.
Could you please provide the error logs? So the problem can be identified properly. By default, you can get the logs file for Apache in
\xampp\apache\logs\error.log
And for PHP here \xampp\php\logs

PHP iSDK is not working when deploy on Ubuntu cloud server

I have written some custom webservices to communicate with Infusionsoft. I want to fetch the Custom Field from Infusionsoft on the basis of EmailId.
I have used following SDK to fulfill my requirements: https://github.com/infusionsoft/PHP-iSDK
The issue is that when I test my code in my local machine it runs fine. My local machine contains Windows 7 and wamp server.
But when I deploy it on my cloud server that is based on Ubuntu. it doesnt work. I have already installed apache server on ubuntu..
I have put some debug points in isdk.php file within some functions.. These are the logs from them on each machine:
Local Machine - Windows 7:
In Find By Email Method
***In method caller***
Response From Call: Array
Custom field from Infusionsoft: 20130803T07:46:03
Cloud Server - Ubuntu:
In Find By Email Method
***In method caller***
Response From Call: 0
It seems it gets connected successfully to Infusionsoft but it doesnt return output properly. I have used same request parameters on both.
What I am missing here?? Is it something to do with xmlrpc?? I have placed the xmlrpc directory on ubuntu as well.. but it didnt worked out...
Any quick response would be appreciated.
Thanks
Zunair
Since you did not provide your version of PHP I can only tell you to check your PHP versions and make sure the ubuntu server is at least 5.3.
Print out your response you get from infusionsoft, it should be in the form of an array object and you might have a different message. Perhaps a throttling issue. It looks like the response you are printing out is just some variables you are echoing.
The last thing I can think of to check is the location of the ubuntu machine. If I recall correctly infusionsoft has some groups of IPs blocked from accessing the API. I doubt this is your issue but it is a possibility.
Thanks guys for your response.. I got it working..
The first issue was that infusionsofts logs were not working for me... I did fixed them first and they showed me what was the actual reason..
They were using curl for sending the requests.. In my local machine curl was installed and in ubuntu I didnt have it with me... So, I installed it there.. and then it came back to life.. :)

Unable to connect to PHP Websocket Server

I am trying to set up a PHP websocket server using phpwebsocket. Everything I have done is exactly per the phpwebsocket files (with the exception of changing the server to localhost and adjusting ports). I am trying to do this on Windows 7 with Apache 2.2 and PHP 5.2.17. I have also tried several other examples that I have found on the web.
With all of the different set ups I have tried, I have not been able to get Firefox to connect to the socket. I have also tried using Telnet to connect but have not had any luck there. I feel like there must a step that I am missing because I get the same result with everything I try. I have also disabled Windows Firewall which did not change the result.
Any thoughts on what might be keeping this setup from being able to get a connection?

Something Server Specific Not Allowing Connect with Facebook

I had FB connect working perfectly fine on my site. Then one day, we noticed it was no longer working. It is not giving any errors, but when I try to do the getUser() function from my facebook class, the response to the send of my signed request is coming back empty, no user data. That is the basic problem, but let me detail what I have nailed down.
I believe there is a problem with the server somehow, either something inside httpd.conf or perhaps php.ini and here is why.
I took all my PHP pages that are required for the FB integration over to another server and another domain. They worked fine. That, to me, ruled out a problem with the code itself, or the Facebook App settings I am using.
I then went back to the problem server, and setup a 3rd domain and tried the same thing again. It would not work. So that, to me, ruled out a problem with the specific domain I am ultimately trying to get working again.
I will admit, I dont know what changes may have been made between the time it was working and when it suddenly was not. If I did, I had a solid idea, I would just roll it back. I did have someone, "recompile apache with mod_deflate and mod_cache." I tried to search for those causing a problem with FB but didnt find anything.
PHP Version 5.3.10
Server version: Apache/2.2.22 (Unix)
Server built: Feb 10 2012 20:31:21
Cpanel::Easy::Apache v3.9.1 rev9999
Thank you for reading my question.
I have resolved my situation. The key to my solution was going to line 633 of base_facebook.php and going an echo $e; to determine why the token response was failing. I then managed to identify the root of the problem:
CurlException: 1: Protocol https not supported or disabled in libcurlCurl
So I contacted my server support people who informed me, "The curl php module has been built without ssl support." which was after they had said
"I am almost positive that when I rebuild apache I made sure curlssl was checked. This is a typical option that people request to have enabled, so I always make sure it is enabled."
So the end solution was that they had to recompile apache and php with the curlssl module.

Wampserver 2.1 MySQL and localhost problem

I've been using wampserver for a while but today ive installed new version WampServer 2.1e (32 bits) and I can't understand whats going on.
I can't use MySQL console to login, I always get
ERROR 1130 (HY000): Host 'my ip address' is not allowed to connect to this MySQL server
I am using MySQL 5.5.8.
And when I try to open http://localhost/anything/anything/anything or any other addess on localhost I always get moved to http://localhost/users/login?from=/ to some ADIMIRA Catalogo Metalúrgico.
There is no .htaccess in my www folder and I have even rewrite_module off.
Can anyone tell me please what is wrong and how to fix this?
This error means that you are trying to connect to MySQL using a username that is restricted to either localhost or another specific IP address, and either aren't local or aren't connecting using that specific IP address.
You will need to either remove the host restriction from that user, or add another host to the list of hosts that user can connect as. You'll want to read up on account management commands in MySQL to find exactly the right commands for your situation.
(This error can also mean that the restriction is hostname-based, but the IP you're using to connect does not have that hostname or the hostname lookup failed.)
From the wampserver site, the latest stable release is 2.1. Where did you get version 2.2 from? Anyway, I think it's better to use the stable versions instead of the beta ones. No point using the latest software if it does not work.

Categories