Ok I found a previous posting but there was no answer to it. Here is the posting I am having a similar issue : Why is my HREF address being changed
I am trying to set up a login page and I'm trying to link to my local host for now so I can test it.
the path to my connection file should be as such
../Connections/my_Localhost_test.php
but for some reason when the page is loaded it is showing this as the path name and the page name as this
C://..full path... /TMP4z9j7qnj5c.php
I don't understand why it would do that instead of throwing an error about not connecting to the database. I have tested the database connection and it works fine.
I would put this on a jsfiddle but I have multiple pages and I'm not quite sure what would be causing the issue so that I can add it there.
Not sure if this is related but previously I was also having an issue where when I click on a link that is a relative path it was changing the link in relation to the last page not the link that I clicked on, so something like this:
link 1
link 2
so if I'm on the page from link 1 and click on link 2 it was showing the page as not there because the url was redirecting to the main folder and then not going into the about folder and searching for the page in there.
Any ideas guys?
You can Define base url. Try this code :
defined('ROOT_PATH')
|| define('ROOT_PATH',"http://".$_SERVER['HTTP_HOST'].substr($_SERVER ["SCRIPT_NAME"],0, strlen($_SERVER ["SCRIPT_NAME"])-9));
And print ROOT_PATH before your href.
In case anyone else was wondering I got a response from Adobe on this issue. I didn't realize that Dreamweaver had this option. Here is their response.
That's a temporary page. It's created specifically for previewing.
You "should" be able to turn it off in the preferences...
Edit > Preferences >select Preview In Browser > uncheck the "Preview using temporary file" checkbox
EDIT: OOps, forgot the Preview In Browser selection.
Related
I could create pages in WordPress, but whenever I take that corresponding URL
eg:BaseUrl/page-slug/
the page is not loading, also showing a 404 error. I set the permalink
hostname/%postname%/
I have used the same theme in my local it was working fine but in the server, it behaves like this. Please anyone can help me?
Would you please save permalin?
Step 1 : Goto wp-admin->setting->permalinks
Steps 2 : After save changes
This usually happens if something goes wrong with rewrite rules or your .htaccess file gets deleted. You should fix your permalink settings.
Go to Settings> Permalinks and click the Save Changes button. That should solve your problem!
First off, I ran into this issue when transferring all of my files from my localhost (wamp server) to my web server via FileZilla. Everything works great on my test server but when looking at it on my domain it doesn't appear the same nor does it function the same.
I tried to research this issue before asking and closest thing I found was this question here which doesn't help me with my specific problem.
What my test servers looks like and how the website should function on the web-server:
Show the sign-up and sign-in buttons on the navigation bar.
Show the proper content accordingly from the action page.
What my website is doing when uploading it to the web-server:
Shows the sign-up & sign-in buttons when navigating to the website (www.heartfx.org/test)
Does not display proper content like my localhost server does with the action page.
So instead of a user being linked to an external page for each function like login.php, register.php, forgot_password.php etc... they are linked to a single page like http://www.heartfx.org/action.php?action=register_account where I then $_get['action'] and display each "page".
The code on my web-server for some reason doesn't display those "pages" but only the navigation bar on top of the page and nothing under it.
How /action.php?action=sign_in should look(as it does on local server):
How /action.php?action=sign_in looks on the web-server:
Another thing to mention: I also have this question being posted / answered on, on another community where someone had me run the following line down the code until I ran into a spot where the line number didn't echo;
echo '<br>Line: ' .__LINE__; die;
The line number echo'd completely fine until I placed the line of code underneath a showHeader(''); function in my action.php page. When placing the line of code underneath a showHeader(''); function it did not echo the line number as it should with that statement.
We figured it was due to something with the showHeader(''); function which is being included in common.inc.php but cannot figure out what is wrong with the function that is causing it to not display each "page". The code on the web-server is exactly the same it is on the localhost server other then database credentials.
UPDATE: So after sitting idle at an action page (specifically I was at /action.php?action=register_account) for about 10 minutes and refreshing the page the module appeared as it should've when first loading the page. When roaming around the page for a bit and refreshing a 2nd time it AGAIN goes blank and run into the same issue.
Finally tracked down what was causing this issue and how to fix it. Inside of the showHeader('') that I am calling is another checkLogin() function that includes a Teamspeak3 query that displays my teamspeak server. That query for some reason was messing up the rest of my code (including the action.php page where I am trying to display everything.
Also would explain why very rarely I seen the page actually work and refreshing it, again made the page blank (other then the navigation bar) because the teamspeak query was still loading - causing the rest of the page not to load.
To fix this I simply removed the query from common.inc.php as it is not a mandatory function to have on my site. Thanks to everyone that helped me track down the issue.
/*
// Don't report any php errors.
error_reporting(0);
// load framework files
require_once("includes/libraries/TeamSpeak3/TeamSpeak3.php");
// connect to server, authenticate and spawn an object for the virtual server on port xxxx
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://serverquerylogin:ATJ75oPF#63.251.20.99:14012/?server_port=14010&use_offline_as_virtual=1&no_query_clients=1");
// build and display HTML treeview using custom image paths (remote icons will be embedded using data URI sheme)
echo $ts3_VirtualServer->getViewer(new TeamSpeak3_Viewer_Html("includes/images/viewer/", "", "data:image"));
// Report all php errors again.
error_reporting(-1);
*/
I have a database that stores the link. This value "link" is later read by my script and a user can click on a link to go to that link.
The links work with no issue when the user is on any page that is saved/hosted in the root directory /myroot/
But when a user clicks on the link while on a page the is saved/hosted on a different path saved on (ie. /myroot/news/feed.php) the link does not work.. "it seems to me that the script is not ale to tell where it is currently located so it does not know where to take you)
I tried to provide the root path of the site (ie. /myroot/{the link} but that did not work either.
How can I fix the URL so that the script knows where is the true location of the file?
thanks
You need to specify a starting point so you can give absolute links instead of relative links. Look through the $_SERVER[] array, there are some elements that tell you where your directory location is on your site.
My Site is Working well with url
www.softsystems.org/site&name
I wanted to make my site URL
www.softsystems.org/sitename
For this I cahnge Wordpress Directory Name site&name to sitename
but the site does not work,
I tried 2,3 times,Updated db Links,
I installed Fresh Wordpress, but no Success after 8-10 hours,
Please Guide me in this Regard so that I can get rid of this problem,
I would try these 2 options :
1 - Go into Settings > Readings, set the Front page to a another page then save. After, put back the Front page to the correct page and save again.
2 - I would do the same thing with the Permalinks. Go into Settings > Permalinks and change it to something else and save. After put it back to what it was and save again.
This is what fixed it for me when I got the same problem.
Recently a problem occured in functionallity of my website and I cant get any idea why this is happening.
The problem is that i can't get almost any data from database. In some cases there is possible to retrieve text for an article but in most cases it is not happening.
Here is example.
If i open page via this link http://www.positive.rs/racunari?id_tip_komp=55&artikal=20068 it will open that page.
But if I choose any other link it will open home page of webshop.
And on some other section of site i can open links only if URLs arent rewriten (http://positive.rs/medija-centar?page=novosti&more=windows-8-pro-upgrade-za-8-hiljada-dinara) but using rewriten URL i cant get it to work.
I've cleared .htaccess but those attempts were unsuccesseful.
Any idea how to solve this problem?