Website doesn't work as it does on wamp server?

After working on a project for some time now I went to transfer it onto my webserver’s public directory to put it onto my domain. Everything on my localhost server (wamp) works perfectly but when transferring it over to my webserver it seems nothing is working as it should.

When clicking on navigation bars such as sign up or log in it changes the url as it should (/action.php?action=login) but nothing changes on the page and it doesn’t display what it should, like my localhost does fine. Another weird thing thats occured when moving it onto my web server is; The sign up and log in buttons on the navigation bar aren’t being displayed on http://heartfx.org/test but on www.heartfx.org/test they do but both pages still do not work when clicking on the buttons or going to action page. They should display the proper page accordingly but do not.

Came here to get some advice on what I can do on my end to help fix this issue. I am already going back and forth trying to discuss this issue with my hosting provider through a support ticket but came here for additional advice!

Thanks,
Codi Bezouka-Smith

Both "Sign-up " site pages are truncated which looks as though there is a PHP error:

       <div class="page" id="p1-page">
          <div id="shell">
            <a class="btn-register">X</a>

Try adding these lines at the top of action.php

<?php 
   error_reporting(-1);
   ini_set('display_errors', 'true');
   // remaining script goes here

1 Like

Went an added

error_reporting(-1);
ini_set('display_errors', 'true');

to the top of action.php but the result was no different nor did I receive any sort of errors :frowning: Not sure if you can see all of the code from action.php from the site but incase you can’t here is what my action.php code looks like.

error_reporting(-1);
ini_set(‘display_errors’, ‘true’);
to the top of action.php but the result was no different nor did I receive any sort of errors :frowning:

Try adding this line which should produce an error:

<?php 
   error_reporting(-1);
   ini_set('display_errors', 'true');
   echo $undeclaredVariableShouldProduceError;
die; // just in case the errors are hidden
// remaining script goes here

1 Like

Which it does, as you can see here.

to the top of action.php but the result was no different nor did I receive any sort of errors :frowning: Not sure if you can see all of the code from action.php from the site but incase you can’t here is what my action.php code looks like.

The following error is displaying:

Parse error: syntax error, unexpected ‘include’ (T_INCLUDE), expecting ‘,’ or ‘;’ in /usr/www/heartfx/public/test/action.php on line 7

1 Like

This is from the when I was trying to echo $undeclaredVariableShouldProduceError; without the ; after it. I have set it correctly and I do get the error (to test rather or not the error_reporting is working OK as you can see here.

It looks like the error reporting is working OK so remove the echo $undeclaredVariableShouldProduceError; and try putting a break just after the point where the page truncates:

 <div class="page" id="p1-page">
          <div id="shell">
            <a class="btn-register">X</a>
<?php echo '<br>Line: ' .__LINE__; die; ?>

If no error shows then move the line further down the page until the error is pinpointed.

1 Like

Shouldn’t it display all errors when having that error_reporting on the top of action.php?

It depends how the error_reporting is set. If there is a syntax error in an include file the error may not show.

The breakpoint is tedious but effective. I usually start at halfway and if there is an error move the breakpoint to midway between the start and finish.

If there is not an error then move the breakpoint between halfway and the end. Continue halving the script until the error is pinpointed.

Where exactly do you see this line? I can’t seem to find it in file: action.php with the search function :stuck_out_tongue:

Where exactly do you see this line? I can’t seem to find it in file: action.php with the search function :stuck_out_tongue:

Neither can I :frowning:

I think the problem is with the function showHeader()

Try putting the breakpoint imediately after this line which is about line: #45

if ($action == 'register_account') {
echo '<br>Line: ' .__LINE__; die; 

  // hide all errors

as you can see at http://www.heartfx.org/test/action.php?action=register_account it displays: Line: 45 on the page.

OK so that proves it is OK up to that line #45.

Now move the breakpoint further down until the error is pinpointed.

1 Like

I simply moved it 2 lines down under the showHeader('Register Account') statement and now it does not display anything but the navigation bar :laughing:

This occurs not only under the showHeader('Register Account'); statement but under ALL showHeader('') statements :frowning:

I think the problem is with the include file near the top which must contain the function showHeader();

Try replacing
include ‘core/common.inc.php’;

with

require ‘core/common.inc.php’;

Changed it to require 'core/common.inc.php'; and didn’t get any different result :frowning:

The “showHeader function is undefined” suggests it isn’t being included or that the function is broken.

1 Like

That error is no longer be displayed. I was messing around with the code during the meantime waiting for response.

For some reason when sitting at an action page like /action.php?action=register_account idle for around 10 minutes and then going back and refreshing the module shows but after refreshing again, it dissapears once again, very very confusing sort of thing going on here.