Symfony 2 without CSS in FF and images in IE on server - deployment

I deployed my site to a OVH server with filezilla following the steps in this tutorial http://pilvee.com/blog/deploiement-symfony2/
After deployment I find that my site works fine but without CSS content in FF and Chrome, so when I check in firebug I find all CSS styles are loaded correctly but empty without content,also JS file are loaded with content and all images too.In IE I have the style that works fine but no image is loaded ??I work on Ubuntu and I use a Virtual Machine to use IE...
I published my asset with assets:install web,I almost did everything, I cleared the cache and I changed the access rights of all files, I specify for files => 705, the CSS and JS => 604,finally I put everything to 777 but still no change ...
That get me crazy really,i dont know what i do to get my website work,i thinked about rebuild my website again,I liked symfony 2 before but now I hate it...
An idea?

Are you using assetic to manage your assets ?
$ app/console assetic:dump

Maybe
$ php app/check.php
can tell you more about your host configuration.

Related

Can't login to the backend of a fresh TYPO3 install

Here is what I did:
Downloaded zip TYPO3 11.3.0 from https://get.typo3.org/version/11
Unzip into /subfolder
touch FIRST_INSTALL
Followed instructions of the setup wizard with new database
Try to login via /subfolder/typo3/ and enter credentials
/subfolder/typo3/login?loginProvider=... leads to a 404
What I already checked:
typo3temp/var/log/typo3_[...].log is empty
MAMP logs don't show anything suspicious
Install Tool Environment Status shows a weird error:
http://localhost:8888/subfolder/typo3temp/assets/e35bd633.tmp/e77fab4e.php.wrong: unexpected content PHP content
Install Tool Directory Status is all green
Original .htaccess file exists
Created typo3conf/sites/mysite/config.yaml by copying from an existing (working) project, TYPO3 10
Of course, before I created the site configuration YAML, /subfolder/typo3/login?loginProvider=... was leading to a "no site config" error.
Now, it feels like there is a problem with the .htaccess, but I can't pinpoint where.
Running Apache / PHP 7.4.12
You have to make sure to use the proper .htaccess configuration for CMS 11, so you can't just resue the one provided with CMS 10.
Have a look at this documentation of the related breaking change in TYPO3 CMS 11
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-93048-BackendURLRewrites.html

Can I make TypeKits fonts work locally even if I'm not using a webserver (no localhost)?

I'm just playing around with an index.html file and an accompanying CSS file that I'm viewing in my web browser. How do I allow this to work with TypeKit? I know I can have it work if I have a webserver with localhost running, but in this case I don't.
If you have some working webserver, you can configure the typekit to use that domain, upload the index.html there, and then rip the typekit CSS to use it locally. The fonts are included as data URIs.
To do that, for example, in Chrome: Open the dev tools, go to the network tab, reload the hosted page and look for a CSS file from use.typekit.net (d?abcde2134...). Then copy the data from the preview tab into a local CSS file and you're good to go.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Zend Framework Setup on Hostmonster?

I have created a project locally using Zend Framework 1.11. I have spent a long time learning the basics of the framework from all the online tutorials I can find, and I now feel fairly comfortable using the ZF Tool and locally working on my project on WAMP. I decided it was time to upload my project and deploy it on my shared hosting server, which happens to be Hostmonster.
After uploading my project, I have been struggling to get it to function correctly on the remote host. I have successfully uploaded my Zend Framework Library and included it in my PHP.ini, and all tests show it is seen by the server.
My directory structure, which was originally created to the standard format by the ZF Tool locally on the command line, is not pointing to the same paths on the remote server, so everything was messed up when I navigated to the Project/public folder. After much more Googling, I found several posts by various bloggers related to modifying .htaccess files, etc., which resulted in all my other sites hosted on the server being disrupted.
The closest I have been able to come to re-creating my initial local site on the Hostmonster host is by:
Taking all the directories out of my "public" ZF folder, and putting them directly in the web root of my server, (public_html), and:
Changing the 'APPLICATON_PATH' of my index.php file from the ZF public folder with the path to my ZF library (changed to reflect where it is in relation to the new location).
With this (tedious) setup, I am now seeing my index view being rendered with all CSS and Javascript, but I am unable to navigate to any of the other views, and the form I have displayed via a view script is likewise not showing up, only the index view is rendered.
My Zend Framework Library is located in a directory in the web root-- public_html, with the php.ini adding it to the include path.
This is becoming very frustrating as I like a lot of the features of ZF, but the restructuring of the site is proving impossible. If anyone has instructions or experience with this setup, I would greatly appreciate it. I am also hosting multiple other sites on this server, so I'm hoping I don't have to change from the single php.ini configuration(5.3) I'm currently using or mess around with a bunch of .htaccess files.
Thanks for any help anyone may have!
I have ZF running on HM no problem. Just place your index.php and .htaccess in your public_html dir, and what I did was created a public_html/zend/library folder and in my index.php including that library to get things working.
Also what do u mean you're running other sites off this server? Are you serving the application on the root of your domain? ie in your http://domain.com/ path? or different subdomains?

Zend framework deployment on the shared hosting

I want to deploy my project made in zend framework to my shared hosting.
My project has such structure:
application
docs
library
Obsolete
public
scripts
tests
This is what I have done:
I copied Zend folder (all library files) into library folder
I copied all the structure above into public_html/projects/project
(so if I type www.mydomain.com/projects/project/public I run the project
I tried to click on some link so that it redirected me to www.mydomain.com/projects/project/public/someController/someAction
Unfortunately all i see is a white, empty page.
Locally (using Zend server CE) it worked perfectly
Here it looks like Zend doesn't recognize that it should do anything with this url and redirecto to appropriate action.
What have I missed?
Greetings!
The reason you see empty page instead of errors is that error_reporting is probably off by default on your production server.
You may change the settings concerting displaying errors and exceptions in application.ini.
The other cases the errors are not displayed is something goes wrong in the view (eg. view helpers), which must return string, not the exception.
Things to check:
paths
include_path
permissions to write for files/dirs which do require this
PHP version
.htaccess setup
stating the obvious here but I'd check your apache error log.
You should check if the server is running php as a module or CGI, in the later case it will not read the SetEnv of .htaccess and you will have to set to development mode in index.php by hand, or specify your config in php.ini