Cannot access backend after install

860 views
Skip to first unread message

michaelj...@gmail.com

unread,
Dec 29, 2015, 9:35:00 AM12/29/15
to Easy!Appointments - Support Group
Hi. I am trying to install for the first time and am having some problems. Firstly I couldnt connect to my created, empty database. Got a "Could not connect with the settings provided in the configuration.php file" in the easyappointments root. Managed to find out that I had to change $db['default']['pconnect'] from TRUE to FALSE in the database.php file. This allowed me to connect and I got the installation page. Filled out the entries and hit Install, no errors. Now when I try to connect to my backend, I get:

A Database Error Occurred

Error Number: 1146

Table '******_ea.ea_settings' doesn't exist

SELECT * FROM (`ea_settings`) WHERE `name` = 'company_name'

Filename: /home/*******/public_html/easyappointments/models/settings_model.php

Line Number: 27


Tried all the suggestions that I found here but still the same error.

Any suggestions please? Thanks.

Craig Tucker

unread,
Dec 30, 2015, 11:50:46 AM12/30/15
to Easy!Appointments - Support Group
That looks odd.  I would start over (sorry to say).  It appears that the database did not fully set up.  You could look at phpMyAdmin and see if the table is even there and if it is not dump it and let it build the table again. 

michaelj...@gmail.com

unread,
Dec 31, 2015, 6:33:01 AM12/31/15
to Easy!Appointments - Support Group
Hi Craig. There are no tables in the database at all. When I go for install, the "working" symbol appears for 2 seconds and then returns to the installation setup page. There are no messages, success or otherwise. What should happen on the install? Thanks.

Craig Tucker

unread,
Dec 31, 2015, 7:39:42 AM12/31/15
to Easy!Appointments - Support Group
I would bet the credentials entered in the configuration file are off.  If they match your set up in MySQL it will set up.  If not it will hang.  Usually when I am setting up an install, in phpMyAdmin, I first create a user (any name will do, for convenience I usually use the name of the installation file location).  When setting up the user I select the option to set up a table with the same name.  I select local host.  I select to grant all privileges.  Then add the password.  This is the information that I use in EA.  I suppose you are doing the same but if not, delete or drop what you have and try again.
Message has been deleted

michaelj...@gmail.com

unread,
Jan 2, 2016, 2:20:33 PM1/2/16
to Easy!Appointments - Support Group
Hi Craig. I started again and still the same problem. When I click on install, should there be a "successful" notification? There is not at the moment. It just tries to install and then still displays the same installation page. What does the Company Link refer to? I tried changing the permission settings of my easy app folder but still the same. I tried changing the htaccess file and various other tweaks I found here, but no difference. My hoster tells me that the rewrite module is enabled and that I can redirect it if I need to, but I am wondering if there is a problem with the server and maybe I should move it somewhere else. Thanks for your suggestions and Happy New Year.

Alex Tselegidis

unread,
Jan 2, 2016, 2:20:42 PM1/2/16
to Easy!Appointments - Support Group
Hi, Happy new year :) 


There are no mod_rewrite issues there. 

(Also remove all the E!A tables from your database before installing)

michaelj...@gmail.com

unread,
Jan 2, 2016, 2:32:24 PM1/2/16
to Easy!Appointments - Support Group
Hi Alex. Happy New Year to you too. I will try the BETA version as you kindly suggest. With regard to the tables, that is the problem at the moment, there are no tables created when I try to install. So you think my current problem is with the rewrite and not something I have not done correctly? I have not used E!A before although I know that many have with no problems. Do I need to change any permissions on the server or the modify the htaccess files? What does the Company Link on the installation page refer to?

Thanks.

Alex Tselegidis

unread,
Jan 2, 2016, 2:47:54 PM1/2/16
to Easy!Appointments - Support Group
It seems that your installation did not complete successfully and data are missing from there. Re-installing with v1.1 will solve the problems. You have to repeat the database.php workaround again for the new files. 

The company link is used whenever there is a new email sent to customers. It should point to the company's main portal, contact page or even in the booking page itself. 

michaelj...@gmail.com

unread,
Jan 2, 2016, 3:07:10 PM1/2/16
to Easy!Appointments - Support Group
OK. Success Alex, you are a star !!. I have installed 1.1. I did not need to change the pcconnect setting in the database.php file but I have anyway.

