unable to get c0ommand line/any OTHER way?

A place to discuss development of the Xataface core.

Postby shannah » Wed Jul 09, 2008 6:07 pm

A lot to comment on there. One thing to keep in mind is that you don't need a dedicated server to get command line access. Most good web hosts provide command line access (so you would be able to run the auto install). I steer clear of the FTP only hosts because they really limit productivity.

There are plenty of hosting options to choose from, but one such is
Westhost
which can provide you with full command line access (a virtual private server) for $10/mo or even less.

That said, Xataface should work fine on an FTP only host. If you're now getting a db error, that likely means that your db connection information in the conf.ini file is incorrect.

One thing that occurs to me that may be helpful for you is to use the web based xataface installation tool. This is new in the latest version and still experimental so there is no documentation on the site for it. However you can access this tool at
http://yourdomain.com/path/to/xataface/installer.php
You will need to use your database username and password to access the tool.

Essentially this tool will generate the files for you with the correct paths for you to download as a tar.gz archive. You can then upload these files anywhere on your server to get you started.

-STeve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby PapaLion » Fri Jul 11, 2008 8:09 am

installer yields a line 211 error as found in other forums reuqiring mods on some internal files.

I cannot wrap my mind around where exactly my folder fo revised site_structure files go so it reaches and runs the api file? If I place them /mysite/directory/A to reach this dataface-public-api file. Then... directing the path to >api file & attempted opening result in an error msg that I have not described the path correctly on line 12, also generates a second error, > fatal error for line 14, i.e. cannot open the line 12 instructions, so the program cannot find line 14. The api is in folder A the line 14 file is in folder B /mysite/directory/B.
I have tried stacking them, B inside of A, parallel placement, A on same level as B, higher directory for each, B on root/B etc and redirecting on line 12...I tried moving this api file inside the folder for my site_structure files, mysite/.directory/B/api... nah that is worse. ad nauseum... my conclusion might just be ya can't get there from here. I am on the wrong freeway.
PapaLion
 
Posts: 15
Joined: Sun May 25, 2008 5:59 pm
Location: Arizona

Postby PapaLion » Fri Jul 11, 2008 8:24 am

better probably to just show the error msgs...

test is Folder B
AYDbase is folder A

Warning: require_once(/Yumanity/test/dataface-public-api.php) [function.require-once]: failed to open stream: No such file or directory in /home/almost8/public_html/Yumanity/AYDbase/index.php on line 12

yet there is a path from / to index.php inside my revised site_structure folder, AYDbase.

Fatal error: require_once() [function.require]: Failed opening required '/Yumanity/test/dataface-public-api.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/almost8/public_html/Yumanity/AYDbase/index.php on line 12

meanwhile ~test~ folder B contains api file which cannot sit inside the AYDbase folder A and inside test folder B at the same time?
PapaLion
 
Posts: 15
Joined: Sun May 25, 2008 5:59 pm
Location: Arizona

improvement >files installed

Postby PapaLion » Fri Jul 11, 2008 10:13 am

sorry 2 keep posting, a small breakthru via the installer... it decided to allow a make of the three site files inside a new directory it built called almost8_XataDbase1... a variant of B unique to shared servers I expect adding a preID_to the Dbase name. sheesh!
Ok, I think? that is very good:) the conf.ini file is probably not correct yet, it will not yield the index.php when I point to the URL... simple 404 error.
so? my ??? would be here>>> choices for host Id become important next?

a. "localhost" no
b. "almostyuman.com" with or without some hashes to get it there?

c. host could be the site itself http://www.mysite.com
d. ? dunno?

happily it has the correct Dbase ID

user name/pw gets hairy because of ads via shared server I'll have to try a few.
PapaLion
 
Posts: 15
Joined: Sun May 25, 2008 5:59 pm
Location: Arizona

Postby shannah » Fri Jul 11, 2008 10:45 am

Wow. This is painful to watch from this vantage point. First I shall attack the
Warning: require_once(/Yumanity/test/dataface-public-api.php) [function.require-once]: failed to open stream: No such file or directory in

