Laravel CSS files not found and No styling applied (Apache2 Ubuntu) - php

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.

Related

How can I see my php scripts files in MAMP?

I'm trying to learn PHP and I've installed MAMP (5.0.4)
I see that my files are in MAMP\htdocs
if I create an index.html file in place it in that direction how to I get it to show.
I fire up MAMP (server and mSQL are on)
I click on the OPEN WebStart Page
it opens http://localhost:81/MAMP/
If I type in index.html after that (http://localhost:81/MAMP/index.html)
I've also tried adding htdocs in the path
I am getting a 404 error.
I know it's got to be something simple
When MAMP loads up it actually gives you options to go to the website or myphpadmin site
if you want to jump directly to your site then just use.
None of this will work if you do not set the project in preference to the directory of the project you are working on
http://localhost:81/

How to install wordpress on website using direct admin

I'm a complete noob with wordpress and i'm trying to install it on my server.
I'm following the instructions on this site but when I get to step 5 and I go to the http://example.com/direct-admin/install.php I get this error:
Not Found
The requested URL /wp-admin/install.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
In my folder 'example.com', located in the 'domains' folder, I started with only stats and logs folders. The first time I added the Wordpress files in the 'example.com' folder.
I tried adding a public_html folder and putting the Wordpress files in the public_html folder but that didn't work either.
How can I install wordpress on my website?
What server are you using? There are several ways of installing WordPress, I would strongly recommend using the WordPress CLI to install WordPress. All you have to do is follow these steps:
Download the WordPress CLI using these five steps.
Use now the CLI to download WordPress:
$ wp core download
Create the wp-config.php file
$ wp core config --dbname="your_db_name" --dbuser="your_db_user" --dbpass="your_db_password"
And then you can put your website URL in your browser and continue following the wizard, WordPress will ask you what site name, username and password do you want to use.
If you're having trouble setting up a wordpress installation and you're getting 404 errors or "apache is function normally" then it's possible that your DNS/server settings aren't correct, this was my error.
First try creating a .html file with a simple text editor by copying the html markup below into a new file and then save it as index.html
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading<h1/>
<p>My first paragraph.</p>
</body>
</html>
</code></pre>
And upload that to your server.
If you're still having errors you know it's not the wordpress installation that causes these but it's your server settings.
You should:
check if you are putting it in the right folder (like f.e. public_html)
make sure that your DNS configuration is correct
Check this answer for more information on how to setup your server to view a simple .html file.

After changing filename from index.html to index.php my project is no longer served with MAMP

I'm trying to do some PHP learnin' but I've run into a road-block. I have MAMP installed and I am successfully serving my project files locally. However, after renaming my index.html file to index.php, the page is no longer served.
url is: localhost/projectfile/
I can rename the file back to index.html and the page will serve up again but this means my php code won't run.
I've tried digging around MAMP to see if there is some information/ setting that could help but I'm not finding a solution. It would be great if anyone has info on how this could be solved. Thanks!
You will find all the "start page" stuff in MAMP/bin/mamp (e.g. the English language page is MAMP/bin/mamp/English/index.php).
This is due to the following line in MAMP/conf/apache/httpd.conf:
Alias /MAMP "/Applications/MAMP/bin/mamp"
Refer Where is the index.* file that is served as the MAMP start page URL?
For anyone viewing this post- I must have edited a config file in the wrong way. I uninstalled MAMP and reinstalled and everything seems to be working properly now.

WAMP does not open my project

I am completely new to web-dev and wamp, I have to use it for a college project to build a website using php. I installed the newest version of wamp. I cloned my project repository into the www folder.
When I run "localhost" in the browser, I get the generic wamp page and I can see my project folder on the bottom of the page under the "Projects" heading
when I click on the project it does not open and I get a 404 not found error. This is not the same issue a thousands other people have written about, where when they uses the path "localhost/projectname" they get access to their project but when they just click their project the path is "projectname" and they dont see their project. I have read tons of posts with people that have that problem and I do not think I have the same issue becase when I click on my project link on the wamp hompage, I get the complete path "http://localhost/PaperCloudBackend/" and this shows a 404 error
Keep in mind that all I have done with wamp so far is:
1) install it
2) clone repo into www folder
3) opened browser with localhost
4) clicked on my project name
I would really like a concise answer to why this is happening so I can learn the root cause, and also a solution to the problem because i have not contributed to my team codebase at all and I have not been able to solve this issue after 1 week.
Thanks
I assume that its an .htaccess error which is clashing . If you have .htaccess in your project then check it if you have given the correct url in the .htaccess rule or you can delete the file(.htaccess) and run the project in your browser.
Another problem that you should check is there any index file is present in the root of the folder you are trying to access.
I hope this might help you.
Currently thats also happed with me on window8.1, To prevent this open the index.php file from root directory wamp/www/index.php.
Change
$suppress_localhost = true;
To
$suppress_localhost = false;
Hope this will help you to fix the problem.
Please make sure that index file exist in your "PaperCloudBackend" directory as it is the entry point of execution.

Opening Yii Application causes download of index.php

I recently downloaded Yii in my linux-ubuntu system. After extracting the files to /var/www/vishnu/, I went for creating the first webapp.
What I have done is executing /var/www/vishnu/yii/framework/yiic webapp anyname in my command line. It succesfully created the application under /home/ti/anyname
But whenever I am trying to access it, It downloads the index.php file instead of opening the webapp home page! Why does this happen? I tried, the following Urls..
localhost/vishnu/anyname/ - Returns Not Found
home/ti/anyname/index.php- Downloads the file
home/ti/anyname/index-test.php- Downloads the file
I can see the files in file:///home/ti/anyname/ But can't open anything. When ever I click on it, it is being downloaded! Please share your solutions if you have any...
Thank you very much. I got it from this blog.
I changed the command such that, the webapp will point to my localhost itslef.
ie php /var/www/vishnu/yii/framework/yiic.php webapp /var/www/vishnu/yii/anyname/
Now its working... :)

Categories