I have to goto http://****.com/easyappointments/index.php/backend to access the backend now (with the index.php in the URL). Is this correct? If I omit this from the URL I get a 404 error. Also when I try to book an appointment I get an error


The operation could not complete due to unexpected issues.

Details

But there are no details of the error. If I enable Debug Mode this error does not occur.

Finally, this might seem a stupid question, but I cannot see how to add another sevice provider? Maybe I have had too much to drink.

Thanks again.

michaelj...@gmail.com

unread,
Jan 2, 2016, 3:18:05 PM1/2/16
to Easy!Appointments - Support Group
Alex. Sorry some of the info in my last post was wrong. When I try to go to book an appointment I get the error. If I go to the backend, log in, then log out and go to book an appointment button there, all is fine.

Alex Tselegidis

unread,
Jan 2, 2016, 3:24:56 PM1/2/16
to easy-app...@googlegroups.com
Hi, nice that you got it installed. When you have debug mode enabled you should get some logs either in the /var/www/apache2/error.log (fatal) or in the /application/logs directory of easyappointments. 

I've opened your installation link and I see that you have major configuration issues.

Font from origin 'http://#############.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.###########.com' is therefore not allowed access.

These are server configuration issues and I cannot help you unfortunately.

--- EDIT #1: Once you go to backend you will be able to manage your services and providers that appear in the booking page.

--- EDIT #2: From now on you will always need to include the "index.php" in your URLs.

PS: You might also want to remove the link from your previous post.

michaelj...@gmail.com

unread,
Jan 2, 2016, 3:38:51 PM1/2/16
to Easy!Appointments - Support Group
Thanks Alex. The link in my last post was not correct. The correct link is here so you can see the error that I am getting:

http://www.multimedia.xienna.co.uk/easyappointments/

I see the log directory but there are no errors recorded there.

Yes I can see how to add a service but not to add a provider.

Alex Tselegidis

unread,
Jan 2, 2016, 3:41:35 PM1/2/16
to Easy!Appointments - Support Group
1) I still get similar errors in the console: 

http://multimedia.xienna.co.uk/easyappointments/index.php/appointments/ajax_get_available_hours Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Check your Apache error log, you will surely find some error info there. Could be possibly a permissions issue or something similar.

2) Go to index.php/backend/users and select the providers tab. 


michaelj...@gmail.com

unread,
Jan 3, 2016, 3:23:16 PM1/3/16
to Easy!Appointments - Support Group
Hi Alex.

1. Yes I get the 500 error too. The thing is, when I log into the backend and then logout again, then select book an appointment from the logout page, everything works fine with no 500 error. I only get the error when I try to book an appointment by going to the /easyappointment URL directly. What is the difference? Whatever the difference, that is what is causing the error.

2. Sorry, I missed the other tabs on the User page. All fine now.

Thanks.

Alex Tselegidis

unread,
Jan 4, 2016, 4:19:21 PM1/4/16
to Easy!Appointments - Support Group
I cannot really tell without seeing an error message. When you have a 500 Internal Server Error you must check the apache logs. Enable the debug mode from the config.php file and try the app again. If you see this 500 error check the apache error logs and post your findings here.

michaelj...@gmail.com

unread,
Jan 5, 2016, 1:19:56 PM1/5/16
to Easy!Appointments - Support Group
Alex, I have narrowed down the problem to the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://multimedia.xienna.co.uk/easyappointments/index.php/appointments/ajax_get_available_hours. This can be fixed by moving the resource to the same domain or enabling CORS.

"AJAX Failure Handler:" Object { readyState: 0, getResponseHeader: .ajax/v.getResponseHeader(), getAllResponseHeaders: .ajax/v.getAllResponseHeaders(), setRequestHeader: .ajax/v.setRequestHeader(), overrideMimeType: .ajax/v.overrideMimeType(), statusCode: .ajax/v.statusCode(), abort: .ajax/v.abort(), state: .Deferred/d.state(), always: .Deferred/d.always(), then: .Deferred/d.then(), 11 more… } "error" "" general_functions.js:353

This does not occur when booking an appointment from the backend logout page.

Alex Tselegidis

unread,
Jan 5, 2016, 4:42:48 PM1/5/16
to Easy!Appointments - Support Group
Hi

