473,800 Members | 2,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP and Opera compatibility

2 New Member
I'm working on a fairly simple website, built in PHP, to allow members to post their old items for sale. I've been beta testing it for two weeks, and everything has worked perfectly so far- but then one of my beta testers came to tell me it's not working properly in Opera.

I know many people here have said that problems in PHP with different browsers must be the HTML rather than the PHP, but this is not the case here. I've only been looking into this for a day or so but the two problems I've found are:

-Once logged in, all the menus visible only to users logged in appear properly. Users can also submit an item, which is an option only available to registered users as well. But when they go to the User Account page, they receive an error message- even though the script to check for Not Logged In is the same for all three items. And it's all in PHP.

[PHP]
$alreadyin=$_GE T["userid"];
if(!$alreadyin) {
echo '<font color="blue"><b >Error</b>: You are not logged in!</font>';
}
if($alreadyin){
[/PHP]
And the viewable code goes in the $alreadyin loop.

-I had an item waiting to be approved on the database- an Admin presses a button, and a section of the database is changed from process=0 to process=1. I ran this script in Firefox, and the item appeared in the Items for Sale list and disappeared from the Items to Approve list. But when I went back to Opera, the item appeared in BOTH lists. It then disappeared a couple minutes later. Similarly, if I submit an item it takes a minute or two for Opera to register it on the Items to Approve list. This is almost closer to a SQL problem, but based on the first issue I'd guess that this is due to the PHP code as well.

Is there a time lag using PHP in Opera? Does anyone know anything that could be causing this problem that would allow me to fix this delay? I don't want my users to have to wait two minutes after they click the log in button to be able to use their accounts!
Oct 24 '06 #1
5 1937
iam_clint
1,208 Recognized Expert Top Contributor
PHP is server side coding would have nothing todo with the clients browser... I am going to assume it has something todo with cookies and cache in the opera browser.
Oct 24 '06 #2
TheMadMidget
98 New Member
I'm having problems with Opera aswell, but by problems are related to the cache and cookies, people appeared logged in when out or even worse, appeared as the last user on that computer and can sometimes see some unvital info.

The only problem I can perceived from the code you posted is the you are using $GET["userid"] to get the information, that means that the url includes ?userid=somethi ng which is either just carried over from the last page or came from a form (method=get), either way is a security risk if that's the only verification you have.
Oct 25 '06 #3
ronverdonk
4,258 Recognized Expert Specialist
Your code (as shown) does not show any security verification at all! You simply take any userid that is passed in the url and when it is passed you assume that the user is valid.

So in my browser I could type in your url followed by '?userid=johndo e' and I am in. I hope this was just part of the code and you have some checking based on sessions, database or cookies implemented.

Ronald :cool:
Oct 25 '06 #4
Marri
2 New Member
Yes, there is much more checking (against users in the database and such) but I didn't include it so the code would be shorter, clearer, what have you.

And yes, the issue does seem to be with caching and cookies. I've talked to the IT department here about it, and they've given me some tips, but I thank you all for your time anyway :)
Oct 25 '06 #5
TheMadMidget
98 New Member
I've got some info that should help. I looked through some Opera help pages and found this to basically disable the cache
[HTML]
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
[/HTML]
This fixed page to page transitions, but it still took a refresh after logging in to actually log people in. What I did is made the redirect page from logging in to a browser detect page.
[PHP]
if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGEN T']))
{
//display Opera error and make <a> to originalLogInRe directPage
}
else
{
header( 'Location: http://originalLogInRe directPage' ) ;
}
[/PHP]
Apparently the cookies don't update with only one page transition. I tried using a header( 'Location:'); alone to make another page transition, but it didn't work. I also tried to use Javascript and document.locati on, but this didn't work either.
Combined, these methods "fixed" everything.
Hope this helps.

Jason
Nov 23 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6264
by: Headless | last post by:
The following code renders a visible border around the hyperlinked image using the UA's default colours for links in IE and Moz: a img{border-width:1px} <a href="foobar.html"><img src="foobar.jpg" alt="foobar"></a> but not in Opera. I imagine that border colour normally defaults to transparent, but
6
481
by: someone | last post by:
Suppose that I have a class in an assembly that is delivered to the user, what can I do to change the class so that it doesn't break the binary compatibility? That is, user application can run with recompiling and relinking. I know that if I define an interface, and only expose the interface but not the class which implments the interface, I can add a data member to the class without breaking the binary compatibility. If the class...
11
2030
by: Marcos | last post by:
This script not work with last Opera 8, but its work with Internet Explorer and Firefox, the HTTP Request yet not work fine on the Opera? function sendmessage(url, querystrings) { xmlhttp = checkxml(); if(xmlhttp) { xmlhttp.open("POST", url ,true); // Method and URL destination
4
4851
by: Ross | last post by:
I have been using the following script to return a scrollbar to the position it was in before the data was posted. It works in ie but not in firefox. Thanks, R. <script type="text/javascript"> window.onload = function(){ var strCook = document.cookie;
14
2327
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the .exe (on the network drive, on the server) "Full Trust." From the client, double-click on the ..exe (on the network drive, on the server) and it runs fine. So far, so good, but... On the server, where I've installed not VB.NET but .NET
2
1323
by: Mark Rae | last post by:
Hi, I've just finished upgrading a site for a client to XHTML-compliance. It's been tested on the latest versions of the following OS / browser combinations: WinXP - IE WinXP - Netscape WinXP - FireFox WinXP -Opera
3
8468
by: balakrishnan.dinesh | last post by:
hi frnds, In my html code, i have used <hrtag. Im using it as "<hr color=red>", So the respective hr line color is red in Mozila and IE browsers, But it is not showing the color in Opera browser, It just showing the line as black. Can anyone tell , how to color the hr tag line for opera browsers. Rgrds
7
1298
by: Dr J R Stockton | last post by:
I've heard that at <URL:http://www.merlyn.demon.co.uk/js-clndr.htm#P> and using Opera the suffixed dates in the yellow box appear in a single long line instead of in the obvious weekly manner. It's OK in IE 4 & 6. That sounds as if if (++k%7==0) document.writeln() is not working in Opera. Any explanation and/or suggestions? In particular, I'd like to know whether the circumstances will apply elsewhere on the site.
9
1888
by: crater | last post by:
The following function is not updating an image in opera 9.02. upd_on = new Image() upd_on.src = "images/update_button.gif" function enableUpdate() { var update = document.getElementById("cart_Update") update.disabled = "" update.style.cursor = "pointer" update.src = upd_on.src }
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.