?
Solved

PHP & MySQL not working locally

Posted on 2015-02-23
6
Medium Priority
?
198 Views
Last Modified: 2015-02-23
I am running a PHP & MySQL website. I have it setup in my production server (IIS) and works just fine:

http://www.wiredinwellness.net/

If I enter incorrect password it redirects to the same page (login.php) and shows the error message, if its the correct password it redirects to the secured portion of the site.

But In my development environment its not working. I am running it on a MAC computer using MAMP, everything seems to be setup properly, the login page actually comes up just fine, but whether I enter the correct or incorrect user/password it reloads login.php but NOTHING is displayed, a blank page comes up, no errors.

is there a way to debug or find what may be wrong in my configuration that locally the page is not submitting properly or maybe the redirect is the issue ?  not sure. Locally doesn't work, when uploaded to the remote server works just fine. so the PHP code is just fine, has to be some configuration on the my local server for sure.

I am new to this environment (MAMP/PHP/MySQL) so I am not sure to even where to look.

Help is appreciated.
0
Comment
Question by:amucinobluedot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 

Author Comment

by:amucinobluedot
ID: 40626052
php.ini has display_errors = On

Still nothing is displayed on the browser (Chrome)
0
 

Author Comment

by:amucinobluedot
ID: 40626055
I also checked with Firefox and I have the same result, page goes blank when submitted.
0
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 2000 total points
ID: 40626429
Try checking your Apache error logs. I don't use Macs but apparently you'll find it here:

/var/log/apache2/error_log

Also, turning on display_errors may not be enough. Add this to the very top of your pages:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

And take a note of what the docs says:

Although display_errors may be set at runtime (with ini_set()), it won't have any effect if the script has fatal errors. This is because the desired runtime action does not get executed.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 5

Expert Comment

by:Marlon
ID: 40626687
It sounds like you have two environments; a production env and a dev env. Each has it's own server.
Could your login.php be trying to talk to the wrong server ?
0
 

Author Comment

by:amucinobluedot
ID: 40626726
No sir. Each one is talking to its own database. The servers are not connected in any way. Production works fine, hence the PHP code must be correct. But in my local environment for developing displays a blank page. Has to be something in my local setup causing this.

Ill try adding the code for displaying the error see what I come up with.
0
 

Author Comment

by:amucinobluedot
ID: 40626806
It is now showing the errors. I will try to debug and come back if after cleaning them up still can't move fwd. thanks.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question