I've just visisited your installation and seems to work fine. Have you managed to fix it finally? 

If yes would you mind sharing it with the community?

michaelj...@gmail.com

unread,
Jan 6, 2016, 9:42:10 AM1/6/16
to Easy!Appointments - Support Group
Not yet Alex. I am still getting this error which is showing itself in the apache logs as a 500. I thought that you were getting the same error, so I am not sure why you are not getting it now?

See my last post for what I believe is the root of the error. I am trying to resolve it now.


eaissue.jpg

michaelj...@gmail.com

unread,
Jan 6, 2016, 10:09:24 AM1/6/16
to Easy!Appointments - Support Group
I have fixed the CORS issue by adding the following to an htaccess file in the root directory of my ea folder.

Header set Access-Control-Allow-Origin "*"

There still remains the AJAX error. When I click Details on the error I get


AJAX Error: error

I still cant work out why it doesnt happen if I book appointment from the backend logout page.

Alex Tselegidis

unread,
Jan 6, 2016, 2:54:30 PM1/6/16
to Easy!Appointments - Support Group
This is strange, I am opening this URL http://multimedia.xienna.co.uk/easyappointments/index.php/appointments and it works fine. Is this the correct installation?

Also try reading the "Installing E!A on Subdomain Won't Load Appointment Hours" section of the group's FAQ thread. 

michaelj...@gmail.com

unread,
Jan 8, 2016, 6:32:21 AM1/8/16
to Easy!Appointments - Support Group
Alex that is the right installation. All fixed now.

I had already read the subdomain info and all is correct there. After you told me you had no longer got a 500 server error, I contacted my host who confirmed that the 500 error was no longer a problem. I believe I fixed that by enabling CORS as explained in my last post here. I tried a different browser (Opera) and Voila, all OK. This led me to assume that the local AJAX error was a problem with my browser (Firefox).I therefore updated it and now all OK with both browsers (and yours too).

So, for the benefit of others with the same problem, here are the steps I took to get the 1.1 installation going.

1. Install the BETA version 1.1 (the following refer to version 1.1 setup)

2. Configure the config.php file in the installation root, taking care with trailing slashes and any subdomains for your base URL of your installation. For example: 'http://multimedia.xienna.co.uk/easyappointments'. Make sure you use the database prefix as per your SQL credentials, eg

    const DB_HOST       = 'localhost';   
    const DB_NAME       = '1234_easyappointments';
    const DB_USERNAME   = '1234_harry';
    const DB_PASSWORD   = 'sally';

3. Change $db['default']['pconnect'] from TRUE to FALSE in the database.php file in application/config although this made no difference to me.

4. Create a .htaccess file in the root of your installation containing the single line:

Header set Access-Control-Allow-Origin "*"

This enables CORS (Cross Origin Requests). See here for more info http://dev.nuclearrooster.com/2011/01/03/cors-with-apache-mod_headers-and-htaccess/

5. Make sure you use index.php in the URL to access your backend. eg http://multimedia.xienna.co.uk/easyappointments/index.php/user/login. Also in the URL for the book appointments page eg http://multimedia.xienna.co.uk/easyappointments/index.php/appointments although this works for me http://multimedia.xienna.co.uk/easyappointments maybe because I have CORS enabled?

6 Update your browser.

Hope that helps. Thanks Craig and Alex for all your help.

Alex Tselegidis

unread,
Jan 8, 2016, 3:11:04 PM1/8/16
to Easy!Appointments - Support Group
I'm glad you got it working!

I have to advice you though that disabling CORS might be a possible security hole. Maybe it's just possible to achieve the same result with another way.

Also take a look at this post

http://stackoverflow.com/questions/12143906/cors-enabled-in-apache-but-ajax-not-working-chrome-says-origin-not-allowed

michaelj...@gmail.com

unread,
Jan 9, 2016, 5:17:59 AM1/9/16
to Easy!Appointments - Support Group
Alex, I have enabled CORS not disabled it as you state in your post.

Alex Tselegidis

unread,
Jan 9, 2016, 6:24:33 AM1/9/16
to Easy!Appointments - Support Group
Oh yeah you're right!  

I post it that yesterday after work, must have been dizzy :P 

Anyway, have a nice day :)
Reply all
Reply to author
Forward
0 new messages