Is it possible to set the /web directory as webroot without changing apache configuration file?
I tried using the following .htaccess code, but if i go to localhost/module/, it displays 404 error. But if i go to localhost/web/module/ then everything works.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule sf/(.*) lib/vendo...
I was playing around with Symfony, jQuery, jqGrid & AJAX.
For each new post submission, I am doing the foll:
adding a routing entry in routing.yml
defining a new action in the Actions file for the module. THis reads params, assigns values & saves the object
As in the case of jqGrid, the 'Add Row' form is not a Symfony form. Is ther...
So I am starting a Symfony project that I will be developing on my local machine and pushing changes everyday to the live server. I wanna use SVN as the version control but Im not sure what the best way to set it up is.
Do i make the actual html directory on the server be the repo so that when I check things in it goes live? Do I make ...
Hello!
So I have a table schema that has users who can be friends.
User:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true }
email: { type: string(255), notnull: true, unique: true }
nickname: { type: string(255), unique: true }
password: { type: string(300), notnull: true }
image: { ...
In symfony project, I would like to use an underscore as a separator
for the parameter in routing.yml.
Url example:
/article/lorem-1111_45.html
In routing.yml
rule_sample:
url: /article/:info-:datePublished_:id.html
param: { module: cms, action: test }
options:
segment_separators: ['-', '/', '.', '_']
requirements:
i...
Hi,
i have these methods in module1/actions/actions.class.php:
public function executeMethod1(sfWebRequest $request){
$a = 10;
sfContext::getInstance()->set('a', $a);
return $this->redirect('module1/method2');
}
public function executeMethod2(sfWebRequest $request){
echo sfContext::getInstance()->get('a');
}
When i exec...
Hi there,
I started with a form, which is made by hand because of it's complexity (it's a javascript modified form, with sortable parts, etc). The problem is that now I need to do the validation, and it's a total mess to do it from scratch in the action using the sfValidator* classes.
So, I am thinking to do it using sfForm so that my ...
Hi,
by default, using sfDGP, when i try to execute an action of an application with security activated, the signin form appears but the URL doesn't change to "frontend_dev.php/login".
So, what should I do the URL to "frontend_dev.php/login" ?
Regards
Javi
...
Hi,
there is this code below in sfDoctrineGuardPlugin.
$a = sfConfig::get('app_sf_guard_plugin_success_signin_url');
var_dump($a);
$signinUrl = sfConfig::get('app_sf_guard_plugin_success_signin_url', $user->getReferer($request->getReferer()));
var_dump($signinUrl);
var_dump($user->getReferer($request->getReferer()));
It prints th...
I'm working with a few custom forms, and one of them isn't binding it's values on a POST. I'm using the same logic for each, and only one of them isn't working. Here's the code:
public function executeMediaFileUpload(sfWebRequest $request) {
$this->form = new MediaFileUploadForm();
if (!$request->isMethod('POST'))
...
Hi,
i have this code:
if(sfContext::getInstance()->get('form_signin')){
//...
}
but im getting this error:
The "form_signin" object does not
exist in the current context.
Any right way to check if a variable saved in sfContext is set or not ?
Regards
Javi
...
I'm having trouble selecting a subset of data with doctrine.
I have 3 tables
Location
Contact
Contact_location
The contact and location tables hold a name and an id the other table holds only ID's. For instance:
Location
loc_id: 1
name: detroit
Contact
contact_id: 1
name: Mike
Contact_location
loc_id: 1
contact_id: 1
In doctr...
I have an DQL query in LocationTable.class.php
For this query i need an id which is passed to the action via the URL ?id=2
In the action i can access this with $request->getParamater('id'), but how can i also make this available to the model where my query resides? i need it for a where clause.
...
Hello,
I am having troubles generating a simple database form model. I am using:
Doctrine on Symfony 1.4.4
MySQL Workbench 5.2.16 with Doctrine Export 0.4.2dev
So my ERL Model is:
http://img708.imageshack.us/img708/1716/tmg.png
Genereted YAML file:
---
detect_relations: true
options:
collate: utf8_unicode_ci
charset: utf8
t...
Hi! I've decided to learn Symfony and right now I am reading through the very start of the "Practical Symfony" book. After reading the "Web Server Configuration" part I have a question.
The manual is describing how to correctly configure the server: browser should have access only to web/ and sf/.../ directories. The manual has great i...
Symfony detects if it receives a XmlHttpRequest and automatically turns off your debug bar and layout. However I'd like to have the response decorated with a specified layout. Also I don't want to add custom line of code in the action to enable the layout, I wish I can just make a configuration through yml files.
Thanks in advance.
...
Drupal propose completely different approach in web development (comparing with RoR like frameworks) and it is extremely good from development speed perspective. For example, it is quite easy to clone 90% of stackoverflow functionality using Drupal. But it has several big drawbacks:
it is f''cking slow (100-400 requests per page)
db st...
Hi,
i'm trying to join two independent forms (login and register) in the
same page.
My idea is (just looking at the signin form):
Create an action that shows both forms (partials):
public function executeLoginAndRegister(sfWebRequest $request){
$this->form_signin = $this->getUser()->getAttribute('form_signin');
}
Each parti...
Hi,
i have this lines:
use_javascript('/sfJqueryReloadedPlugin/js/plugins/jquery-ui-1.7.2.custom.min.js')
use_stylesheet('/sfJqueryReloadedPlugin/css/ui-lightness/jquery-ui-1.7.2.custom.css')
Here it is the path:
/opt/lampp/htdocs/rs2/web/sfJqueryReloadedPlugin/css/ui-lightness/jquery-ui-1.7.2.custom.css
The first .js...
With Zend_Form I could just set an element as an array and it would render with brackets. Can I achieve the same thing using sfForm in symfony?
...