Application page coming up blank on new install

A place for users and developers of the Xataface to discuss and receive support.

Postby walterbyrd » Thu Oct 04, 2007 1:47 pm

I'm working on an app for an HOA. I got everything working my desktop PC. Then I got everything working on my own website, so I could show the other hoa people.

Finally, I am trying to get everything working on the actual HOA site. I have setup dataface, and the app, a few times before, so I thought I knew what I was doing.

The dataface, and the application directories are parallel:

/dataface
/hoadb

I set all permissions with chmod -R 777 * for both directories.

I used makesite from the dataface directory, and everything seemed to go smoothly.

I went to mydomain.org/dataface/dataface_info.php and dataface seems to be correctly installed.

But, when I go to mydomain.org/hoadb - I get a blank page. I checked the conf.ini file, and everything seems to be correct.

I tried: ls -l /var/www/html/dataface/dataface-public-api.php

and got

-rwxrwxrwx 1 hoaweb hoaweb 9790 May 10 15:08 /var/www/html/dataface/dataface-public-api.ph


My only guess is that this is some sort of .htaccess thing. But, I can not seem to find an .htaccess file.

Can anybody suggest some further testing that I could do to isolate the problem?
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Fri Oct 05, 2007 11:28 am

Hi Walter,

First thing:

You probably don't want to set the permissions on all of the directories to 777. Just the templates_c directories.
In fact, this could be the source of your problem. Some servers are set to not serve PHP files from directories with 777 permissions for security reasons (they're worried that an outside party might upload a malicious PHP file and try to execute it).

Permissions should be:
755 On directories
644 On all files
777 on the templates_c directories (i.e. dataface/Dataface/templates_c and hoadb/templates_c if it exists).

If that doesn't fix the problem, check your error log to see what is going wrong.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sat Oct 06, 2007 6:27 pm

I set all of the permissions, just as you specified, but I still get a blank page. Not even an error message. It acts like it's loading something, but I just get a blank.

I trid putting an info.php program ( ) in the hoadb directory, and that worked fine.

I also recreating problems on my desktop, but on my desktop, I at least get error messages.
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sat Oct 06, 2007 6:50 pm

When I try to install, I get these warnings:

--
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/domxml.so' - libgpg-error.so.0: cannot open shared object file: No such file or directory in Unknown on line 0
Content-type: text/html
X-Powered-By: PHP/4.3.11



Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/dataface/makesite on line 273

--

Also, I have tried to bring up the app with windows msie6, as well as linux iceweasle (firefox) 2.0.0.6.

I am fairly certain I have the hoadb/conf.ini correct. The parameters reflect what I use to get into the database from the CLi with mysql -u user -p passwd -h host -D database.
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sat Oct 06, 2007 10:52 pm

This is all very strange. makesite doesn't use any domxml function so it has nothing to do with the domxml.so error you're receiving.

Please check your web server error log. That will tell you what the problem is.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sun Oct 07, 2007 4:38 pm

These are the errors I'm seeing - over and over - in the log file.

PHP Warning: main(): Unable to access /var/www/html/dataface/dataface-public-api.php in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12


Warning: main(/var/www/html/dataface/dataface-public-api.php): failed to open stream: No such file or directory in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12

PHP Fatal error: main(): Failed opening required '/var/www/html/dataface/dataface-public-api.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sun Oct 07, 2007 5:00 pm

The file is there:

$ ls -l /var/www/html/dataface/dataface-public-api.php
-rw-r--r-- 1 hoaweb hoaweb 9790 May 10 15:08 /var/www/html/dataface/dataface-public-api.php

Also, I think these are my errors, although one does not specifically say "dataface" or "hoadb"

[error] File does not exist: /home/virtual/site85/fst/var/www/html/hoadb/index
[error] File does not exist: /home/virtual/site85/fst/var/www/html/favicon.ico

$ ls -l /var/www/html/hoadb/index
ls: /var/www/html/hoadb/index: No such file or directory

$ ls -l /var/www/html/hoadb/index.php
-rw-r--r-- 1 hoaweb hoaweb 654 Oct 6 18:38 /var/www/html/hoadb/index.php

$ ls -l /var/www/html/favicon.ico
ls: /var/www/html/favicon.ico: No such file or directory

Although it was posted that all the files should have permissions 644, I wonder if the .php files should be set to 755? In any case, I had all the files set to 777, and it still wouldn't work.
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Oct 08, 2007 9:51 am

What does your index.php file look like?
also
Try pointing your browser to the dataface_info.php file and see what happens?

If it cannot access dataface-public-api.php, there are 2 possibilities:
1. It doesn't have permission.
2. It is trying to access it at the wrong path.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Mon Oct 08, 2007 5:41 pm

Here is the hoadb/index.php file:

---
$time = microtime(true);
// use the timer to time how long it takes to generate a page
require_once '/var/www/html/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, '/var/www/html/dataface');
// initialize the site

$app =& Dataface_Application::getInstance();
// get an application instance and perform initialization
$app->display();
// display the application
---

$ ls -l /var/www/html/dataface/dataface-public-api.php
-rw-r--r-- 1 hoaweb hoaweb 9790 May 10 15:08 /var/www/html/dataface/dataface-public-api.php

$ ls -ld /var/www/html/dataface/
drwxr-xr-x 14 hoaweb hoaweb 4096 Oct 4 13:34 /var/www/html/dataface/


From within the dataface directory:
$ pwd
/home/hoaweb/mainwebsite_html/dataface

So, obviously, it's a link.

$ ls -ld /home/hoaweb/mainwebsite_html
lrwxrwxrwx 1 hoaweb hoaweb 18 May 4 2005 /home/hoaweb/mainwebsite_html -> ../../var/www/html
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Mon Oct 08, 2007 5:48 pm

The mysite.com/dataface/dataface_info.php output:

---
Dataface 0.7.1
Installed at /dataface

Installation status INSTALLED CORRECTLY
Templates Dir /home/virtual/site85/fst/var/www/html/dataface/Dataface/templates
Templates Compile Dir /home/virtual/site85/fst/var/www/html/dataface/Dataface/templates_c
---
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Oct 09, 2007 8:56 am

Try changing:
Code: Select all
require_once '/var/www/html/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, '/var/www/html/dataface');


to
Code: Select all
require_once '/home/hoaweb/mainwebsite_html/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, '/dataface');


(Note that the '/dataface' in the df_init() method should be the URL, not the path. This can be relative or absolute.
e.g. /var/www/.../dataface would be a path and /dataface would be a url).

If that doesn't work try:

Code: Select all
require_once 'home/virtual/site85/fst/var/www/html/dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, '/dataface');


-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sat Oct 13, 2007 5:11 pm

Thank you for your trouble. I followed your instructions. But, I got the same results.

I have installed dataface on two other shared hosting sites, and I did not have this kind of trouble.

PHP Warning: main(): Unable to access /home/hoaweb/mainwebsite_html/dataface/dataface-public-api.php in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12

PHP Warning: main(/home/hoaweb/mainwebsite_html/dataface/dataface-public-api.php): failed to open stream: No such file or directory in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12

PHP Fatal error: main(): Failed opening required '/home/hoaweb/mainwebsite_html/dataface/dataface-public-api.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12

PHP Fatal error: main(): Failed opening required 'home/virtual/site85/fst/var/www/html/dataface/dataface-public-api.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site85/fst/var/www/html/hoadb/index.php on line 12
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sat Oct 13, 2007 10:05 pm

There was an error in my suggestion on the final path
home/virtual/site85/fst/var/www/html/dataface/dataface-public-api.php
should have been
/home/virtual/site85/fst/var/www/html/dataface/dataface-public-api.php

Note the slash at the beginning.

If that fails, you can still try a relative path:
i.e.
require_once '../dataface/dataface-public-api.php';

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby walterbyrd » Sun Oct 14, 2007 7:13 am

That made a difference. I am not getting a blank page any more. Now I am getting a slew of errors. Actually, I think that is some progress.

---

Warning: mkdir(): SAFE MODE Restriction in effect. The script whose uid is 592 is not allowed to access /var/lib/php/session owned by uid 48 in /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php on line 556

Warning: ini_set(): SAFE MODE Restriction in effect. The script whose uid is 592 is not allowed to access /var/lib/php/session owned by uid 48 in /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php on line 557

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php:556) in /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php on line 559

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php:556) in /home/virtual/site85/fst/var/www/html/dataface/Dataface/Application.php on line 559