errors.

This error means that you have the wrong path (i.e. the file /Yumanity/test/dataface-public-api.php does not exist). Indeed this path looks unlikely to exist because your Yumanity folder likely resides inside a parent folder like /home/xyz/.. etc..

If you want to find the definitive path, you can log in via command line FTP and issue the command 'pwd'.

Here is a small readout of me logging into an FTP server and findout out the path to my home directory:
Code: Select all
stevepbook:~ shannah$ ftp css.css.sfu.ca
Connected to css.css.sfu.ca.
220 css FTP server (SunOS 5.8) ready.
Name (css.css.sfu.ca:shannah): shannah
331 Password required for shannah.
Password:
230 User shannah logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
Remote directory: /home/fas/shannah
ftp>



Trying random permutations of paths will get you frustrated and likely result in no success.

Setting up Xataface is trivial if you have a grasp of
a. The directory structure of your server.
b. Your server's MySQL Login details.

I suggest trying a couple of exercises first to get you familiar with these things.

Exercise 1: Include one PHP file in another.

Steps:
Create a directory somewhere on your server called 'helloworld'.
Create a file within helloworld called 'hello.php' with the contents.
Code: Select all
<?php
echo 'Hello world';


Create another directory somewhere else on your server called 'hellopages'.
Create a file within hellopages called index.php with the following contents:
Code: Select all
<?php
require_once '/path/to/helloworld/hello.php';

Where '/path/to/helloworld' is the absolute path to your helloworld folder on your server.

Then point your web browser to http://yourdomain.com/path/to/hellopages/index.php

(i.e. the URL to your hellopages page).

Note that the /path/to/hellopages path in this url is relative to your document root, whereas the '/path/to/helloworld' from the index.php file is an absolute path from the root of your file system.

If everything works then you should see "hello world". Otherwise you'll get an error.

If you get an error, that means you have the path wrong in your index.php file. One tool you can use to find the correct path is to call the phpinfo() function in your PHP file and then load the page. This will show you all of the environment information.

e.g. Create a file named phpinfo.php with the contents:
Code: Select all
<?php
phpinfo();


Then load the page in your web browser. The Document Root setting will show you the path to your web server's document root. Likely all other files you have placed on your server are relative to this value.


Do not proceed until you can get this exercise working because any attempts to get any other scripts working will be futile unless you can master this exercise.

Exercise 2: Database connection

In this exercise you will create a database on your web server and try to connect to it.

Steps:
1. Create a new database using whatever database tools your host provides, named 'helloworld'.
2. Create a file on your web server called 'hellodb.php' with the following contents:
Code: Select all
<?php
$db = mysql_connect('HOST', 'USERNAME', 'PASSWORD');
if ( !$db ) die("Failed to connect to database: ".mysql_error());

$res = mysql_select_db('helloworld', $db);
if ( !$res ) die("Failed to select database: ".mysql_error());

echo "Connected successfully!";

But replace 'HOST' with the host name of your database (usually 'localhost', but may be different - check instructions from your web host for the proper host name); And replace USERNAME and PASSWORD with the username and password that you have been supplied with to connect to the MySQL server (it should say this somewhere in your web host information).

Step 2: Point your web browser to this page (hellodb.php). If you receive an error, note the error and try to make changes accordingly until you see the text "Connected successfully" on the screen.

Once you have successfully completed these two exercises you are ready to proceed to creating a xataface application. If you cannot master these two exercises then attempts to create a xataface application will be futile.

Best regards

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby PapaLion » Fri Jul 11, 2008 6:28 pm

sheesh, homework for the weekend... well, since I am getting very low D in Xataface tweaking/install this week it is very appropriate... I will do the exercises till they work well for me and clear my fog... I do appreciate the help and I will persist till it flies nicely.
enjoy,
Bret
PapaLion
 
Posts: 15
Joined: Sun May 25, 2008 5:59 pm
Location: Arizona

Previous

Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 17 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved