So I am building a website for a client. I have the site in my htdocs folder within xampp as well as in a folder on my desktop.
I developed the home page a few days ago and everything has been working fine on it. I have a css file in a css folder, and I have images in an images folder. My file paths are correct, I know for a fact because I have spent the last 30 minutes checking them. My tag is set up correctly, and my images names are correct.
I have validated my html and css and both are 100% correct. I know with out a doubt that everything is as it should be. All I did was add a media query to the bottom of my css document, refresh the page to check it, and all of the styles and images are gone.
I have removed the media query, I have check back up of the file that should work like it did yesterday, and I have crawled up and down my code. For some reason neither the desktop or the xampp version of the page are working. I have exhausted all resources in understanding why this is happening. I thought it might be my computer but every pages I have been to is working fine so it has to be something in my files, only I have checked everything I can think of.
Has anyone had this problem, and can anyone think of something that I might have missed?
After deleting my meta tags (out of desperation, I don't know how I would have reached this conclusion) the file started working again.
I had copied the meta tags from another site I built to save myself some time. I went through each one to see who was causing the issue, and it turns out that this:
<base href="http://designsbygabe.com/" />
is the issue. I'm not sure how relevant this tag is. CMS made simple auto generated it on the site I copied it from.
I can only assume that because I am running off of xampp but telling my document that The above href is the base that it confused the browser. I don't really know though.
the weird thing is that I added these yesterday and the site work up until a few hours ago.
I guess the lesson here is that when in doubt you should check your meta tags.
Related
Go figure.
A single php Include worked for several years on my site. Now it suddenly stopped.
\\
<?php include('ps_navigator_SOLO_AN_2016_Canvas.html');?>
\\
A link to the HTML page (FYI: HTML page is in a subfolder), that contains the above php, suddenly stopped working. Browsers, instead, tried to Download the page.
An .htaccess file was updated (apparently) by BlueHost (Apache) recently. I reverted to the previous one that worked.
Now, the link to the HTML page works again, but the php Include on that HTML page doesn't.
The Canvas file that is no longer included in the HTML works in the folder on its own. So it appears to still be in working order.
The HTML or the div has not changed since the time when it worked.
A PHP Test file works in these folders.
BlueHost Tech Support has told me "Not our problem."
I'd love to hear some ideas on this.
Thanks
Hello and thanks in advance for the help. I am running a LAMP server on my raspberry pi and I need help creating a registration and login page using mysql database. All my php files have to be in the /var/www/html. I've been googling this for about a week and I have some questions.
Where do I save css files
Can I make a subdirectory in the html that will create a website (I have tried to do this already but when i navigate to the site it tells me the page isnt working)
How do I make it secure (this is for a personal project so it doesnt have to be extremely secure I just want to know some common security issues)
I tried to follow http://www.allphptricks.com/simple-user-registration-login-script-in-php-and-mysqli/ steps and it showed nothing but a blank page.
I am not asking someone to just write all the code for me, I want to learn and understand what I am doing wrong so if you could direct me to a better tutorial or explain it that would be great.
Thanks
First off make sure all of your CSS files paths are set correctly in the HTML files that you are trying to style. As long as the CSS files are included correctly then it should style your page. The final destination of the CSS files should not matter as long as you have the correct path set to the CSS file in the HTML file.
Linking a CSS file to an HTML file W3Schools
All I did was search "mysql php security best practices" I'm sure you can find more but here is what I found (the first link in my case) OWASP
I've got a weird issue lately and I am not sure what causes it. I've got a dedicated box with a few websites on it and it seems like memcache only works on half of them.
2 wordpress websites (both got W3 Total Cache with same settings) and one of them is stuck while the other one works fine. If I manually clear cache from W3 it will work until the next post.
At first I thought it was plugin's fault but then I've noticed similar issues on some of my other sites. For example, when I try to update a php file it will show me the file I uploaded unless the file size is different.
Another occasion was DIR which would point out to the old folder name (the one used when it was uploaded) unless I edit all the files in that folder that had DIR in them.
Any ideas/suggestions?
PS: All these things started happening after I installed php curl on my server.
The weirdest thing in the world is happening to me, and I wanted to ask if anyone has heard of anything similiar to this, and any possible solution. My designer created a website, on his own computer. I implemented his css + html in my code, and I noticed everything was coming out a bit bigger on my website (eg menu was wider, top bar was larger, etc)
After playing around with this for over 3 hours, I decided to just Save the website the designer made to my Desktop. I did this, opened it in chrome, and it was exactly like I saw on the designers site. I then proceeded to copy past the website I saved into xampp- and lo and behold, everything was bigger, JUST like in MY website. I have quite literally no idea what is going on, the exact same files on my Desktop are showing up differently when I copy them into xampp.
Any idea whats going on?
Thanks!
EDIT: To make matters weirder, it appears the enlarging only happens in chrome...
As per the comments
It's rather impossible to ensure that we can narrow down your issue without viewing any code or anything of the likes.
But first ensure that your browser is at proper standard settings.
Make sure you are zoomed out by pressing CTRL + 0 (on windows).
It could've also potentially have been that the stylesheet was missing something, but in this case it wasn't.
I have made a clean install of Apache and PHP on my CentOS6 virtual machine, I have also created a shared folder and use it as my document root.
Everything works perfectly, I can access the website, do all the stuff I want to do and I can edit PHP files on my workstation and they will be immediately up to date when testing in a browser.
However, when editing CSS and JavaScript, files that are "linked" into the website, I run into an odd problem, when doing an uncached reload of the page they don't update the content, they do however update the content-length.
So if I've added anything to a script it will give me the same content, with a higher content-length and attempt to correct this by adding unknown character signs (the square question mark thing).
If I remove something the reverse happens, it recognizes that the content-length is shorter and starts removing things at the end.
This has happened on two clean installs and I've tried to Google for someone with the same problem but the diffuse nature of the problem makes it hard to define.
I've tried all Apache configurations possible for forcing un-cached results all without luck.
The only thing I've found to force it to update is a remount of the shared folder
If you need more information I'm happy to supply it!
While I was beginning to suspect that the problem was not in the cache, any other problems were slightly out of my reach as I've not worked much with virtualbox.
However, a colleague of mine noted that vboxsf "is less than good" (not in quite those words). So when I had something else to go on a search was easier to define and presto!
https://forums.virtualbox.org/viewtopic.php?f=3&t=1940&p=6680&hilit=shared+folder+apache#p6680
which leads on to this:
http://httpd.apache.org/docs/2.0/faq/error.html#error.sendfile
Disabling them fixed this problem for me!
Well there's definitely some caching going on somewhere.
My strategy for dealing with this is to append the filemtime() of the .css /.js file to the end of the link.
You end up with links like
<link type='text/css' rel='stylesheet' media='screen' href='stylesheet.css?1352889543' />
This way, neither the server nor the browser can possibly cache a file that has since been modified.