Problem with IE and Safari

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Hijumes
Forum Newbie
Posts: 4
Joined: Mon Oct 25, 2010 7:01 pm

Problem with IE and Safari

Post by Hijumes »

I am using an ad rotation program using php. The program works well on Firefox and Chrome browsers but not on Safari and Internet Explorer. On internet explorer the following error is given for the three different places the ads would be:
Message: Syntax error
Line: 1
Char: 1
Code: 0
URI: http://www.ilove.mn/adpeeps/adpeeps.php ... gspacing=1

The beginning of the php (line 1 through 5) code is:

<?php
ob_start();
error_reporting(E_ERROR | E_WARNING | E_PARSE);

if ((file_exists("sessions")) && (is_writable("sessions"))){ @ini_set('session.save_path', 'sessions'); }

I am new to php. What is the problem with line 1?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Problem with IE and Safari

Post by requinix »

Have you tried visiting that URL yourself?
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Problem with IE and Safari

Post by cpetercarter »

If the problem appears in some browsers but not others, then it is unlikely to be a php problem (because php runs on the server, not the browser). More likely to be a problem in whatever javascript your add rotation programme is trying to load,
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Problem with IE and Safari

Post by requinix »

Hmm.

See, when I click that nice, friendly looking link I get this not nice, not very friendly looking error message:

Code: Select all

<b>Warning</b>:  fopen(geodb/GeoIPCity.dat) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/home/ilovem10/public_html/adpeeps/geodb/geoip.inc</b> on line <b>343</b>
Can not open geodb/GeoIPCity.dat
Hijumes
Forum Newbie
Posts: 4
Joined: Mon Oct 25, 2010 7:01 pm

Re: Problem with IE and Safari

Post by Hijumes »

tasairis wrote:Hmm.

See, when I click that nice, friendly looking link I get this not nice, not very friendly looking error message:

Code: Select all

<b>Warning</b>:  fopen(geodb/GeoIPCity.dat) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/home/ilovem10/public_html/adpeeps/geodb/geoip.inc</b> on line <b>343</b>
Can not open geodb/GeoIPCity.dat
This is the issue and it only happens on IE or Safari, not Mozilla and Chrome.
Hijumes
Forum Newbie
Posts: 4
Joined: Mon Oct 25, 2010 7:01 pm

Re: Problem with IE and Safari

Post by Hijumes »

The code for line 343 is:

Code: Select all

$gi->filehandle = fopen($filename,"rb") or die( "Can not open $filename\n" );
I have a file "geoipcity.inc" in the folder geodb but not one that is "geoipcity.dat" . If that is what the program is trying to find should I duplicate the geoipcity.inc and save it as a .dat file?
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Problem with IE and Safari

Post by cpetercarter »

On my computer, I see the error message in Firefox and Chrome.
I have a file "geoipcity.inc" in the folder geodb but not one that is "geoipcity.dat" . If that is what the program is trying to find should I duplicate the geoipcity.inc and save it as a .dat file?
Try it and see!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Problem with IE and Safari

Post by John Cartwright »

Hijumes wrote:The code for line 343 is:

Code: Select all

$gi->filehandle = fopen($filename,"rb") or die( "Can not open $filename\n" );
I have a file "geoipcity.inc" in the folder geodb but not one that is "geoipcity.dat" . If that is what the program is trying to find should I duplicate the geoipcity.inc and save it as a .dat file?
No. You need them both. One is an includes file (which includes neccesary functions to work), the other is the database file.
Hijumes
Forum Newbie
Posts: 4
Joined: Mon Oct 25, 2010 7:01 pm

Re: Problem with IE and Safari

Post by Hijumes »

I finally got in touch with the ad rotation company and found out that the problem was a missing .dat file. Internet Explorer and Safari picked up on the problem and wouldn't load the images. But Firefox and Chrome ignored the glitch (for a while) and kept the ad program running. After about a week those browsers stopped ignoring the glitch and wouldn't load the images either. Now that I have the .dat file up on the server everything is running nicely. Thanks for the help and responses everyone.
Post Reply