Unconsistent data retrieveing from database - php

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?

Related

Cookies in Iframe page loaded with Curl

On http://aegon.nl you'll get an opt-in which only displays when you haven't got the right cookie set for the website.
Now I'm trying to load the website in an Iframe with an injected file (to do some fancy stuff with javaScript). To be able to do that, I need to CURL the sourcecode and change the base href to "aegon.nl" in order to show the same layout (for the url's to the stylesheets and such).
Now, been there and done that. But now I've got a problem with the cookies. I can click the button in the opt-in as many times as I want, but It keeps coming back. I only have this problem after CURLing the content and changing the base href.
After searching the sourcecode I think I found the problem:
var dom=(window.location.hostname.indexOf(".")>0)?'aegon.nl':window.location.hostname;
var AEGONCookieSettings = new AEGON.CookieOptIn(dom)
Probably the problem is solved by changing this part of sourcecode.... But that doesn't solve the problem for the other websites which are using the same kind of opt-in.
Does anyone have a solution for this?

link is changed when page is loaded

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.

What is the file path of the main page (home) of a Magento store?

I need to locate the file that manages the main page of my online store developed with Magento (which would be the index.html). I just need to change a link, and I've used Firebug shows that the file i need to edit is "misitioweb.com" (the main page) but the document itself does not appear in the ftp. The initial page consists of a bunch of XML, and PHP's PHTML. If someone wants to see the address page is http://peluches-cel.com and only want to change the destination URL of the link "Peluche del mes". I have used the help of Magento to show "Help template route" and I downloaded the 4 files that are more likely to manage that area of the page, but I can not find the part where specify the destination URL of the link. I have always worked with HTML or PHP separately (I have little experience with PHP) and I find it very difficult to understand how Magento builds each website. If someone could give me a little hint on how to achieve change that link would you do me very happy, it took a long time trying it on my own and looking online but can not find how to do any guestbook or forum that explains how to work well with Magento, in my language, there are hardly any documentation on Magento, so I decided to try my luck in this forum and I've read on several pages that involves many professionals in the e-commerce. Thanks in advance to all who devote their time to read my question.
I don't really understand what you want.
But if you want to change the base URL, you can do that by accessing database via phpMyAdmin, find the table core_config_data and change the URL in the web/unsecure/base_url and web/secure/base_url to what you want.
Not the url of the page, but the url of a link. Try clicking on "Peluche del mes" and see what comes out, gives access to http://www.peluches-cel.com/peluche-del-mes, I want access to http://www.peluches-cel.com/oso-tiziano-2col-40cm directly. The problem is NOT EXISTS peluches-cel.com/oso-tiziano-2col-40cm page on FTP, to be done in PHP there are different functions that are responsible for creating it at the time of the request I need to change the link to "Peluche del mes", if you see with firebug or any other source code analyzer, the source code of the page you will see that line 146 is managed that link, but I can not directly access the code ¿do you understand me? through an ftp client no such file or html as php magento works with the model view controller, that's my problem. Thank you again.

Hide Javascript file from Analytics

I apologize ahead of time for the non descriptive title, as I wasn't really sure how to word this.
I've currently switched some of my Wordpress sites that have a responsive design that implement a slider over to WooSlider. Works super well, and I love it. However, there is something stopping me from switching all of my sites over. And I understand this is not a WooSlider only fault, but it's something I cannot Google and find out.
This is happening on every page view, even those without a slider.
In Google Analytics it shows domain.com/?wooslider-javascript=load&t=1352743207&ver=1.0.0 as a page view. For every single page. I obviously don't want this, but I don't know how to get rid of it.
Another example of this happening is using Gravity Forms with a referrer info plugin that shows page views, search query, browser, etc.
When the form is sent, the following is sent via email.
Page visited 1: domain.com/?wooslider-javascript=load&t=1352743207&ver=1.0.0 (http://domain.com/?wooslider-javascript=load&t=1352743207&ver=1.0.0)
Page visited 2: domain.com/about (http://domain.com/contact/about/
Page visited 3: domain.com/?wooslider-javascript=load&t=1352751787&ver=1.0.0 (http://domain.com/?wooslider-javascript=load&t=1352751787&ver=1.0.0)
Page visited 4: domain.com/contact/ (http://domain.com/contact/)
So obviously I don't want that js file to show up as a page view. How can I remedy this?
Thanks!
Google Analytics Configuration Mistake #2: Query String Variables
wooslider-javascript,t,ver

Best way to display a message for users that came from a specific page on the website?

I have a quick question on the best way to show a particular message to users that navigated to a page via a particular link on the site.
The situation is I have a sidebar on the website and two of the links will point to the same page - one of them used to point to a page containing a form but now I want to change it to point to the same page as another link and display a message for users that clicked this particular link.
I tried changing the htaccess file and using HTTP_REFERER but because theses links are in a sidebar on every page that doesn't work - never thought that one through at the time!
Now I have tried simply changing the link and adding a parameter on the end, e.g. /page.html?question=yes and then doing the following on the page:
if ($_GET['question'] == 'yes')
{
echo '..................';
}
But that doesn't seem to be working either so I was wondering if anyone had came accross a similar problem and how they went about solving it?
Using $_GET and Querystring is the best match for you, but I'm not sure your file extension is being processed properly. Try to change .html to .php

Categories