Ask your Symfony questions! Pay money and get answers fast! (more info)

setup/import PHP symfony framework project Symfony

Hi,
I am very new to symfony (propel), php framework. I am on a project, that I was provided a CD with symfony project on it. I have downloaded Netbeans and wampserver, both are running correctly. How can I setup this project on window 7 OS so I can make any changes to it

I will pay upto $30, but I need this to be completed today. I have installed mysql , php, used xampp linux 1.8.1. Should I configure symfony 1.4.19 or 2.0. can the files be imported to 2.0 if I configure 2.0 on the linux box.

Answers (3)

2012-10-17

Luis Cordova answers:

cp contents and inspect the directories

if you see a composer.json it is your day

if not you should see some deps and a bin/vendors script

then you run it ./bin/vendors and it should install things

then you are ready to go and setup database with commands too

check your app/config/parameters.[ini|yml] set your values

setup your vhost then

then you are good


acinc comments:

I don’t see composer.json, the directories under project or vendor name are: apps, batch,cache, config, data ,doc ,lib, log, nbproject, plugins, test, web, files readme, symfony symfony.php
There is a vendor/bin with out folder called vendors ( folders in bin are model, symfony, validators, mysecurity.class, mytools.class


Luis Cordova comments:

is this a sf1.x or sf2 project?


Luis Cordova comments:

it seems to me this is a sf1.x project


acinc comments:

I don't know, how can I find out by looking at the folder/files from the CD. I have installed Netbeans, wampserver. This is what I can find in one of the config file:
<?php

// symfony directories
$sf_symfony_lib_dir = dirname(__FILE__).'/../lib/symfony';
$sf_symfony_data_dir = dirname(__FILE__).'/../data/symfony';

I think it was running in redhat linux, I can configure it oracle linux if that will be easy to configure.


Luis Cordova comments:

yes it will be easier

also it is a sf1.x project for sure, if you want further develop it i recommend you move it to sf2 project


acinc comments:

On oracle linux, I have mysql, and apache installed, should I install wampserver and netbeans on it


Luis Cordova comments:

you don't need wampserver anymore

just get a lampstack = apache, mysql and php and you are set

once you do this, just play around with the info on the README or on the links below

http://www.symfony-project.org/

notice this is a sf1.4 project and not a sf2 so don't go to http://www.symfony.com you will be mislead

Only go to symfony.com if you want to port your project to sf2 which i do recommend ;)

but for minor modifications and getting you stuck on legacy code then remain with sf1.x and just do your mods.

It seems you are a newbie, and that is why i said to move into sf2, though to port something you would better know both frameworks, they are totally different.

Let me know via PM if any information on the readme that you cannot disclose.


Luis Cordova comments:

User Review System built on top of the symfony framework (version 1.0.21)

2012-10-17

Florian Klein answers:

This is for sure a symfony1 project, given the directory structure.

I would advice you to look at the old docs present here:

http://www.symfony-project.org/getting-started/1_4/en/03-Symfony-Installation

and here:

http://www.symfony-project.org/getting-started/1_4/en/04-Project-Setup

The first page is about how to install the vendors you need. (the symfony library itself).
Usually, the vendor installation was made using svn externals.

The second link explains how to setup a project using symfony1.

Please post what is contained in your README file, it could contain install informations.


acinc comments:

Below is the Readme file: I am still working on installing apache, mysql and php on linux.

* Application:
User Review System built on top of the symfony framework (version 1.0.21)

* Description:
Full suite for managing User Reviews,
Annual Program Reviews , and Skills Test Reviews from start to finish.

* Running and Server Config:
- Add %APP_ROOT/web/acrs config to Apache's sites-enabled folder
- Set ServerAdminm, ServerName, DocumentRoot, and Directory
- memory_limit = 128M in cli/php.ini and apache/php.ini
- post_max_size = 128M in cli/php.ini and apache/php.ini
- magic_quotes_gpc = Off in cli/php.ini and apache/php.ini
- upload_max_filesize = 128M in cli/php.ini and apache/php.ini
- add "ft_mind_word_len=3" to mysql/my.cnf
- run batch/maintenance.php, followed by batch/notifications.php as a cron job at 4:01AM EST

* Requirements:
- Apache Web Server 2.2.12 or equivalent
- PHP 5.2.10 or equivalent
- MySQL 5.1.37 or equivalent
- sendmail 8.14.3 or equivalent

* Details:

Database Schema: config/schema.yml (includes name mappings between table names and model code filenames)
Baseline Data: data/fixtures/*.yml
CRON job scripts: batch/maintenance.php and batch/notifications.php (to be run daily at 4:01AM in serial)
Reports: web/rep.cgi (needs to be placed in the cgi-bin directory on the server, e.g. /usr/lib/cgi-bin)

- Code is divided into modules which reside in apps/frontend/modules/
- Modules are subdivided into actions/ (controller code) and templates/
- In actions/actions.class.php each public function executeActionName() maps to template/actionNameSuccess.php
- Model/database code uses Propel, which is in lib/model
+ [phpName].php holds the subclass representing a row from the table
+ [phpName]Peer.php holds the subclass for performing query and update operations on the table
- See the symfony website for detailed documentation: http://www.symfony-project.org/doc/1_0/
- Help files are in web/help/

* Authors:
- Smith Johns [[email protected]]
- Eric Rhain [[email protected]]
Power Information Services, Inc.
000-000-5500

2012-10-17

Martin Palacio answers:

<blockquote>
This is what I can find in one of the config file:
<?php

// symfony directories
$sf_symfony_lib_dir = dirname(__FILE__).'/../lib/symfony';
$sf_symfony_data_dir = dirname(__FILE__).'/../data/symfony';
</blockquote>

Not just symfony 1.x, this is symfony 1.0.x!! You have to read the documentation related to version 1.0.

<blockquote>Add %APP_ROOT/web/acrs config to Apache's sites-enabled folder</blockquote>
can you post the contents of that file? (or any files within, if acrs is a folder). That's the key to configure it to run in apache correctly.


Martin Palacio comments:

<blockquote>Should I configure symfony 1.4.19 or 2.0.</blockquote>
<strong>Neither</strong>. Your project is built with symfony 1.0.x, 1.4.x is not compatible. BUT, first of all check if the framework is included on the CD (I think it is, in your bin/symfony or lib/symfony or lib/vendor/symfony) In that case please post the content of your %APP_ROOT/web/acrs config file...some projects run as VirtualHosts in Apache, and some others run as subdirectories, thus different configurations apply.