I am working through the ZEND Skeleton installation described here
I am running it on an Apache server (in my home network) on Ubuntu 16.10
When I switched off the server yesterday the installation was working correctly, and displaying the expected Zend pages, as per the documentation.
To clarify - I need to know why the previously working installation on Apache has stopped rendering the pages in Php
I bookmarked these links in my browser. When I booted the server this morning and went to those links I get the result shown in the image below:-
Local browser URL (192.168.1.201/zendtest1/)
Zend Skeleton index
It appears that in switching off and on the machine the Zend installation has stopped accessing Php to render out the page in the browser.
Does anyone have any experience of this, or any suggestion as to what may have occurred?
The document root of a ZF2/ZF3 project is public, so you should use one of the strategies exposed in the quick start to either:
set the proper document root on your server
use the php development server
use vagrant and a VM
use docker
You could also access the address with typing /public at the end, that will probably not work at some point for your assets though. Then you will need to fix your basepath.
Related
I'm using Laravel with intellij and whenever I run my project this is what it looks like in the web browser
I'm not sure if I set up Laravel correctly on intellij. I set it up for XAMPP because I thought that was the problem however my pages are still looking like the image above.
probably it's not laravel problem. Maybe is better to setup local server in right way. You can try:
php artisan serve
under laravel root dir and then open in http://localhost:8000 in browser
Those icons are trying to use php built in server and may not be configured to match your laravel project. I get the same thing as you with localhost:63342 when clicking web browser preview icons in my Symfony project. I just configured phpStorm preview icons to load based on my web server root.
When using laravel, trying to load your blade views directly will most likely run into issues. Your request is not being mapped to a route/controller for it to be properly handled. For my symfony project and after configuring phpStorm, i get sent to app.dev/app/Resources/views/test.php, which is not a valid route (proves point of previous sentence). You will most likely get the same issue in your laravel project.
You can configure your phpStorm preview icons to load to your localhost:8000 / app.dev or whatever you may have set your app host to.
Follow the below phpStorm articles if you want to mess with this some more.
https://www.jetbrains.com/help/phpstorm/2016.3/working-with-web-servers-copying-files.html
https://www.jetbrains.com/help/phpstorm/2016.3/creating-a-local-server-configuration.html
I installed Symfony2 on Windows 8.1. The files are stored under IIS in wwwroot.
Everything runs very well when I use the internal built-in PHP server. I can access the site through localhost:8000/app_dev.php.
When I try to access the site straight through localhost (localhost/test_project/web/app.php), I can get to the site, but it doesn't update with my changes even after I close the browser and completely reload the site. I have the same problem on the internal PHP server when I try localhost:8000/app.php - my changes aren't there.
Questions:
1. Why are my app and app_dev showing different content?
2. How can I set up Symfony to run on IIS and not need the internal server?
Because app.php uses cached files and you need to clear framework cache to see your changes. It is production version of your web.
php app/console cache:clear --env=prod --no-debug
localhost/test_project/web/app_dev.php
Please look at official Symfony documentation for explanation.
Anyone got ANY idea what could be causing an issue with Zend Navigation. My environments are provisioned through chef and are the same OS etc, same apache setups etc. On my local Ubuntu VM, my webapp renders correctly. The SAME code fails to render the navigation on my TEST VM (on AWS). When I say the same, I've checked and double checked (and is all deployed through PHING), including SCPing the no-displaying-correctly-code off TEST back onto my box, where it then works correctly.
I'm totally stuck. Does anyone know any low level quirks about how Zend renders nav? DOes it write to temp files or something (long shot). The issue is a routing one IMO. The menu doesn't think it is active, yet is using the same routes.ini file as my dev environment, where is it fine.
I've tried changing the environment settings (development, testing) etc but nothing. It can't be the DATA as there is no impact on routing.
Really appreciate any insight..
SOLUTION!
Ahh haaaa. The nav appears to have been broken by a revision of Zend. The reason that was not seen locally, is because I am using Vagrant to manage by VM locally. The mounted folder is , of course, a read-ony filesystem, so my "ln -s -f symlink" to the correct vendor of Zend was silently failing in my script, but working on LIVE on AWS - hence they were using different Zend versions and the new release which breaks my nav (!ANother story) was only seen on Live...! Here end-eth the lesson to self. ALWAYS halt-on-failure in your deployment scripts
I'm trying to run a Symfony project that I cloned from a GitHub. I've never used Symfony before but I'd like to run the project.
I read you needed to run frontend_dev.php so I ran that in to my browser:
C:\Users\Computer\Desktop\Project\WebInterface\web\frontend_dev.php
But just got a blank page with some PHP on it. I believe I may have to set up a web server but I'm not sure and figured I'd ask here first.
If I wanted to run the project from my computer, would I just download an Apache server and drop it in the root directory? What variables and files would I need to change to get it working properly? Do I need to forward any ports?
Symfony 1.x branch is not supported anymore. Use Symfony 2.
Anyway, concerning your question: here is the doc for 1.4: Day 1: Starting up the Project
I've been reading through the docs and testing out what i can.
I've installed PHP, Eclipse + PDT, IIS settings etc. - I'm reasonably sure they are all set and should work.
Now I create a PHP Project, add a newfile.php, basic code like :
<?php
echo "hello";
Now I right click the file,Run as -> Web Page and i get a 404.
Eclipse has tried to launch http://localhost:80/Php1/newfile.php
IIS has no virtual or physical directory so the request fails.
Should Eclipse/PDT have done this mapping? Or do I need to? or should I create my projects under c:\inetpub\wwwroot
Eclipse / PDT does not configure your webserver for you. It looks like it's assuming that your document root is your workspace, so you could put all your projects in your wwwroot if you wanted to. You don't need to use the Run As dialog though, as long as the files are somehow visible to IIS.
Personally I like to either make a vhost per project, or use symlinks to bring the project directories into the wwwroot.