LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-11-2009, 07:09 AM   #31
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040

OK, if php does not want to show errors on screen, let's try to see if it saves them in a logfile. Use the following in php.ini
Code:
display_errors = Off
log_errors = On
error_log = "/tmp/error.log"
 
Old 11-11-2009, 07:43 AM   #32
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
The file error.log does not get created so I assume no errors are being sent to it.

After deleting chunks of data from index.php I start to get some information displayed including some errors (but errors due to some content missing).

I've tried two PHP web applications so far, I'll try a third.
 
Old 11-11-2009, 07:50 AM   #33
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Don't delete content. Just add some echo '1'; echo '2'; etc, in various parts of the problematic php page to see where it stops parsing.
 
Old 11-11-2009, 07:57 AM   #34
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Thanks that's a very useful suggestion!

This seems to be where the problem is on one of the applications (5 is shown but 6 is not). I'll do the same with the other application to see if it's something similar.

echo 5;
//load the settings...
load_settings();
if($_REQUEST['action'] == 'book' || $_REQUEST['action'] == 'delbook')
{
$actions[$_REQUEST['action']]();
}
else
{
sitehead();
$actions[$_REQUEST['action']]();
sitefoot();
}
echo 6;
 
Old 11-11-2009, 08:49 AM   #35
WhisperiN
Member
 
Registered: Jun 2009
Location: Middle East
Distribution: Slackware 13.1, CentOS 5.5
Posts: 137

Rep: Reputation: 17
Quote:
Originally Posted by bathory View Post
Don't delete content. Just add some echo '1'; echo '2'; etc, in various parts of the problematic php page to see where it stops parsing.
I agree, it's a one hell of a suggestion.. amazing
 
Old 11-12-2009, 02:20 AM   #36
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
On the other system it breaks here (end of file):

echo 8;
/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
echo 9;
?>
 
Old 11-12-2009, 02:45 AM   #37
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
I'm not a php programmer, but i think that the arguments of a function must be included in parenthesis, like require_once(BASEPATH.'codeigniter/CodeIgniter'.EXT);

Can you by any chance tell us what is this app to see if it works on a completely different system.
 
Old 11-12-2009, 03:31 AM   #38
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
OK I'll give that a go. This one is CRBS (www.classroombookings.com).
 
Old 11-12-2009, 03:59 AM   #39
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by jsteel View Post
OK I'll give that a go. This one is CRBS (www.classroombookings.com).
Just to let you know, once I set up the mysql datbase it worked fine for me on Debian unstable.

I'm using:

libapache2-mod-php5 5.2.11.dfsg.1-1
apache 2.2.14-2

Evo2.
 
Old 11-12-2009, 04:46 AM   #40
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,173
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
It doesn't work here (Slackware with apache 2.2.14, php-5.3.0 both compiled from source)
As you can see from the attachment, apart from the magic_quotes error, the rewrite points to a non existing URL (index.php/install)
Attached Thumbnails
Click image for larger version

Name:	crbs.png
Views:	42
Size:	2.3 KB
ID:	1936  
 
Old 11-18-2009, 03:51 AM   #41
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by evo2 View Post
Just to let you know, once I set up the mysql datbase it worked fine for me on Debian unstable.
I tried Debian Unstable and I have the same issue as before. Maybe you could let me know what steps you took to get it working?

I followed the steps here: http://code.google.com/p/classroombo...tallationLinux

I've tried skipping the step to create a crbs mysql user and just use the root mysql user to connect. I create a database in mysql.

I do the chmod'ing and edit the config.php and database.php files as requested.

I've tried the .htaccess bit, but it doesn't matter if I follow the steps or not; I get the same problem.

If this is exactly what you did to get it working, maybe you could let me know what packages you have installed on your Debian Unstable computer; maybe I'm missing something (or have something) that's messing this up.

Thanks
 
Old 11-18-2009, 06:52 AM   #42
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
I also set
$config['index_page'] = 'index.php';

/var/www/crbs/system/application/config/config.php

and set
Code:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'www';
$db['default']['password'] = 'foobar';
$db['default']['database'] = 'crbs';
in
/var/www/crbs/system/application/config/database.php

I've attached the output of the following command
Code:
echo "select * from user where user='www'" | mysql mysql >user.mysql
So you can see the mysql users permissions.

I've also attached a slightly edited version of the output of
Code:
dpkg -l > pacakges.txt
There is still a bunch unrelated packages in packages.txt... but it was more effort to be sure I was not removing lines that may somehow be relevant. Please note that I had to gzip packages.txt to make it small enough to upload, and I had to rename it with an extension that the forum would accept.

HTH.

Evo2.
Attached Files
File Type: txt user.txt (612 Bytes, 14 views)
File Type: txt gzipped_packages.txt (80.3 KB, 12 views)
 
Old 11-18-2009, 12:46 PM   #43
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Thank you for this information. It turns out I didn't have php5-mysql installed; php5 and mysql were installed but not this package. After I installed it everything is working perfectly. Thank you very much!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP pages are displayed as blank pages Hirszu Linux - Software 6 03-03-2008 12:09 AM
installed php and apache yet my php pages dont load ?? jessica_lilly Linux - Software 1 11-13-2007 01:57 AM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski SUSE / openSUSE 1 01-18-2006 06:12 PM
can't view php pages allan_y Linux - Software 2 07-23-2004 11:48 PM
[PHP] How do I view PHP pages?? vbp6us Linux - General 4 04-16-2003 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration