[kwlug-disc] Ubuntu 11.04 and LAMP :: Problems w/ MySQL access over 'net

unsolicited unsolicited at swiz.ca
Fri May 13 21:46:45 EDT 2011


John Johnson wrote, On 05/13/2011 8:14 PM:
>  On 2011-05-06 22:11, JohnJ wrote:
>> Update: I now have [ edit ] a Linux box/web server running LAMP at 
>> home mapped through my router to the 'net.
> 
> < ... snip ... >
> 
>> I will post am posting my adventures with LAMP on the my blog.
> 
> < ... snip ... >
> 
>> I deferred the FTP thing ...
> 
> < ... snip ... >
> 
> On 2011-05-02 11:10, JohnJ wrote:
>> Soon:
>> MySQL
> 
> So much for background.
> 
> Though LAMP I have MySQL installed.
> MySQL works locally.
> MySQL works through http://localhost/ see below.
> *MySQL does not work through the tubes*.
> 
> And I was pleased to find that the PDO drivers came with LAMP for Ubuntu 
> 11.04.
> (The Google said that this was a lot of work with earlier versions of 
> Ubuntu & LAMP).
> BTW: I have an app that uses pdo as opposed to mysqli.
> 
> A short 15 line test php file that tests access to a test db (using pdo) 
> in MySQL works fine through http:://localhost/pathtotestfile
> 
> But, from another PC and coming into the same test file over the tubes 
> using http:://insert-ip-address-here/pathtotestfile
> I am met with: HTTP 500 : Internal Server Error.
> 
> The test file has been chmod-ed to 755.
> Same result.
> 
> That other PHP files, w/o MySQL code, execute over the tubes suggest 
> that MySQL is the problem.
> And for some reason the try / catch in the test code is failing to to be 
> gentle with the error handling.
> 
> 
> I could crawl through the tubes looking at tuts but I thought I would 
> toss this out here.

I don't have the answer, but some thoughts and suggestions:
- IIRC, Apache works on names, not numbers. I expect localhost is an 
exception, or the browser auto-translates it to 127.0.0.1. So:
- if http://localhost/etc works, does http://<real ip address>/etc work?
- does http://<mymachinename>/etc work.
- From windows, if you do telnet 80 <ipaddress>, does anything good 
happen, like, text of any sort? If you type in 'get stuff' do you get 
file not found sort of thing?
- it should be the apache process calling mysql, so if it works on 
locahost, I suspect it should work everywhere. i.e. not a caller 
permissions, or access, error.

But others, with much more expertise than I, will likely respond soon.

It might not hurt to update %windir%\system32\drivers\etc\hosts with 
appropriate names, so you can browse by name, not just ip. You might 
update lmhosts while you're there - perhaps facilitating samba in your 
future.




More information about the kwlug-disc mailing list