Yet another newbie with problems

242 views
Skip to first unread message

Marguerite

unread,
Nov 18, 2013, 4:26:20 PM11/18/13
to xata...@googlegroups.com
I had originally emailed Steve this question, but it may be lost in his spam folder. Surely someone else here can point out the simple (but not obvious to me) solution to my problem.

I'm doing my very first web site with MySql and want to put Xataface in as an interface so my site owner can enter her own data. The hosting company installed MySql and phpMyAdmin.

The object of the db and interface is to serve up information on subscribing trainers, which are currently hard-coded on the site at http://diabetesalertdogalliance.org/trainers.html, if you want the full overview. Probably not necessary to debug my problem, though.

Xataface has installed correctly (per testing), so I'm thinking my problem is in the conf.ini or the index.php--or both.

Here's my directory structure:

web [directory containing the site's index.html file and most pages]
--|FOLDER [a subdirectory of "web" where .htaccess, conf.ini, and index.php sit]
--|--|templates_c [a subdirectory of "FOLDER"]
--|--|xataface [a subdirectory of "FOLDER" where the extracted files for the latest release sit]

I must access phpMyAdmin through Hostway's site control portal or via this URL (modified a little for security):
https://something.siteprotect.com/phpMyAdmin/ (it will also work without directing to the phpMyAdmin subdirectory)

The file attributes for the xataface directory are 755. The directory templates_c is 777. (If you can suggest a more protected attribute, I will change it.)

The server is Apache; I'm working in Windows 7. FTP client is FileZilla.
-----------------------------------------------------------------------------------------------
The .htaccess file performs as designed.
------------------------------------------------------------------------------------------------
conf.ini [saved as UTF-8] [db name, pw, user redacted]
You can see my confusion about whether to use "localhost" or the url I use to log into phpMyAdmin.
I also tried "something.siteprotect.com/phpMyAdmin"

Re "name=", the actual db name is just the portion in caps, but below is test required on login via the link above.

[_database]
    host="localhost"
    ; host="something.siteprotect.com"
    name="mysql-DB-NAME.diabetesalertdogalliance.org"
    user="phpMyAdminUsername"
    password="phpMyAdminPW"

[_tables]
    ; A list of tables to include in your application's menu
    ; These tables must already exist in your database
    Trainers="Trainers"
--------------------------------------------------------------------------------------------------------
index.php:

<?php
// Include the Xataface API
require_once 'xataface/dataface-public-api.php';

df_init(__FILE__, 'http://diabetesalertdogalliance.org/FOLDER/xataface')->display();

// file does not end with ?> -- should it?
-----------------------------------------------------------------------------------------------------------
If I go straight to http://diabetesalertdogalliance.org/dada/xataface/installer.php, I'm prompted for a password that is not accepted and the prompt returns, thus:

Authentication Required
The server http://diabetesalertdogalliance.org:80 requires
username and password. The server says: Dataface Installer.

-------------------------------------------------------------------------------------------------------------
No, I haven't gotten my fingers into php.ini to set up debugging. I'm a little bit afraid to get that far under the hood. Not sure where it is, anyway.

I deeply appreciate any help you can offer!

Marguerite
--

 Gettysburg, PA

Steve Hannah

unread,
Nov 18, 2013, 5:12:54 PM11/18/13
to Marguerite, xata...@googlegroups.com
http://diabetesalertdogalliance.org/dada/xataface/installer.php
is just the web-based installer tool.

What happens when you just point the browser to your app:

Steve
--
Steve Hannah
Web Lite Solutions Corp.

Marguerite

unread,
Nov 18, 2013, 6:28:21 PM11/18/13
to xata...@googlegroups.com, Marguerite
Just a blank screen. Sorry, I should have specified that, since that's what led me to become obsessed with the config files.

Steve Hannah

unread,
Nov 18, 2013, 6:37:06 PM11/18/13
to Marguerite, xata...@googlegroups.com
What does your error log say? 

Steve

Marguerite

unread,
Nov 18, 2013, 6:55:45 PM11/18/13
to xata...@googlegroups.com, Marguerite
Couldn't find the php.ini or error log files so added code (as you prescribe) in the index.php. It shows:

Warning: mysql_connect(): Access denied for user 'dadalliance01'@'localhost' (using password: YES) in/home/vg007web05/15/77/2017715/web/dada/xataface/Dataface/Application.php on line 576

Fatal error: Uncaught exception 'Exception' with message 'Error connecting to the database: Access denied for user 'dadalliance01'@'localhost' (using password: YES)' in /home/vg007web05/15/77/2017715/web/dada/xataface/Dataface/Application.php:579 Stack trace: #0 /home/vg007web05/15/77/2017715/web/dada/xataface/Dataface/Application.php(1048): Dataface_Application->Dataface_Application(NULL) #1 /home/vg007web05/15/77/2017715/web/dada/xataface/public-api.php(58): Dataface_Application::getInstance(NULL) #2 /home/vg007web05/15/77/2017715/web/dada/index.php(8): df_init('/home/vg007web0...', 'http://diabetes...') #3 {main} thrown in/home/vg007web05/15/77/2017715/web/dada/xataface/Dataface/Application.php on line 579

---------------------------------
So, I'm guessing "localhost" won't work. What about all the rest of it?

Marguerite

unread,
Nov 18, 2013, 7:07:48 PM11/18/13
to xata...@googlegroups.com, Marguerite
If I change from "localhost" to 'pma00.siteprotect.com', I get this error on the first line (the rest looks the same:

Warning: mysql_connect(): Can't connect to MySQL server on 'pma00.siteprotect.com' (111) in/home/vg007web05/15/77/2017715/web/dada/xataface/Dataface/Application.php on line 576

Marguerite

unread,
Nov 18, 2013, 7:23:56 PM11/18/13
to xata...@googlegroups.com
Hooray! You were right, I was wrong, and I'll never doubt your advice again. After adding the error reporting to the index.php, I finally fixed the config file so it now displays the interface. Had to change the host name and the table name, but all is well--at least for now.

Many thanks,
Marguerite


Reply all
Reply to author
Forward
0 new messages