Relative links in php file not working anymore
-
With new version of vivaldi (and chrome) in Windows 10, php files that were formerly working correctly for years and years are not working correctly any longer. Relative links are adding the *.php file itself to the link. For example at
awebsitename.com/filename.php
, if there is a link in the php file such as
<img src="piano/images/pianosketch4.jpg">
instead of going topiano/images/pianosketch4.jpg
, and displaying this image, what is happening is vivaldi is linking to a (nonexistant) image atfilename.php/piano/images/pianosketch4.jpg
.
So no image is displaying. Same thing with links to other files. Vivaldi throws in filename.php where previously it wasn't doing that. To make my php files work i would have to go through all of them and change all the relative links to absolute links. Vivaldi is still parsing html files correctly. Chrome has the same problem. In newest version of vivaldi in my windows 7 computer, things are working correctly. -
Things work correctly in windows 7 and in windows 10 they work correctly in Edge and internet Explorer. Only chrome and vivaldi in windows 10 have the problem.
http://shakahara.com/pianopitch2.php
Also if I move the pianopitch2.php file to a subfolder and adjst the links to subfolders of that, things work correctly. It is only when pianopitch2.php is in the public_html folder that things don't work. Web site on shared hosting, is being hosted by jumpline.com. -
After many hours, problem seems to have fixed itsefl. I did send a message to jumpline's support people a few minutes ago.
-
Jumpline said they reverted the php version back to 5.4. After that I went to cpanel and changed the php version to latest version they had, 7.2, and my php program continued to work properly. So I don't know why but 2 of my message board stopped working with php ver 7.2. Maybe i just need to update the message board, which I have been neglecting to do for a long time.
-
@Gwen-Dragon Yes looks like its a hoster misconfiguration. I originally put the message in the Vivaldi message area, erroneously, because I had observed that the problem had occured in vivaldi and chrome, but not in edge or internet explorer. I couldn't figure out if was a vivaldi bug or a php bug so at about the same time I also sent a support request to the hosting company. By the time I wrote the messages I had already spent about 4 hours playing with the php file and looking at web pages returned by searching in google.com for "relative links in php file not working anymore"
-
@Gwen-Dragon Well, I multiple times hit the reload button or the F5 key in each browser. My understanding is that is what you do in order to make sure the page is coming anew from the server, rather than from the web browser's cache that is on my computer. No? Also worked in Vivaldi and Chrome on my other computer, my Windows 7 computer. I updated Vivaldi on that computer and the page still displayed correctly.
-