Link to home
Start Free TrialLog in
Avatar of Vincent Mills
Vincent MillsFlag for United States of America

asked on

localhost - after login - URL does not exist.

Win 10 64 bit
Apache 2.2
PHP v (unknown)
Microsoft SQL Serve 2008 r2 Express
Dreamweaver CC 2019

Ehem… I have little experience with PHP, but I can fumble around "reading" it, I can't program it.

Background:
Using Dreamweaver, I attempted to create a php test server with this locally hosted and previously functioning web back office.
I have since backed this out and will be attempting to use another machine on the network as the testing server.
Back office (web) comes with Point of Sale software. POS Software is functioning fine as WAS the back office until... my Dreamweaver experiment.

Problem:
Since the attempted test server setup, and after a successful (not using Live View) Chrome localhost login I’m getting this:
"http://localhost/OCPOS/OCPOS/login.php" and the error of The requested URL /OCPOS/OCPOS/login.php was not found on this server.
The second "OCPOS" should not exist at all, and the file was never present to begin with, so why is it being requested?
I should be seeing a dashboard, and I'm not.

This login problem only happened after I mapped the files with Dreamweaver in site setup; again I have since backed this out.

Localhost – login file path:
C:\OCPOS\htdocs index.php - passes the request "header("location: OCPOS/login.php");"

login.php file path:
C:\OCPOS\htdocs\OCPOS - login.php (which looks to run a check on the user name and pword by a call to another "settings" file)
“login.php” also requests these
“include("includes/db.inc.php");”
“include("includes/login.inc.php");”


include("includes/db.inc.php") and login.inc.php file path:
C:\OCPOS\htdocs\OCPOS\includes – db.inc.php and login.inc.php
To the best of my abilities, I’ve crawled thru the scripts and find no “redirects” or circular references.

I’m thinking of swapping the htdocs file from another known good source, just to see what happens. Failing that I’m back to the re-install – which I’d like to avoid because it takes about an hour in total.
Any advice?

Respectfully,
Vincent
Avatar of David Favor
David Favor
Flag of United States of America image

Seems like, by file names you're using some sort of existing application.

Mention...

1) Name of application you're trying to get working.

2) Exact steps you've gone through to install AMP (Apache + MariaDB/MySQL + PHP).

3) Source of application files you download.

4) Exact steps you've gone through to install your application files.
Aside: If you're starting a new project from scratch, best to use latest software, which today is...

Apache-2.4.39.1
PHP-7.3.5.0
PHP FPM - for HTTP2 support
MariaDB-10.3.14

Open in new window


Apache-2.2 has been deprecated/retired for some time now.
Avatar of Vincent Mills

ASKER

Hi Mr. Favor,

1)      Name of application you're trying to get working.
OrderCounter POS, is installed and working. The Web aspect was working until I attached Dreamweaver.

2) Exact steps you've gone through to install AMP (Apache + MariaDB/MySQL + PHP).
Installation is a downloadable from the MFG.

3) Source of application files you download.
From the MFG directly.

4) Exact steps you've gone through to install your application files.
Executables and then a check for updates. All from the MFG.

Respectfully,
Vincent.
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mr. Favor,

As an experiment, I pasted in a known good copy of the htdocs folder.
Launched the application, reset the DB connections (as this feeds to the php settings file - I suspect)
Relaunched the localhost login, and voila!

Now as you suggested, I ran a comparison on the files.
C:\OCPOS\htdocs\index.php - makes a call and leads to
C:\OCPOS\htdocs\OCPOS\index.php

This is my observation; the 1st index.php runs the security check i.e. user / password, if you pass then you get the secondary index.php which is the dashboard I mentioned previously.

It seems the 1st index.php was copied and dropped into the next file, I have no idea how.
This is what I believe was causing my loop. I'll do some testing and see what shakes out.

Do you think Dreamweaver could have moved that file. I'm not going to claim innocence, but I don't recall playing with the index.php files?

Thanks for the heads up about Dreamweaver.
Once I get the other computer set up I'll test this all again.
And this time I'll be better prepared for any catastrophes.
Dreamweaver initiates all manner of strange behavior.

If everything worked. Then you use Dreamweaver + breakage occurred. Then restoring previous files worked.

Solution is simple. Don't use Dreamweaver.

Dreamweaver is a constant source of oddball problems, so if you think you must use it, point it at directories only Dreamweaver owns... so avoid commingling with real code, which must run to pay your bills.
Hi Mr. Favor,

This is a YES to my solution.

My lack of experience aside, the biggest problem I have with this “personal project”, is setting up the testing server for PHP and connecting Dreamweaver to the Microsoft SQL server. +++ I am learning : )

Thank you for the quirky behavior information about Dreamweaver, this is good to know. As a novice I find Dreamweaver has perks that favor my inexperience. To date, I've built four websites using Dreamweaver.

I'm not certain if I would violate any rules by posting my own website link on this thread, so I will err on the side of caution and invite you to see an example of the work I've accomplished in Dreamweaver, by asking you to see my companies website through my Expert Exchange profile page. Full disclosure; whilst the website is a template, there were a lot of code adjustments and all the image work was done by yours truly in Photoshop. Feedback is always welcome. : )

As far as not using Dreamweaver, do you have any suggestions for a quality replacement software?
Thank you again for all of your help.

Respectfully,
Vincent Mills.
My main customer uses Dreamweaver for HTML page layout.  After several bad examples, I have forbidden them from using it for any programming.  It even messes up javascript if it didn't originally generate it.  Yes, you can do web sites with Dreamweaver if it does everything you need.  Note that some programming features have been dropped from Dreamweaver because they both didn't work well and Dreamweaver was not keeping up.  WYSIWYG layout is Dreamweaver's strength.  Just about everything else seem to be it's weakness.