This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Day 2 / Fatal error Class 'QuestionPeer' not found

Discussion around this tutorial for symfony 1.0.x

Day 2 / Fatal error Class 'QuestionPeer' not found

by balazs » Wed May 31, 2006 6:01 pm

Hello,

as I absolved day 2, wanted to see the result in browser but I became following error messsage on this adress:
http://localhost/symfony/cr/web/frontend_dev.php/question

Code: Select all
Warning: Illegal offset type in isset or empty in C:\xampp\xampp\php\pear\symfony\vendor\propel\adapter\DBAdapter.php on line 74

Fatal error: Class 'QuestionPeer' not found in C:\xampp\xampp\htdocs\symfony\cr\apps\frontend\modules\question\actions\actions.class.php on line 25


Thanks for answering

Regards
balazs
Member
 
Posts: 43
Joined: Fri May 12, 2006 4:14 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by dzejkej » Wed May 31, 2006 6:11 pm

Did you run
Code: Select all
symfony propel-build-model


?
dzejkej is closed-source SVK human product

lazy man for professional web tools
dzejkej
Member
 
Posts: 64
Joined: Thu May 25, 2006 2:50 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by balazs » Wed May 31, 2006 6:13 pm

yes, of course
balazs
Member
 
Posts: 43
Joined: Fri May 12, 2006 4:14 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by balazs » Thu Jun 01, 2006 11:03 am

Has nobody an idea? :(~ :-(~ :sad: :(~ :-(~ :sad: :(~ :-(~ :sad:
balazs
Member
 
Posts: 43
Joined: Fri May 12, 2006 4:14 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by cdavid » Thu Jun 01, 2006 1:32 pm

hi,

I had trouble with not found classes, too. But only when using symfony as PEAR package. Have a XAMPP for Windows too. It seems, that the problem is a wrong/incomplete PATH value. Especially on command line it is fairly incomplete.

So, first I set the environment variables of my sytem to explicitly include the xampp/php/mysql/apache/pear pathes.

In addition I changed the config.php of my app:

The following worked for me (in apps/yourapp/config/config.php):

Code: Select all
// include path
set_include_path(
"..".PATH_SEPARATOR. // add this line
sfConfig::get('sf_lib_dir').PATH_SEPARATOR.
sfConfig::get('sf_app_lib_dir').PATH_SEPARATOR.
sfConfig::get('sf_symfony_lib_dir').DIRECTORY_SEPARATOR.'vendor'.PATH_SEPARATOR.
get_include_path()
);


This inserts the root of your project to the includes.

Worked fine for me.

HTH

Christian
cdavid
Junior Member
 
Posts: 4
Joined: Thu Jun 01, 2006 1:18 pm
Location: Berlin, Germany

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by balazs » Thu Jun 01, 2006 4:37 pm

Thanks for the answer, but it dosn't work for me.

I don't know what goes wrong.
balazs
Member
 
Posts: 43
Joined: Fri May 12, 2006 4:14 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by Mathieu69160 » Wed Jun 27, 2007 9:44 am

Hi, I have the same problem. The file QuestionPeer.php exist in askeet\lib\model.
Mathieu69160
Junior Member
 
Posts: 12
Joined: Tue Jun 26, 2007 11:32 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by Mathieu69160 » Wed Jun 27, 2007 10:02 am

In the files created by propel-build-model, there is instructions like this :

include_once 'lib/model/om/BaseQuestionPeer.php'.

This include is wrong.

It should be replace by :

include_once './BaseQuestionPeer.php'

Why the generation of these file was wrong? Is there a problem in my configuration?

Thanks a lot.
Mathieu69160
Junior Member
 
Posts: 12
Joined: Tue Jun 26, 2007 11:32 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by mmalt00 » Sat Jul 07, 2007 2:09 pm

which file did you change the include_once?

QuestionPEER works for me and I completed Day 2

but Day 5 has stalled. UserPEER not found.

perhaps your solution will resolve it.


Thanks!
mmalt00
Junior Member
 
Posts: 9
Joined: Wed Jun 27, 2007 6:32 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by mmalt00 » Sat Jul 07, 2007 3:49 pm

Christian, would you know why my config.php is so much different from yours. The contents of mine is listed below. Thanks, Marvin.

<?php

// include project configuration
include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_S EPARATOR.'config.php');

// symfony bootstraping
require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);
mmalt00
Junior Member
 
Posts: 9
Joined: Wed Jun 27, 2007 6:32 pm

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by cdavid » Sat Jul 07, 2007 6:48 pm

Hello Marvin,

sorry, didn't make anythign more with symfony than the askeet tutorial about a year ago, cause actual projects where heavily Flash based and didn't have much to do with server side programming. So I'm "out" of symfony for a while and can't even reactivate my own installation (its on a backup dvd somewhere) :oops:

I've used symfony 0.8 or 0.9 for that tutorial in last summer. So its possible, that symfony was reorganized, and so the style of the config files. So perhaps my suggestion can not work any more.

The only advise I can give is to use the sandbox package (w/o PEAR) for your first symfony project, because this one never brought me into trouble.

Christian
cdavid
Junior Member
 
Posts: 4
Joined: Thu Jun 01, 2006 1:18 pm
Location: Berlin, Germany

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by ataros » Thu Aug 14, 2008 11:26 pm

I'm having the exact same problem as the OP - any idea how I can fix this? I get the error message:

Fatal error: Class 'QuestionPeer' not found in /home/outpoker/public_html/askeet/apps/frontend/modules/ques tion/actions/actions.class.php on line 24

Thanks.

using symfony 1.0.17
ataros
Junior Member
 
Posts: 3
Joined: Wed Aug 13, 2008 8:24 am

Re: Day 2 / Fatal error Class 'QuestionPeer' not found

by ataros » Thu Aug 14, 2008 11:43 pm

Problem was that I didn't clear the cache - all is well now.
ataros
Junior Member
 
Posts: 3
Joined: Wed Aug 13, 2008 8:24 am