Wampserver 2.1 MySQL and localhost problem - php

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.

Related

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

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.

I want to use PHP to query my current domain SQL server

I have tried everything
Wamp and XAMPP only provide thier own local server and wont let me specify my own server
I have tried IIS and PHP but it doesnt work at all
I would like a simple way to get my SQL server to use PHP in my domain, i dont need it to be remote access yet
Appreciate some hand holding at this point :(
Thanks
Hi thanks for replying
I have explained below what everything meant by using xammp or want iis and php
The server I have is on the Microsoft SQL server management studio
All of the all in one installers will just user local Host and thier own server and database I want to use mine.
Whenever I try using MySQL connection it says it has activley refused connection.
I've added my credentials into the security section on the server. Allowed remote login and specified ports on the server manager program.
Why isn't there a simple step by step program to enable php use on my server and or connect it to my online site..

How to add ODBC to MAMP on OSX

I'm trying to get ODBC to work on MAMP. I have tried many suggestions and solutions including those already on stackoverflow:
MAMP: Adding ODBC or SQL Server support ,
How do I add an ODBC driver to a MAMP environment?
None are successful so far.
This is the latest I tried.
I downloaded the latest ODBC connector:
http://dev.mysql.com/downloads/connector/odbc/
Installed it with the OSX DMG
I than added the driver in iODBC
I keep getting this message:
Specific driver could not be loaded
and
No suitable image found. Did find: /usr/local/lib/libmyodbc5w.so mach-o, but wrong architecture
Any suggestions?
Looks like you are right about the 32-bit only of iODBC.
You will need to download the Source, and compile from scratch. You will also need to download XCode through the AppStore first, so you have access to gcc and cmake.
Source Code Link: http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.7.tar.gz
Note: From the CLI you can run the lipo -detailed_info /path/to/binary command. This would give you detailed information about a specified binary.
I struggled with this problem for MANY hours (I messed with msql/php, and for years ago, so I consider myself currently a total newbie!). My problem was I couldn't connect my PC to my new online server using ODBC (server was a mac mini running mavericks, trying to connect from a windows machine in my office via mysql odic connector). I finally found a solution that works. here is my situation and environment:
I am converting from Access to MySql/PHP. Application configured as front-end / back-end.
Put my server online so I could export my access back end tables to MYSQL. (some were online at another server, some were on my internal windows 2003 server. ) planning to change front end to php from access vba.
Installed ODBC Administrator on mac mini (mavericks) per google searches.
Went to drivers tab in ODBC Administrator. Set my drivers from USER to SYSTEM in the pulldown on the drivers page. This opened the drivers to appear on the SYSTEM tab of ODBC Administrator (prior to this, the drivers did not appear on the SYSTEM tab of ODBC Administrator).
Added the DSN, the USER, the PORT, and the PASSWORD variables.
I then went to my MAMP application that was running on the Mac. I clicked on [FILE], [EDIT] [TEMPLATE] [my.cnf]. This opened the configuration file. There is a warning - if this gets polluted, it screws up the entire MAMP app.
I made the following change (Inserted a comment above the change).
the bind address was just commented out. 9-5-14
bind-address = 127.0.0.1
This change does not tie MAMP to the localhost (I believe).
I kept scrolling through the file. I also made the next change, and then saved the .cnf file:
Just commented out the next line. Trying to get odbc to work. 9-5-14
MAMP_skip-networking_MAMP
This change I believe tells MAMP to allow remote connections.
On PC, under Data Sources, System DSN tab, using MYSQL ODBC 5.1 driver, I set the datasource name, I set the URL of the online server (which was registered with internic), I set the port, and I entered the User and password to be the same KEYS I set in the ODBC System DSN I added on the Mac server. Then, I pulled down the database tab, and miraculously - the databases in my mac server appeared!
Hope this is helpful to another newbie! I literally worked WAY too many hours trying to find a solution, and it wound up being pretty easy once I lucked into the answer!
.

Connect to MySQL Database on cPanel Server Externally from Heroku?

I am using the Heroku app to host a facebook application since Facebook is changing how they have their applications set up, again. However I need to connect to the MySQL Externally from my cPanel VPS and I am not able to connect correctly. I have tried using the darkprospect.net(host domain), ultimate-battle-online.com (primary domain of user) and 184.154.20.170 as well as those plus the combination of added port 3306 and none have worked. I previously needed to make sure that I added the right domain to the right file but right now it's just not connecting. Right now get this error when using mysql_connect() function:
Lost connection to MySQL server at 'reading initial communication packet', system error: 110
Again, thank you for any ideas that you may have!
EDIT: I found out that it was an issue with the buildpack that is the default for PHP apps, since I develop on a VPS with PHP 5.4.7 I was using parameters that were tuned for it and were not very supportive on their bundle of vanilla PHP and Apache.
I was able to create a new Heroku buildpack that was able to support all of the features that my application was needing. Because I was developing on my VPS in PHP 5.4.7 my configurations were designed for more of the new features and with the Heroku's basic Buildpack only having PHP 5.3.10 there were unseen errors in background logs that were halting the connection process. Additionally CSF Firewall was configured only for UDP income 3306 and I was able to add it to UTP as well and that seemed to resolve the Connection Timed Out error that was the final error after I made a better buildpack for myself.

FreeTDS - Linux server problems - both server and SQL admins say it's properly configured

First time user of FreeTDS. It is a "shared hosting" but we are the re-sellers and put in a ticket for them to install and configure it.
Situation:
We run a Linux setup ( we'll call them A ) and need to connect to a MSSQL database on a remote server managed by another company. We run a Red Hat variant I'm certain, and they have a Windows Server setup - We'll call them B.
So our Admins (A) assure us that they have properly installed and configured FreeTDS. Our Windows guys (B) have assured us they have opened up a port, allowed our IP address and setup remote access and given proper authorization to our account.
Yet, I still get an cannot connect to the database error using mssql_connect. I've gone back and forth with both sides on this and they both, while not blaming me, assure me of proper configuration on their end. I know I'm using the right user name and password, the right port number and proper IP address to the remote server. On top of this, I can telnet in and use fsockopen() to connect to the remote server. So the port is open and the IP unblocked, but I still get the error.
Am I doing something wrong? I'm terribly new to this (windows specifically), but when both 2nd and 3rd parties (As it were) say they are both doing things right, and my side of the deal is as simple as using mssql_connect() with the proper credentials, it makes it difficult. Top it off, the client is pissed that this isn't done yet, and the only explanation I have (due to the other parties having emailed the client saying their end is ok) is to plead that I'm new to this.
The actual error is:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: xxx.xxx.xx.xxx:1433 in /path/to/file/file.php on line 18
Error connecting to the database
I can't glean any other information - at least by any method I'm aware of.
I should not have taken this job, but is there any advice to be had - things to ask, ways to troubleshoot? I'm at a dead end and any I'll be forever grateful for any help.

Categories