Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8245
Activity
Accessing the id field using simpleauth
get_id() returns information about the loaded Auth drivers. Use Auth::get_user_id(). Note that that will return an array structure as well, as Auth supports multiple drivers, and you can be logged in using more then one (each having their own '…
Comment by
WanWizard
February 2012
permalink
Model Propery Default Value
Moved to the ORM forum.
Comment by
WanWizard
February 2012
permalink
SQLite
There's a new database layer in the making that will solve platform support issues. The current layer is very MySQL centric, which causes these kind of issues. For the DSN, the driver will split it into the variables needed for PDO to connect …
Comment by
WanWizard
February 2012
permalink
Getting a user name from a user ID
As to your first question: I'm not familiar with Phil's tutorial, but if he's using the ORM, you can add the related field to the original comment query. If it's Model_Crud, a separate query is needed as that doesn't suppor…
Comment by
WanWizard
February 2012
permalink
How do you develop FuelPHP?
It is the main reason (or at least of of the important ones) for using submodules and seperate repo's. So you can commit something to fuel/core without being worried about anything in app. I do all my testing in a separate virtual host install…
Comment by
WanWizard
February 2012
permalink
oil generate model generates empty migrations
I think you are using the 1.1 release, correct? Quite a few bug were fixed after that, perhaps you should switch to 1.1/develop if you don't want to wait for the 1.2 release.
Comment by
WanWizard
February 2012
permalink
Error - Call to undefined function
Ok. So PDO is loaded, but mysql/mysqli isn't. So you'll have to figure out why it is when you run php through apache, but not from the commandline. Perhaps this is something specific of your xAMP stack, maybe you can ask the question ther…
Comment by
WanWizard
February 2012
permalink
$_FILES validation?
You get this validation error because, as I wrote before, a 'file' input field isn't part of the form data. So validation will give you the error because the field is missing from $_POST. Validation is on the roadmap for 2.0 to be re…
Comment by
WanWizard
June 2011
permalink
Unit test
Yes, in exactly the same way, so in app/tests. Note that if you have altered the default FuelPHP file structure, you might have to change bits in core/bootstrap_phpunit.php and core/phpunit.xml to reflect your changes.
Comment by
WanWizard
February 2012
permalink
Error - Call to undefined function
and is that the same one as you apache install is using? if you do 'php -m', does it list the mysql and mysqli modules? And PDO if you want to use the pdo drivers?
Comment by
WanWizard
February 2012
permalink
Error - Call to undefined function
So check which php-cli binary is used when you use oil, and check if that binary is the same version and uses the same php.ini as apache does. Because the message is very clear: the mysql extension hasn't been loaded. I'm not familiar wit…
Comment by
WanWizard
February 2012
permalink
Error - Call to undefined function
Assuming that your php installation does work for your websites (i.e. you do have a mysql connection there), the most common cause is that the CLI version of PHP uses a different php.ini, or you have multiple PHP installations and oil uses the wron…
Comment by
WanWizard
February 2012
permalink
[Q] Integrating Doctrine ORM into Fuel
Is should be fairly straitforward to create a doctrine package. FuelPHP's autoloader supports the PSR-0 namespace, so I don't expect any major issues there.
Comment by
WanWizard
February 2012
permalink
Modules and Fuel\Core namespace
Well, for starters it negates the use of namespaces, which are there for a reason.
Comment by
WanWizard
February 2012
permalink
Image manipulation on upload
Add a feature request at http://github.com/fuel/core/issues, and see if someone is willing to pick it up. Otherwise, fork the repo, make the changes yourself, and send a pull request.
Comment by
WanWizard
February 2012
permalink
Image manipulation on upload
You get the name and the mimetype from the Upload class, so you can use that to rename. I still believe it's not the task of the Upload class to deal with this, I might want files without extensions in my application, and the feature you'…
Comment by
WanWizard
February 2012
permalink
Image manipulation on upload
If it is only about extension, why not simply rename the file? See http://docs.fuelphp.com/classes/file/usage.html#/method_rename.
Comment by
WanWizard
February 2012
permalink
How to make profile_fields
This has nothing to do with examples, nor with FuelPHP. This is about basic PHP skills. If you can't create an HTML form, if you don't know how to get submited data and how to manipulate that, I would like to suggest you study on that fir…
Comment by
WanWizard
February 2012
permalink
How to make profile_fields
Yes, I understand. So write the code for it. Scaffolding is not going to generate custom code for you, it only generates basic crud style code.
Comment by
WanWizard
February 2012
permalink
How to make profile_fields
Scaffolding just generates the basic structure, you will have to code the rest yourself.
Comment by
WanWizard
February 2012
permalink
$_FILES validation?
In PHP uploaded files are not part of the form data, so the validation class doesn't have any info on the form field.
Comment by
WanWizard
June 2011
permalink
Models in Modules subfolder
A class called Model_Page_Redirect should be in modules/frontend/classes/model/page/redirect.php.
Comment by
WanWizard
February 2012
permalink
Assets - What is the query string at the end of the src?
It's the timestamp of the asset. Caching mechanisms take the entire URI into account. This means that your asset will be cached by the browser until you modify the asset. That will cause the timestamp to change, upon which the browser will fet…
Comment by
WanWizard
February 2012
permalink
No Views visible?
Have you checked the view to see if something was actually generated? If you see a title and a footer, at least something is being send to the browser.
Comment by
WanWizard
February 2012
permalink
How are most people handling settings that automatically change in accordance with the environment?
You either use the SetEnv command in your webserver's virtual host definition, or use can use an environment variable on the server. I have also seen people adding code to the index.php that check hostname or server IP, and set $_SERVER based …
Comment by
WanWizard
February 2012
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,413
Last Active
4:42PM
Roles
Administrator