Warning: Smarty error: problem writing temporary file '/home/virtual/site85/fst/var/www/html/dataface/Dataface/templates_c/dataface/wrt471223460eb81' in /home/virtual/site85/fst/var/www/html/dataface/lib/Smarty/Smarty.class.php on line 1088

Warning: fetch(): Unable to access /home/virtual/site85/fst/var/www/html/dataface/Dataface/templates_c/dataface/%%E4^E4B^E4B41A3D%%Dataface_List_View.html.php in /home/virtual/site85/fst/var/www/html/dataface/lib/Smarty/Smarty.class.php on line 1251

Warning: fetch(/home/virtual/site85/fst/var/www/html/dataface/Dataface/templates_c/dataface/%%E4^E4B^E4B41A3D%%Dataface_List_View.html.php): failed to open stream: No such file or directory in /home/virtual/site85/fst/var/www/html/dataface/lib/Smarty/Smarty.class.php on line 1251

Warning: fetch(): Failed opening '/home/virtual/site85/fst/var/www/html/dataface/Dataface/templates_c/dataface/%%E4^E4B^E4B41A3D%%Dataface_List_View.html.php' for inclusion (include_path='.:/home/virtual/site85/fst/var/www/html/dataface:/home/virtual/site85/fst/var/www/html/dataface/lib:/php/includes:/usr/share/php') in /home/virtual/site85/fst/var/www/html/dataface/lib/Smarty/Smarty.class.php on line 1251
walterbyrd
 
Posts: 56
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sun Oct 14, 2007 3:16 pm

OK.. safe mode... I haven't used a safe mode server in years... but Dataface has trouble with them because it creates subdirectories in the templates_c directory and in the session directory to store its files. I think there are a total of 3 or 4 directores that need to be created writable by the web server. If possible it is best not to use this server.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Next

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 36 guests

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