I have written code in laravel and have managed it with GIT.
Now I made some changes in the homepage which is not reflecting on the server but working well on the local system.
Things I tried to fix the issue
Cleared the cache, views also manually deleted from the framework folder in storage
Changed the cache method from file to array
Created a new server and deployed the code from git but got the same issue. (Yes the code in html file has the updated code and i can see it using vi and cat).
More importantly i can change the files in other html files in admin folder and it works fine and update is reflected in the browser.
i also tried deleting the view file but it does not work also tried copying the file with new name and using the view but no change in the result.
Please provide me with solution if anyone has ever faced it.
There was a index.html file in the public folder. Which was being called
Related
I have a application know as nexthour cms which I am running using apache2 on ubuntu. I have added all the configuration in apache2 and downloaded all the extensions in php. The nexthour appliaction is based on Laravel. The issue is that there is a server.php file in the root directory. When I ran this file for the first time it went through some steps for installation of the application. Once those steps were done it showed the application but no styling was being shown. The webpage was only showed text when opening server.php file and when I open links like login it takes me to the login page but no styling is applied. When I checked the css file location from source code it shows the path localhost/server.php/css/thecssfile.css but the file is not found.
When I open the public directory all the styling is being applied but the issue here is that it is not able to find the login page when I press login.
When I checked the login page location from server.php file it shows as localhost/server.php/login and it opens fine but still without any styling. Remember that server.php is not a directory it is a php file. Where do I find the login file in the folder as server.php is not a directory?
When I checked the login page location from public/index.php it is localhost/public/login file is not found and I checked the directory and there is no login file or directory.
What should I do in this case? I can not use the server.php file as there is no styling and I can also not use public/index.php as the login page is not found. Please help me out as I a complete noob in laravel or php and this is a application I have downloaded and not developed. Your help will be highly appreciated if someone could let me know whats happening here.
Update: localhost/public/index.php/login works fine but no styling show up here.
Got it all fixed just had to use sudo a2enmod rewrite to resolve this issue.
I've got a legacy PHP project to fix a thing or two. I've downloaded it via FileZilla and served it on my local machine with a local copy of the database. The project is exactly the same with the live one, yet the live one can open the url/contact.html but on my machine it says no such file is found. All other pages go for url/categories/ or url/products/ so I've tried altering the url but no use.
All the other pages within the site are simple: one .php controller one .php model and one .tpl smarty template view. Requiring no .html at all. But this one is somehow different. The .htaccess file is exactly the same as the live version. I've tried adding a rewrite rule to direct every .html to .php but didn't work. I'm lost and out of options, please help? It doesn't even have to be an answer,"Try looking into that" would work too.
I'm working via XAMPP on windows, and I've configured the https:// to http:// on my project but that's all. Even hidden files are checked and confirmed.
have checked that contact.html is a static file (like a real existing html file?)
is there some kind of "routing" within the PHP of the project? If there is route urls might be really anyware.. in the mysql database, redis, a json file and whatnot.. have seen them all.
try to debug where and how it works on the "production" server by using some logging to a file edit the file through filezilla and log to a 'mylog.log' file until you find out what is going on.. or if the site is not used all the time by clients - you can just try to echo stuff to figure out how this exact /contact.html works
I have an Angular front end and PHP back end for my website. I remove a couple images from Angulars assets folder using PHP and its unlink function:
$myFile = "../src/assets/images/".$name;
unlink($myFile) or die("Couldn't delete file");
The images are getting deleted, they are no longer present in the images folder when i check. However, the angular application is still displaying them, despite emptying the cache and hard reloading of the page. I even made changes to the angular app to initiate a recompile, after which the 'deleted' images still displayed.
I'm not sure what the issue is.
I assume that you are talking about dev mode, using ng serve. When you modify the assets folder, you usually need to stop and restart ng serve, not just making a change to restart compilation.
I'd advise that you keep the assets folder for static assets that wont be modified, and have another folder for images that may change dynamically over time.
Something wrong with my assets configuration, it looks to /usr/lib/cgi-bin/assets, which is wrong I guess. How to fix it?
Yii setup is initial.
Apache config:
Nginx config:
I recently also had similar problem with missing folder assets (I don't know how that happened since I have installed Yii2 multiple times and that occurred just once). The difference was only different path to it.
What solved my issue is creation of that folder in specified path (which is /usr/lib/cgi-bin in your case and it should be an empty folder, no need to write anything in it).
After that, Yii2 system should generate all widgets' JavaScript and CSS files automatically (assuming your server allows that). Try to access the website and if you still have the same issue (which shouldn't be the case anymore?), check if there are any files/folders in your newly created assets folder.
I'm setting up a project made by 2 other colleagues and I'm have a problem when putting it online.
On my local machine, everything works like a charm but online I canĀ“t link any file at public folder, php scripts, images etc...
Does anyone knows if there's anything at symfony config's that can make this behavior?
I figured that out.
The images were visible if I link to them directly like www.example.com/uploads/1.png
But the rewrite rule was not working because the .php script was giving an error so the rule was ignored.
Re-arranged permissions of files and folders on public and now everything is working