473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP and Opera compatibility

2
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=$_GET["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 1915
iam_clint
1,208 Expert 1GB
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
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=something 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 Expert 4TB
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=johndoe' 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
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
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_AGENT']))
{
//display Opera error and make <a> to originalLogInRedirectPage
}
else
{
header( 'Location: http://originalLogInRedirectPage' ) ;
}
[/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.location, 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
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...
6
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...
11
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 =...
4
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...
14
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...
2
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...
3
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,...
7
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. ...
9
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 =...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.