Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024
About Us
O nás
Magazine
Magazín
Open Source
Otvorený softvér
CVS
CVS
Services
Služby
Index  »  Projects  »  phpMyEdit  »  Forum  »  cannot connect

phpMyEdit Configuration     cannot connect
Post new topic   Reply to topic    
 
aceaid     Joined: 08 Oct 2008   Posts: 3  
Post Posted: 2008-10-08 21:10
Back to top  Reply with quote     

php 5.1.2
phpMyEdit 5.7.1
mysql server 5.0.67-community

I have had phpMyEdit on my development server for some time now and someone copied some files from the production server, and now, none of the pages that use phpMyEdit are working.

I have check file permissions and that is not the problem.

I think it has something to do with mysql.sock, but I am not sure.

I removed the @ in the setupfile for $dbl = mysql_pconnect($hn, $un, $pw); and I got
"Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/phpMyEdit-5.7.1/phpMyEditSetup.php on line 165"

I can connect to mysql using php if I use "127.0.0.1", but not if I use "localhost".

I am not sure what is up with my loopback, because it looks ok in the hosts file.


Does anyone have a clue as to where I might look.

Thanks in advance,
Chris

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2008-10-08 21:50
Back to top  Reply with quote     

Can you ping localhost?

 
aceaid     Joined: 08 Oct 2008   Posts: 3  
Post Posted: 2008-10-09 18:57
Back to top  Reply with quote     

ajh wrote:
Can you ping localhost?


Yes, no packets lost.

64 bytes from xxx.xxx.xxx (127.0.0.1): icmp_seq=16 ttl=64 time=0.036 ms
(x'ed out my real address since this is a dev machine)

 
ajh     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2008-10-10 09:57
Back to top  Reply with quote     

I might be completely off base here, but it looks as if PHP is connecting to MySQL via a socket rather than via the network. So my understanding is that when you use 127.0.0.1, it will use TCP, but when you use localhost it goes via the socket file "/var/lib/mysql/mysql.sock".

Have you checked the permissions on this socket file? It will need to be readable and writeable for the user or group that php runs as.

 
aceaid     Joined: 08 Oct 2008   Posts: 3  
Post Posted: 2008-10-10 17:06
Back to top  Reply with quote     

Well, it is fixed.

I'm not 100% sure why, but it definitely had something to do with permissions.

My solution was...

1. I stopped mysqld and apache

2. moved all the references to the socket in my.cnf and php.ini to /tmp

3. restarted mysql and apache

4. All was right with the world.

When I have a day free, I'll revisit this and see what more I can find on the subject.

I hope this posting helps someone in need.

 
Odin288     Joined: 27 Sep 2020   Posts: 14  
Post Posted: 2021-04-17 19:57
Back to top  Reply with quote     

Good post. I'm dealing with some of these issues as well. click for source

 
AidanSasse     Joined: 23 Feb 2022   Posts: 4  
Post Posted: 2022-11-13 13:21
Back to top  Reply with quote     

The phpMyEdit Configuration cannot connect to the database. You can try to connect to the database using a VPN Black Friday or a different name, username, and password. If your ISP has a proxy server on the Internet, it will prevent your computer from connecting to web sites directly. You will have to use a proxy server to access web sites behind the firewall.

 
JasperDallas     Joined: 21 Dec 2022   Posts: 14  
Post Posted: 2022-12-21 13:37
Back to top  Reply with quote     

Before applying for a student loan, make sure you have a plan for paying it back. It's best if you have a plan before getting into debt because it will help keep your payments manageable and avoid interest charges on the loan. If you don't have enough money saved up for emergencies, then it's going to be hard for you to repay your loans on time. https://alltopreviews.com/services/grabmyessay

 
oliverbeth     Joined: 16 Feb 2023   Posts: 1  
Post Posted: 2023-02-16 14:06
Back to top  Reply with quote     

I agree with AidanSasse as this probem can be solved easily by using a proxy to access from other country's location, I know some best VPNs for Paramount Plus in UK and I think you should try as well.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Odkazový formulár · Application form · Prihláška
Report bug on PLATON.SK website · Upozorniť na chybu na PLATON.SK webstránke · Terms of use · Podmienky použitia · Privacy policy · Ochrana osobných údajov