Search Results

Search found 564 results on 23 pages for 'symfony 2 1'.

Page 3/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Deploying symfony without shell access

    - by lacqui
    Good day, I have an application written using the Symfony framework. The application works on my development server, where I have shell access. However, I am unable to load my application on my host, as I need to run symfony doctrine::build on the command line on the host. Is there another way to load the database after or during symfony project:deploy?

    Read the article

  • symfony autocompletion in netbeans?

    - by fayer
    im using netbeans to code a web application with symfony. it seems that netbeans doesnt support symfony in auto completion. could one fix this problem. cause i want to be able to click on symfony's functions and get to the source, eg helper function and model methods and classes.

    Read the article

  • Bash completion symfony

    - by zimyand
    How can I make symfony completion in bash? Have ubuntu 9.10. It's hard to write own alias. Anyone know where can I find it? I find http://trac.symfony-project.org/wiki/BashCompletion - but it is for symfony 1.1. Is it compatible with 1.4 ?

    Read the article

  • Symfony2 : How to make the php_intl extension available for Symfony2?

    - by Miles M.
    I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html ok so here is my thing, I've externalised my form and created a specific form class for handling the process and being able to reuse it. So what happen when I submit the form, whatever the info are okay or not for my class, I get this fatal Error : Fatal error: Call to a member function setAttribute() on a non-object in C:\Program Files (x86)\wamp\www\QNetworks\vendor\symfony\src\Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer.php on line 130 Call Stack I'm running with php 5.3.9 and my intl extension is installed and activated BUT when I run the app/check.php command I see : [[WARNING]] Checking that the intl extension is available: FAILED * Install and enable the intl extension (used for validators) * So I don't understand what the problem with this extension. Should I reinstall it ? When I go here : http://php.net/manual/en/intl.requirements.php I see tht i can install the PECL or the ICU library, but i don't know if I should and if there is any relation with my problem .. Thank for your help !!

    Read the article

  • symfony doctrine build-sql error

    - by user313571
    I have some big problems with symfony and doctrine at the beginning of a new project. I have created database diagram with mysql workbench, inserted the sql into phpmyadmin and then I've tried symfony doctrine:build-schema to generate the YAML schema. It generates a wrong schema (relations don't have on delete/on update) and after this I've tried symfony doctrine:build --sql and symfony doctrine:insert-sql The insert-sql statement generates error (can't create table ... failing query alter table add constraint ....), so I've decided to take a look over the generated sql and I've found out some differences between the sql generated from mysql workbench (which works perfect, including relations) and the sql generated by doctrine. I'll be short from now: I have to tables, EVENT and FORM and a 1 to n relation (each event may have multiple forms) so the correct constraint (generated with workbench) is ALTER TABLE `form` ADD CONSTRAINT `fk_form_event1` FOREIGN KEY (`event_id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; doctrine generated statement is: ALTER TABLE event ADD CONSTRAINT event_id_form_event_id FOREIGN KEY (id) REFERENCES form(event_id); It's totally reversed and I am sure here is the error. What should I do? It's also correct like this?

    Read the article

  • How to structure this Symfony web project?

    - by James William
    I am new to Symfony and am not sure how to best structure my web project. The solution must accommodate 3 use cases: Public access to www.mydomain.com for general use Member only access to member.mydomain.com Administrator access to admin.mydomain.com All three virtual hosts point to the Symfony /web directory Questions: Is this 3 separate applications in my Symfony project (e.g. "frontend", "backend" and "admin" or "public", "member", "admin")? Is this a good approach if there is to be some duplicate code (e.g. generating a member list would be common across all 3 applications, but presented differently)? How would I route to the various applications based on the subdomain when a user accesses *.mydomain.com? Where in Symfony should this routing logic be placed? Or, is this one application with modules for each of the above use cases? EDIT: I do not have access to httpd.conf in apache to specify a default page for virtual hosts. I can only specify a directory for each subdomain using the hostin provider's cPanel.

    Read the article

  • Symfony deploying issue

    - by medhad
    I have some problem while configuring symfony project on the production server. When I run the command doctrine --build --all --and-load it gives me error in the production environment: doctrine Dropping "doctrine" database PHP Notice: Undefined index: dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1472 Notice: Undefined index: dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1472 doctrine SQLSTATE[42000]: Syntax error or access violation: 1064 You have an erro...e right syntax to use near '' at line 1. Failing Query: "DROP DATABASE " doctrine Creating "dev" environment "doctrine" database PHP Notice: Undefined index: dbname in /var/www/sf_project/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1439 However after the error it creates the table successfully. But if I run the command second times it fails partially while crating the tables. I have changed my database.yml configuration properly for the production environment. here it is: all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=sf_project port: 3306 username: root password: mainserver Its working right in the local environment though. Can some one shed some light on it ?

    Read the article

  • Configure Symfony for use with Memcached

    - by Rob Wilkerson
    I have 2 Symfony applications (1 using 1.2.x, another using 1.4.x and both using Propel) that need to share some specific session information. Although I have no experience with memcached, my sense--after some reading--is that it may be able to serve as an external (FAST) repository that each app could read and write to. Unfortunately, I can't find much information about how to use it with Symfony in any capacity, much less in the quasi-cache, quasi-messaging server I'm envisioning. My questions, I suppose, are: Am I mistaken in believing that memcached be used in this manner and access by multiple systems? How can I configure Symfony to access a memcached repository? Thanks.

    Read the article

  • Symfony on virtual host (document root problem)

    - by Martin Sikora
    Hello, I'm developing an application in Symfony and on localhost (XAMPP) I want to simulate the same conditions as on the webserver. The web server is configured as follows: /www => mydomain.com /foo => foo.mydomain.com /bar => bar.mydomain.com ... I'm going to put my Symfony application into /www direcotry so there'll be: /www /www/apps /www/apps/frontend /www/apps/frontend/... /www/apps/backend /www/apps/backend/... /www/cache /www/config ... and so on... /www/web The thing is that the document root is still set to the /www directory but Symfony expects it in the /www/web. Of course it will work if I call http://mydomain.com/web but I guess you understand this is quiet stupid solution. So my question is: Is there any way how can I change/bypass the default document root setting using .htaccess or whatever?

    Read the article

  • Create combined client side and server side validation in Symfony2

    - by ausi
    I think it would be very useful to create client side form validation up on the symfony2 Form and Validator components. The best way to do this would be to pass the validation constraints to the form view. With that information it would be possible to make a template that renders a form field to something like this: <div> <label for="form_email">E-Mail</label> <input id="form_email" type="text" name="form[email]" value="" data-validation-constraints='["NotBlank":{},"MinLength":{"limit":6}]' /> </div> The JavaScript part then would be to find all <input> elements that have the data-validation-constraints attribute and create the correct validation for them. To pass the validation constraints to the form view i thought the best way would be to create a form type extension. That's the point of my Question: Is this the correct way? And how is this possible? At the Moment my form type extension looks like this: use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormBuilder; class FieldTypeExtension extends \Symfony\Component\Form\AbstractTypeExtension{ public function getExtendedType(){ return 'field'; } public function buildView(FormView $view, FormInterface $form) { // at this point i didn't find a way to get the // validation constraints out of the $form // the `getAllValidationConstraints` here is just an example $view->set('validation_constraints', $form->getAllValidationConstraints()); } } How can i get all validation constraints applied to one form field out of the FormInterface object?

    Read the article

  • solr plugin for symfony?

    - by fayer
    with symfony using doctrine is very easy cause its fully integrated into the framework. i wonder if there is a possibility to integrate solr with symfony too (eg, via plugin?) thanks

    Read the article

  • Symfony with only FTP access

    - by Asaf
    Hello, I'm currently developing on my local pc, to which I have complete access of course. However to my production server I have only FTP access. Now, this step http://www.symfony-project.org/getting-started/1_4/en/05-Web-Server-Configuration On Symfony's installation guide, suggests that I need to edit the httpd.conf I was wondering if there's an alternative since I don't have access to it on production.

    Read the article

  • difference between sfWidgetFormI18nChoiceLanguage and sfFormExtraPlugin in symfony?

    - by fayer
    to add a list form that contains all languages one can use the widget sfWidgetFormI18nChoiceLanguage that is included in symfony or install a plugin called sfFormExtraPlugin and use its form sfFormLanguage. this is mentioned in http://www.symfony-project.org/jobeet/1_4/Doctrine/en/19 i wonder what the difference is? why should i use the plugin when the standard widget could display a list of all languages? thanks

    Read the article

  • Trouble using sandbox of symfony

    - by jarus
    I'm new to symfony and I am trying to run a simple command on the command line but I get an error message. When I try to execute the command: d:\new_xam\xampp\htdocs\sf_sandbox_1_2\sf_sandbox>symfony propel:build-model " I get the error: 'php.exe' is not recognized as an internal or external command,operable program or batch file. Can anybody help me?

    Read the article

  • symfony/zend integration - blank screen

    - by user142176
    Hi, I need to use ZendAMF on a symfony project and I'm currently working on integrating the two. I have a frontend app with two modules, one of which is 'gateway' - the AMF gateway. In my frontend app config, I have the following in the configure function: // load symfony autoloading first parent::initialize(); // Integrate Zend Framework require_once('[MY PATH TO ZEND]\Loader.php'); spl_autoload_register(array('Zend_Loader', 'autoload')); The executeIndex function my the gateway actions.class.php looks like this // No Layout $this->setLayout(false); // Set MIME Type $this->getResponse()->setContentType('application/x-amf; charset='.sfConfig::get('sf_charset')); // Disable cause this is a non-html page sfConfig::set('sf_web_debug', false); // Create AMF Server $server = new Zend_Amf_Server(); $server->setClass('MYCLASS'); echo $server->handle(); return sfView::NONE; Now when I try to visit the url for the gateway module, or even the other module which was working perfectly fine until this attempt, I only see a blank screen, with not even the symfony dev bar loaded. Oddly enough, my symfony logs are not being updated as well, which suggests that Synfony is not even being 'reached'. So presumably the error has something to do with Zend, but I have no idea how to figure out what the error could be. One thing I do know for sure is that this is not a file path error, because if I change the path in the following line (a part of frontendConfiguration as shown above), I get a Zend_Amf_Server not found error. So the path must be correct. Also if I comment out this very same line, the second module resumes to normality, and my gateway broadcasts a blank x-amf stream. spl_autoload_register(array('Zend_Loader', 'autoload')); Does anyone have any tips on how I could attach this problem? Thanks P.S. I'm currently running an older version of Zend, which is why I am using Zend_Loader instead of Zend_autoLoader (I think). But I've tried switching to the new lib, but the error still remains. So it's not a version problem as well.

    Read the article

  • Symfony - Delete and reload all database records for each test

    - by Andree
    Hi there, From the Jobeet tutorial provided in Symfony website, I found out that I can load fixtures data each time I run unit test by using this script: Doctrine_Core::loadData(sfConfig::get('sf_test_dir').'/fixtures'); However, I want to delete and reload all records from database each time I run a unit test. Currently, I'm doing this manually (Run symfony doctrine:build --all before each test). Can someone provided me a correct way to do this?

    Read the article

  • Accessing the database and sending an email in a symfony batch script

    - by morpheous
    I am running Symfony 1.3.2 on Ubuntu. I need to write a batch script that can: Access the database using the ORM Send email(s) IIRC, this was in a previous cookback, but I thing that was for an earlier version of Symfony (the API may have changed since). Does anyone know how I may access the database via the ORM layer in a batch script and also how to send out email(s) in a batch script?

    Read the article

  • bundles in symfony 1.4?

    - by fayer
    whenever i add a feature i want to have all files (php, css, js, img etc) in one folder. i know that this bundle feature will come with symfony 2.0 but i wonder if i can have all files in one folder/plugin in symfony 1.4 cause it seems that you have to have the js/css/img in web/ folder? thanks

    Read the article

  • php symfony and apache2 - inst't serving .phtml

    - by pmoniq
    Hi, I have a problem with apache2 settings (Ubuntu system). I would like to run symfony project on my localhost but instead of serving .phtml files, browser is trying to download files. this is my file .host: 127.0.0.3 test this is apache2/sites-available/default file < VirtualHost 127.0.0.3:80 ServerName test DocumentRoot "/home/m/Pr/workspace/php/test/web" DirectoryIndex frontend_dev.php < Directory "/home/m/Pr/workspace/php/test/web" AllowOverride All Allow from All Alias /sf /home/m/Pr/workspace/php/test/lib/vendor/symfony/data/web/sf < Directory "/home/m/Pr/workspace/php/test/lib/vendor/symfony/data/web/sf" AllowOverride All Allow from All </Directory> and this is .htaccess in /test RewriteEngine On RewriteRule ^(.*)$ /web/$1 Options +FollowSymLinks +ExecCGI AddHandler application/x-httpd-php5 .php .phtml and this is .htaccess in /test/web Options +FollowSymLinks +ExecCGI RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work RewriteBase / # we skip all files with .something #RewriteCond %{REQUEST_URI} ..+$ #RewriteCond %{REQUEST_URI} !.html$ #RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L] Another problem is I think apache don't read .htaccess files. What am i doing wrong? Maybe I forgot about something? Please, help me becouse i have no idea.

    Read the article

  • Installing sfJqueryTreeDoctrineManagerPlugin to Symfony 1.4

    - by Christine Q.
    I have faced serious difficulties while installing sfJqueryTreeDoctrineManagerPlugin to Symfony 1.4 w/ Doctrine ORM. The installation directly from the server did not work out like with previous plugins that I have installed: C:\pathsymfony plugin:install sfJqueryTreeDoctrineManagerPlugin plugin installing plugin "sfJqueryTreeDoctrineManagerPlugin" No release available for plugin "sfJqueryTreeDoctrineManagerPlugin" This is why I needed to install the plugin by downloading the tgz-archive and install it manually like this: C:\pathsymfony plugin:install "C:\path\to\downloads\sfJqueryTreeDoctrineManagerPlugin-1.2.4.tgz" plugin installing plugin "C:\path\to\downloads\sfJqueryTreeDoctrineManagerPlugin-1.2.4.tgz" sfSymfonyPluginManager Installing web data for plugin I guess everything should be fine this far? After that I edited \apps\admin\config\settings.yml like instructed in the plugins readme file. all: .settings: enabled_modules: [default, sfJqueryTreeDoctrineManager] I also checked that the plugin was enabled in \config\ProjectConfiguration.class.php like this: $this->enablePlugins(array( // other plugins, 'sfJqueryTreeDoctrineManagerPlugin' )); I published assets and cleared cache: C:\pathsymfony plugin:publish-assets >> plugin Configuring plugin - sfJqueryTreeDoctrineManagerPlugin C:\pathsymfony cc Finally I added the required helper to the newly created apps\admin\modules\category\templates\indexSuccess.php <?php use_helper("sfJqueryTreeDoctrine"); echo get_nested_set_manager("Category", "name"); When loading the page I unfortunately get the following error: 500 | Internal Server Error | InvalidArgumentException Unable to load "sfJqueryTreeDoctrineHelper.php" helper in: SF_ROOT_DIR\apps\admin\modules/businessunitgroup/lib/helper, SF_ROOT_DIR\apps\admin\lib/helper, SF_ROOT_DIR\lib/helper, SF_SYMFONY_LIB_DIR/helper. The file sfJqueryTreeDoctrineHelper.php exists indeed but not in any previously mentioned folder. The file can only be found in the folder \plugins\sfJqueryTreeDoctrineManagerPlugin\lib\helper. I guess that Symfony doesn't look to that folder while finding helpers? I have tried to move the helper file to one of the previously mentioned folders. As expected, that changes the error. Now I get: 500 | Internal Server Error | sfConfigurationException The component does not exist: "sfJqueryTreeDoctrineManager", "manager". Unfortunately I can't figure out how should I be able to retrieve the "missing" component from the correct folder. I would be very grateful for any advice to help me forward. By the way, I am aware that there are other nested-set / tree plugins available for Symfony (like sfDoctrineTreePlugin and caPropelTreePlugin) but unluckily those are either uncompatible or too limited for my needs.

    Read the article

  • Getting batch_action functionality in Symfony 1.0

    - by Alex Ciminian
    I'm currently working on a web app written in Symfony. I'm supposed to add an "export to CSV" feature in the backend/administration part of the app for some modules. In the list view, there should be an "Export" button which should provide the user with a csv file of the elements that are displayed (considering filtering criteria). I've created a method in the actions class of the module that takes a comma separated list of ids and generates the CSV, but I'm not really sure how to add the link to it in the view. The problem is that the view doesn't exist anywhere, it's generated on the fly from the data in the generator.yml configuration file. I've posted the relevant part of the file below. I'm new to Symfony, so any help would be appreciated :). Thanks, Alex Update list: display: [id, =name, indemn, _status, _participants, _approved_, created_at] title: Lista actiuni object_actions: _edit: ~ _delete: ~ actions: _create: ~ export_csv: name: Export to CSV action: CSVExport params: id=csvActionSubmit filters: [name, county_id, _status_filter, activity_id] fields: id: name: Nr. crt. ... Thanks to your advice, I've managed to add a button that is linked to my action. The problem is that I also need to send some parameters to the action, because I may not want all the elements - filters may have been used. Unfortunately, the project is using Symfony 1.0, which doesn't support batch_actions. Currently, I'm working around this with Javascript (I parse the DOM to get the numeric ids (from the display table) and then build the link for the button. I really think there could be a better way for this.

    Read the article

  • Symfony generating database from model

    - by Sergej Jevsejev
    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 type: InnoDB Course: columns: id: type: integer(4) primary: true notnull: true autoincrement: true name: type: string(255) notnull: true keywords: type: string(255) notnull: true summary: type: clob(65535) notnull: true Lecture: columns: id: type: integer(4) primary: true notnull: true autoincrement: true course_id: type: integer(4) primary: true notnull: true name: type: string(255) notnull: true description: type: string(255) notnull: true url: type: string(255) relations: Course: class: Course local: course_id foreign: id foreignAlias: Lectures foreignType: many owningSide: true User: columns: id: type: integer(4) primary: true unique: true notnull: true autoincrement: true firstName: type: string(255) notnull: true lastName: type: string(255) notnull: true email: type: string(255) unique: true notnull: true designation: type: string(1024) personalHeadline: type: string(1024) shortBio: type: clob(65535) UserCourse: tableName: user_has_course columns: user_id: type: integer(4) primary: true notnull: true course_id: type: integer(4) primary: true notnull: true relations: User: class: User local: user_id foreign: id foreignAlias: UserCourses foreignType: many owningSide: true Course: class: Course local: course_id foreign: id foreignAlias: UserCourses foreignType: many owningSide: true And no matter what I try this error occurs after: symfony doctrine:build --all --no-confirmation SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'user_userid' doesn't exist in table. Failing Query: "ALTER TABLE user_has_course ADD CONSTRAINT user_has_course_user_userid_user_id FOREIGN KEY (user_userid) REFERENCES user(id)". Failing Query: ALTER TABLE user_has_course ADD CONSTRAINT user_has_cou rse_user_userid_user_id FOREIGN KEY (user_userid) REFERENCES user(id) Currently I am studying Symfony, and stuck with this error. Please help.

    Read the article

  • Adding picture in symfony 2 from symfony form?

    - by user2833510
    How do I add a picture in symfony2 from form to a database. I want to make a logo as a picture field and store project picture in database from form. How do I do this? Here is my form: <?php namespace Projects\ProjectsBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class ProjectsType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('name') ->add('description') ->add('priority','choice', array( 'choices' => array('high' => 'high', 'low' => 'low', 'medium' => 'medium'))) ->add('logo') ->add('startedAt','datetime',array('label' => false,'data'=>new \DateTime(),'attr'=>array('style'=>'display:none;'))) ->add('completedOn','datetime',array('label' => false,'data'=>new \DateTime(),'attr'=>array('style'=>'display:none;'))) ->add('createdDatetime','datetime',array('label' => false,'data'=>new \DateTime(),'attr'=>array('style'=>'display:none;'))) ->add('updatedDatetime','datetime',array('label' => false,'data'=>new \DateTime(),'attr'=>array('style'=>'display:none;'))) ; } public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'data_class' => 'Projects\ProjectsBundle\Entity\Projects' )); } public function getName() { return 'projects_projectsbundle_projectstype'; } } and here is my controller: public function createAction(Request $request) { $user = $this->get('security.context')->getToken()->getUser(); $userId = $user->getId(); $entity = new Projects(); $form = $this->createForm(new ProjectsType(), $entity); $form->bind($request); $entity->setCreatedBy($userId); $entity->setUpdatedBy($userId); $entity->setCompletedBy($userId); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); $_SESSION['projectid'] =$entity->getId(); if($request->isXmlHttpRequest()) { $response = new Response(); $output = array('success' => true, 'description' => $entity->getdescription(), 'id' => $entity->getId(), 'name' => $entity->getname(), 'priority' => $entity->getpriority(), 'logo' => $entity->getlogo(), 'startedat' => $entity->getstartedat(),'completedon' => $entity->getcompletedon(),'completedby' => $entity->getCompletedBy(), 'createdby' => $entity->getcreatedby(), 'updatedby' => $entity->getupdatedby(), 'createddatetime' => $entity->getcreateddatetime(), 'updateddatetime' => $entity->getupdateddatetime()); $response->headers->set('Content-Type', 'application/json'); $response->setContent(json_encode($output)); return $response; } return $this->redirect($this->generateUrl('projects_show', array('id' => $entity->getId()))); } return $this->render('ProjectsProjectsBundle:Projects:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >