so heres the process and potential problems solutions that i had:
- side-note: always restart computer after new installation and alwais test it ( server, php, sql, packages etc etc ) !! that obvious point is sometimes underestimated which can lead to fatal headeches.
1. download and install APACHE server from here .2. download php (PHP 5.2.5 installer for windows ) from here .
- configure apache : start->programs->apache...->configure..->edit httpd.conf.. : set DocumentRoot to some normal path ("c:\server") and
to same root. restart apache ! - test apache by adding some test.html to root directory ( c:\server ) and view it in browser ( http://localhost/test.php )
3. installing php:4. pear:
- chose some easy dir for php . i'll assume c:\php for next steps.
- check the following adons : xslt (or xsl) , dom , pdo ( mysql ) , mysql . also chose "pear install". restart comp.
- test php using some testphp.php in root directory ( with some echo commands for example )
- i recommend using a great workspace phpdesigner 2008. important ! configure phpdesigner to use the real php.ini and php.exe ! (tools->preferences-> run,localhost)
- official php manual is great learning resource. especially the comments.
- install using c:\php\go-pear.bat ( more detailed guide )
- note: the directories and environment vars are writen using by c:\php\pear_env.reg. use it. then they can be accessed by regedit (start->run regedit) in HKEY_CURRENT_USER->ENVIRONMENT ( modify them manually if there is problem to change them using go-pear.bat) .
- reastart computer
- note! : pear should add include_path at the end of php.ini. dont get confused by the commented include_path in this file, and use the one added!
- test pear using shell ( start->run cmd ) 'pear list' command. if for some reason it not working, change the active dir to c:\php> and retry same command.
5. mysql:6. install packages using pear : phing , propel . note : read installation guides until the end !! there are some inlude_path etc configs
- download community server and tools (especially 'mysql gui tools' and workbench ) from here
- for some tools u need to have .net 2.0 . get it frommicrosoft site.
- install : enable cmdline access ! , set some passwort for default "root" username. restart comp.
- note : on problems with process start : uninstall mysql, delete its folder in program files , delete database folder from disc (usually c:\mysql or so..), restart comp, install mysql.
7. u can start from propel official tutorial to test all, or this good one too.
notes:build.properties :
- on problems with includes, manually edit include path at runtime : set_include_path(".");
set_include_path( "" . get_include_path() . PATH_SEPARATOR . "C:\php\PEAR" );
set_include_path( "" . get_include_path() . PATH_SEPARATOR . "Z:\server\bookstore\build\classes");- also i had to manually specify full paths in some propel php files. i suppose it can be avoided.
- be very careful in runtime-conf and build.properties. heres the ones that worked for me :
# The name of the project
propel.project = bookstore
# The database driver
propel.database = mysql
# The connection parameters (optional, but required if you want to initialize db)
propel.project = bookstore
propel.database = mysql
propel.database.url = mysql://root:@localhost/bookstore
propel.mysql.tableType = InnoDB
# If you are using MySQL or Oracle, you will have to specify any username and password separately
propel.database.user =root
propel.database.password =secret
runtime-conf.xml: ( pseudocode)
config
propel
datasources default="bookstore"
datasource id="bookstore"
adapter mysql
connection
phptype mysql
database bookstore
hostspec localhost
username root
password secret
/connection
/datasource
/datasources
/propel
/config
- after generating all with propel-gen command ( that hopefully works from shell), use the sql files by mysql query browser to create and build the database. use this tool to see the database data later.
thats for now. further investigation:
- wtf 'table inheritance' is for ? ( few hours of searching and experimenting )
- configuring all this stuff on remote server. ( few hours )
- security , load balancing , simultaneous database operations ( locking :? temp data :? ) -can take 1 full day of investigation and learning , some hours to experiment end maybe much more time to enlarge knowledje. seems to be a tuff aspect.
- some recommended php packages. some (~6) hours to learn and experiment.
No comments:
Post a Comment