ma2tt Posted November 28, 2008 Share Posted November 28, 2008 I'm trying to install Zend Framework on my laptop to familiarise myself with it. I already have WAMP installed with a dozen or so website projects sitting in the WAMP server root (c:\wamp\www). The installation instructions that I have followed so far include a .htaccess file to reroute everything to index.php. Am I right in thinking that Zend Framework effectively takes over the whole server? I still need access to the existing projects already in the WAMP server root without using ZF. How do I achieve that? Does ZF require its own dedicated server? I'm kinda new to this (if you didn't already guess! haha) Thanks Matt Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/ Share on other sites More sharing options...
Mchl Posted November 28, 2008 Share Posted November 28, 2008 Put the .htaccess in ZF folder not in the root, and change the paths in it accordingly. Since it's for tests only, I put my public and application folders both in c:\wamp\www\zf\ Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-701031 Share on other sites More sharing options...
ma2tt Posted November 28, 2008 Author Share Posted November 28, 2008 Nice one! I'll try that. Many thanks Mchl Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-701036 Share on other sites More sharing options...
Xeoncross Posted November 29, 2008 Share Posted November 29, 2008 The installation instructions that I have followed so far include a .htaccess file to reroute everything to index.php. Am I right in thinking that Zend Framework effectively takes over the whole server? Nope, ZEND doesn't take over anything. The .htaccess that you place in a folder does affect all sub-folders though. I still need access to the existing projects already in the WAMP server root without using ZF. How do I achieve that? Does ZF require its own dedicated server? I have my XAMMP and WAMP servers setup with sub directories. C:/wamp/www/ C:/wamp/www/zend/ C:/wamp/www/project1/ C:/wamp/www/project2/ The answer is to use RewriteBase in your rewrite rules. See this topic: http://codeigniter.com/forums/viewthread/85429/ Also, if you want to install Xdebug for testing I made a video about it here. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-701797 Share on other sites More sharing options...
Daniel0 Posted November 29, 2008 Share Posted November 29, 2008 It just has to be present in the include_path. That's basically how you "install" it. For each project I prefer to give it it's own hostname and it's own VirtualHost in Apache. I just edit the hostfile and make something like e.g. dev.phpfreaks point to 127.0.0.1. Then I setup a new vhost. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-701901 Share on other sites More sharing options...
bigN Posted January 22, 2009 Share Posted January 22, 2009 I also try to install and try ZF but on XAMMP. In my httdocs I have plenty installed projects, but it seems that I cant configure the .htaccess file ??? .....eg I create a project in the following directory : C:\xampp\htdocs\Quickstart I have the below folders application <DIR> data <DIR> library <DIR> public <DIR> scripts Now ....where should I put the .htaccess file and what changes should I make to it? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-743089 Share on other sites More sharing options...
Mchl Posted January 22, 2009 Share Posted January 22, 2009 Put it in C:\xampp\htdocs\Quickstart\public as this is where your's application will be accessible from. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-743098 Share on other sites More sharing options...
bigN Posted January 22, 2009 Share Posted January 22, 2009 Thanks..... I have installed the "ZendFrameworkQuickstart" application on my XAMMP under the folder C:\Program Files\xampp\htdocs\Quickstart but when I run a http://localhost/Quickstart/public/ get the error..... Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\Quickstart\public\index.php on line 12 Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\Program Files\xampp\htdocs\Quickstart\application\/../library;.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\Quickstart\public\index.php on line 12 I think I should change the htaccess and perhaps bootstrap but don't understand where and what path should I put???? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-743133 Share on other sites More sharing options...
bigN Posted January 22, 2009 Share Posted January 22, 2009 Sorry for the last question.....things are started working now..... some files just haven't been copied in the library folder..... thanks Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-743139 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 BUMP! I'm having similiar problems (I have a WAMP setup). Working through their quickstart guide, I successfully created the project - but when I try to navigate to the project folder - all the folders are visible EXCEPT public. When I try to access this folder, I get an internal server error. Any ideas? example: [DIR] application/ [DIR] library/ [DIR] tests/ where's freaking public!? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857861 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 Sounds to me like you've actually put application, library and tests within your public directory. Anyways, you people really ought to look into how to configure vhosts on Apache instead of panting all your projects within one single document root. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857867 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 Sounds to me like you've actually put application, library and tests within your public directory. do you mean wamp's www directory? Basically, I created the project within wamps www directory because (as I understand it) it needs to be in there to parse the PHP correctly. All the folders are in one location: C:\wamp\www\sites\study\Zend\quickstart :(application, library, public, tests) ZF is here - and reference via the include_path in php.ini C:\wamp\ZendFramework Is that problematic? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857900 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 No its not problematic, but the only files out of that entire structure that need to be within an accessible web root are the files within public (eg; .htaccess and index.php). The rest can be wherever you like. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857904 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 to be fair, they were all unpacked to a single project folder when I executed "zf create project quickstart" from the cmd (as in the quickstart tutorial on Zend's site). So why is public not visible to localhost? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857911 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 to be fair, they were all unpacked to a single project folder when I executed "zf create project quickstart" from the cmd (as in the quickstart tutorial on Zend's site). Indeed. But you can easily setup a virtual host on apache to make public the only publicly accessible directory. Hence, why its named public. So why is public not visible to localhost? I've no idea. Where is your servers document root? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857917 Share on other sites More sharing options...
Daniel0 Posted June 17, 2009 Share Posted June 17, 2009 You must be doing something wrong. When running it I get what I've attached here. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857936 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 DocumentRoot "c:/wamp/www/" - if I modify it to "C:\wamp\www\Sites\study\Zend\quickstart\public" it still doesn't work. I'm going to try out the vhosts option, but this seems like quite an odd bug. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857937 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 So, your saying when you go to http://localhost/sites/study/Zend/quickstart you get a directory listing showing.... [pre] [DIR] application/ [DIR] library/ [DIR] tests/ [/pre] and no public directory? Something is whack with your setup. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857939 Share on other sites More sharing options...
Daniel0 Posted June 17, 2009 Share Posted June 17, 2009 Does the public folder not show up in the filesystem either? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857940 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 Does the public folder not show up in the filesystem either? Nah, I think the op has stated the public directory shows in his filesystem, but not when view via apache directory browsing. Makes me think he has somehow installed application, library and tests into public. Seems odd though. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857941 Share on other sites More sharing options...
Daniel0 Posted June 17, 2009 Share Posted June 17, 2009 sunwukung is not the OP though. He jumped in later. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857945 Share on other sites More sharing options...
trq Posted June 17, 2009 Share Posted June 17, 2009 Indeed. I guess I should refer to him as 'the problem at hand'? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857949 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 Feel free - as long as you help me solve it! yup, you're telling me. Can't figure it out for the life of me. I work with WAMP on a daily basis, so I can't understand why it wouldn't show a folder - and all my other projects are functioning fine. Incidentally, @Daniel10, I unpacked your tarball into the same folder, and still no public folder. Anyway, here's some progress - I removed the htaccess file form within the public folder - it became visible, and now I've been able to access the framework. Soooo, it's something to do with the .htaccess I guess. Since neither vhosts or .htaccess are my strong suit, can you think of why this might be causing an issue? Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857977 Share on other sites More sharing options...
Daniel0 Posted June 17, 2009 Share Posted June 17, 2009 Okay, seriously, check this out: C:\windows\system32\drivers\etc\hosts: 127.0.0.1 dev.yourproject C:\path\to\your\httpd.conf: <VirtualHost *:80> ServerName dev.yourproject DocumentRoot C:\path\to\your\zfproject\public <Directory C:\path\to\your\zfproject\public> Order deny,allow Deny from all Allow from 127.0.0.1 AllowOverride All </Directory> </VirtualHost> Restart Apache, go to http://dev.yourproject If that doesn't work, something is seriously wrong with your setup. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-857980 Share on other sites More sharing options...
sunwukung Posted June 17, 2009 Share Posted June 17, 2009 Nope, same problem. Not sure what the problem is, only that it seems to work if I remove the .htaccess file: SetEnv APPLICATION_ENV development RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] I'll try this on a different WAMP setup to see if it's just my current setup. Quote Link to comment https://forums.phpfreaks.com/topic/134641-solved-zend-framework-and-wamp/#findComment-858010 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.