PHP on T R A X
Rapid Application Development Made Easy

Reply to topic
EasyPHP + Trax ?? (Windows)
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
Hi.I'm new to PHP/PHP on Trax and I just installed EasyPHP(because it's easier,I didn't have to intall them separately;Apache,PHP,SQL etc).I have to mention that I'm using Windows XP.

My question is:can I set up PHP on Trax framework over my EasyPHP installation? And how?

Thank you.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
I setup a blog and will be posting helps and tutorials etc to. I went through the process of installing easyPHP and Trax in my parallels WinXP. Hope this helps. Let me know if this works for you.

http://blog.phpontrax.com/2009/12/setting-up-trax-with-easyphp-windows
View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
Thank you for the tutorial.
It didn't work yet,because it asked me some details when I typed 'go-pear' in the command window(cmd).If you'd clarify this in the tutorial,it would be great.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
Did you try just hitting enter through all the questions? I'm trying to remember what I did... I think I just hit enter through em all. I will have to go back and try it again.
View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
I'll try that(just hitting enter through all of them),thanks.
View user's profileSend private messageYahoo Messenger
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
The tutorial is great.Thanks.
But now I have another problem(not really related to TRAX).
When I type http://localhost/ in the browser,I get this message:

"Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
localhost
12/19/09 03:54:51
Apache/2.2.13 (Win32) PHP/5.3.0 "

I think that's because the computer I'm on right now is not really a server.I'm "receiving" internet access from another computer in the house,through a wireless connection.
Any suggestions?Thank you.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
in your httpd.conf try adding this changing "c:/projects/traxtest/public" to the path to your trax application's public folder.

Code:

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "c:/projects/traxtest/public"
    ServerName localhost
   <Directory "c:/projects/traxtest/public">
      Options All
      AllowOverride All
      Order deny,allow
      Allow from 127.0.0.1
      deny from all
   </Directory>
</VirtualHost>


Then restart apache.
View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
I already did that.It was one of the steps that you described in the tutorial.
I still have this problem("access forbidden etc").
I think that my computer has to be connected directly to the internet,not to receive access to internet from another computer.
View user's profileSend private messageYahoo Messenger
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
I guess I solved the problem.I changed the DocumentRoot and the Directory to C:/Program Files/EasyPHP5.3.0/www/trax (C:/Program Files/EasyPHP5.3.0/www/ was my local web for php)

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/Program Files/EasyPHP5.3.0/www/trax"
ServerName localhost
<Directory "C:/Program Files/EasyPHP5.3.0/www/trax">
Options All
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
deny from all
</Directory>
</VirtualHost>

is that ok??I guess it's not necessary to make it work for c:/projects..Thanks.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
you want to set the DocumentRoot to your trax public folder.

C:/Program Files/EasyPHP5.3.0/www/trax/public

in public you should have folders images, stylesheets, javascripts and files .htaccess and dispatch.php
View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
OK,so I guess that the location of my local web can be anywhere,practically.
Sorry for asking so many questions,but the available documentation is not too explicit.This could be an opportunity for you to improve it Smile
So,I need to know some explicit details on how to start an application.I also didn't know how to run the demo applications available on the site(flickr & very_basic_test_app).Which are the main files?
And how do I build all those directories in an application?(I guess not manually).
Please give me some suggestions or a link to a good tutorial(for beginners),because I don't have any "starting point" about Trax and I need to build my graduation / license project in PHPOnTrax.
Thank you.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
To generate the files for a fresh trax application after you have installed the trax stuff is on the blog tutorial if you look at #9.

Code:

9. Last thing to do is make a trax.bat file and place it in the folder
C:\Program Files\EasyPHP5.3.0\php.

The file contents will be the one line below.

php "C:\Program Files\EasyPHP5.3.0\php\PEAR\PHPonTrax\trax.php" %1

To verify your Trax install is working at the commandline type:
trax -v
You should see the output:
Trax 0.16.0

If you want to start making an app cd into the directory for your project and type:

trax .

This will generate all the basic files needed to make a new Trax app.


After you run the command "trax ." or "trax <folder name>" you will have a bunch of generated files and directories that should look like this
app
config
cron
db
doc
lib
log
public
script
test
tmp
vendor

In Trax there is a generator script for making controllers and models in your applications script folder. If you just type php script/generate.php it will show you the options you can use. Here is the output from my commandline:

Code:

[root@me trax]# php script/generate.php
Usage:
Generate Controller:
php script/generate.php controller controller_name [view1 view2 ...]
for more controller info php script/generate.php controller

Generate Model:
php script/generate.php model ModelName
for more model info php script/generate.php model

Generate Mailer:
php script/generate.php mailer MailerName [view1 view2 ...]
for more mailer info php script/generate.php mailer

Generate Scaffold:
php script/generate.php scaffold ModelName [controller_name] [view1 view2 ...]
for more scaffold info php script/generate.php scaffold

View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
OK,i finished setting up Trax,I created a database and a table(exactly as you shown in the Screencasts),but I got some errors in cmd:

C:/projects/blog_demo>php script/generate.php scaffold post blog
create c:/projects/blog_demo/app/models/post.php
Can't create model.
Model Class: Post<br>Error Message: MDB2 Error: not found
for database 'trax_blogdemo' on host 'localhost' as user root
Did you configure file C:/projects/blog_demo/config/database.ini correctly?


I guess I configured it correctly:

database = trax_blogdemo (that's how I named it in PHPMyAdmin)
hostspec = localhost
username = root
password =

Thanks again.
View user's profileSend private messageYahoo Messenger
johnpipi


Joined: 15 Dec 2005
Posts: 328
Reply with quote
Does the database "trax_blogdemo" exist? If not first create the database then run the generator command.
View user's profileSend private message
vlad_c


Joined: 19 Nov 2009
Posts: 9
Location: Timisoara
Reply with quote
Yes,it exists.I still get the error.Now it says:

Class 'Post' not found in C:/Program Files/EasyPHP5.3.0/php/PEAR/PHPonTrax/vendor/trax/trax_generator.php on line 557

Anyway,the output that I receive is much longer(I have to scroll up a lot).It also says something about the timezone:

It is not safe to rely on the system's timezone settings.You are *required* to use the date.timezone setting or the date_default_timezone_set<> function.In the case you used any of those methods and you are still getting this warning,you must likely mispelled the timezone identifier.We selected 'Europe/Helsinki' for '2.0/no DST' instead in C:/Program Files/EasyPHP5.3.0/php/PEAR/PHPonTrax/vendor/trax/trax_generator/php on line 557



I even tried to change my timezone from Bucharest +2 to Helsinki +2(anyway,it's the same thing),but that didn't help.
I also checked that trax_generator.php file and I didn't find anything about the timezone on line 557.
View user's profileSend private messageYahoo Messenger
EasyPHP + Trax ?? (Windows)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Reply to topic