Page 1 of 3

waiting for localhost

PostPosted: 08. March 2016 12:47
by gsc1ugs
Hi

Just install xampp version 7 apache running on port 8080 MySQL running port 3306, when I try run php website, just get "waiting for localhost" tried firefox too, same, nothing, any help please?

Gary

Re: waiting for localhost

PostPosted: 08. March 2016 13:07
by Altrea
Hi Gary,

=> [Q&A] Changing the Apache default ports

Best wishes,
Altrea

Re: waiting for localhost

PostPosted: 08. March 2016 14:02
by gsc1ugs
Done that, apache is running

Re: waiting for localhost

PostPosted: 08. March 2016 14:09
by Altrea
gsc1ugs wrote:apache running on port 8080


Altrea wrote:Changing the Apache ports has some sideeffects:

  • append port to every request
    the new port needs to be added to every request (e.g.: instead of http://localhost/xampp/index.php to request the orange XAMPP administration page with port 1234 you need to use this url http://localhost:1234/xampp/index,php. This is not needed for the default ports, because if no port is given the default ports based on the protocol (http://, https://, etc) is used.
  • XAMPP control panel configuration
    The control panel needs the information about the new ports, otherwise the Admin buttons and port prechecks will not work anymore

    [...]


Done that?

Re: waiting for localhost

PostPosted: 08. March 2016 14:17
by gsc1ugs
if I type http://localhost:8080 I get the dash board, if I click admin on the MySQL section I get http://localhost/phpmyadmin which I have to change to http://localhost:8080/phpmyadmin and then it works, is that what your referring to? the problem is when I click mysite http://localhost:8080/mysite/index.php just get waiting for localhost.. its an opencart standard install which works online

www.auctioneerslive.co.uk

Re: waiting for localhost

PostPosted: 08. March 2016 14:48
by Altrea
gsc1ugs wrote:if I type http://localhost:8080 I get the dash board

Means XAMPP is working as expected

gsc1ugs wrote:if I click admin on the MySQL section I get http://localhost/phpmyadmin which I have to change to http://localhost:8080/phpmyadmin and then it works

So you did NOT configure the new port in the control panel settings too.

gsc1ugs wrote:the problem is when I click mysite http://localhost:8080/mysite/index.php just get waiting for localhost.. its an opencart standard install which works online

Either your OpenCart configuration is the problem (did you adjust the config to use your local url?) or your Apache / PHP settings needs to be adjusted, or this opencart version does not work with the PHP version used in your XAMPP.
In all cases this is a third party requirement issue. You should ask that question on an OpenCart support channel.

Re: waiting for localhost

PostPosted: 08. March 2016 14:52
by gsc1ugs
config file has been changed in OC (opencart) to cater for localhost connection, just to be complete, what setting for the server should be in the config file of OC to direct to the database location?


this is out of the apache error logs
[Tue Mar 08 13:47:09.241172 2016] [ssl:warn] [pid 6068:tid 324] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name


It eventually says the server has gone away, so it seems it cannot find the db?

here is my setting for the server in the OC config file

define('HTTP_SERVER', 'http://localhost:8080/auctioneerslive/');

that is my local foldername

Re: waiting for localhost

PostPosted: 08. March 2016 14:59
by Altrea
gsc1ugs wrote:config file has been changed in OC (opencart) to cater for localhost connection, just to be complete, what setting for the server should be in the config file of OC to direct to the database location?

I don't know Opencart. I only know that many webapplications need to be adjusted for local úse.


gsc1ugs wrote:this is out of the apache error logs
[Tue Mar 08 13:47:09.241172 2016] [ssl:warn] [pid 6068:tid 324] AH01909: http://www.example.com:443:0 server certificate does NOT include an ID which matches the server name

This is not a problem. This message results from a SSL dummy configuration and occurs on every XAMPP installation.

gsc1ugs wrote:It eventually says the server has gone away, so it seems it cannot find the db?

Depends which server. Can also be a timeout problem. But i cannot say in which way OpenCart reacts on specific situations.

Re: waiting for localhost

PostPosted: 08. March 2016 15:06
by gsc1ugs
here is my setting for the server in the OC config file

define('HTTP_SERVER', 'http://localhost:8080/auctioneerslive/');

is that correct anyone? never used xampp but I know its c:\xampp\mysql in its physical location and that site folders should be placed in c:\xampp\htdocs so can my php find the db server? all tests with php work fine ie: phpinfo() etc

Re: waiting for localhost

PostPosted: 08. March 2016 15:32
by Altrea
I cannot tell you if this is correct. This is a OpenCart specific constant. How am i able to know what OpenCart expects there?
Ever tried to google this? => http://forum.opencart.com/viewtopic.php?t=149679

Re: waiting for localhost

PostPosted: 08. March 2016 15:58
by gsc1ugs
Ive no problem about OC setup, its just that whirling waiting for localhost, like to know what its waiting for.

Re: waiting for localhost

PostPosted: 08. March 2016 16:20
by Altrea
gsc1ugs wrote:Ive no problem about OC setup

Oh okay. My fault. I was expecting you don't know what the problem is...
So i can assume you did already adjust the .htaccess file to fit your local URL and subfolder like the tutorial explains?

Re: waiting for localhost

PostPosted: 08. March 2016 16:25
by gsc1ugs
Sorry yes ive done that... new set of errors may help me, I believe tomcat uses 8080 so changed apache and my configs to 8000

[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Warning: mysqli::__construct(): MySQL server has gone away in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 7
[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Warning: mysqli::__construct(): Error while reading greeting packet. PID=7888 in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 7
[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Warning: mysqli::__construct(): (HY000/2006): MySQL server has gone away in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 7
[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Notice: Error: Could not make a database link (2006) MySQL server has gone away in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 10
[Tue Mar 08 15:17:24.594050 2016] [:error] [pid 7888:tid 1612] [client ::1:50388] PHP Warning: mysqli::close(): Couldn't fetch mysqli in C:\\xampp\\htdocs\\auctioneerslive\\system\\library\\db\\mysqli.php on line 58

Re: waiting for localhost

PostPosted: 08. March 2016 16:31
by Altrea

Re: waiting for localhost

PostPosted: 08. March 2016 16:48
by gsc1ugs
What program you recommend to debug php? I could at least get to the line where it hangs