Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Thu Oct 12, 2006 8:36 am Reply with quote

Ok here's the problem..

A script that shows a shop of magazines.
all content is grabbed from a magazine provider by feeds.

But we noticed that some function isnt working because their server has php5.
For this to work Register_globals must be ON and its ON. Smile

the error it shows is :

Notice: Undefined index: categorie in index2.php on line 2
Notice: Undefined index: feedid in index2.php on line 3


And on these lines there is :

$categorie = $_GET['categorie'];
$feedid = $_GET['feedid'];

At the bottom the default feed is set like here:

Code:


<?php
$getfeed = "http://www.xxxxx.com&feedid=" . $feedid;
include ($getfeed);
?>

The categorie uses switch ($categorie) to show the content...bla...bla

and thats all the php to be found in the script..

anyone have a great idea why the content isnt showing?
Its deffinately a php5 thing,i tried it on my server (not php5) and all works perfectly.
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Oct 12, 2006 10:52 am Reply with quote

Is allow-fopen-url enabled? [ Only registered users can see links on this board! Get registered or login! ]

The notice errors indicate it is not reading a $_GET value. So where are these variables being generated?
For security reasons, you should probably intval() those variables.

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
hitwalker







PostPosted: Thu Oct 12, 2006 12:29 pm Reply with quote

yes its ON
 
evaders99







PostPosted: Thu Oct 12, 2006 2:06 pm Reply with quote

May need to use something like file_get_contents to see if its reading anything [ Only registered users can see links on this board! Get registered or login! ]
 
hitwalker







PostPosted: Thu Oct 12, 2006 3:25 pm Reply with quote

well that doesnt help much...
i tried even if(!($myFile=fopen("http..bla..bla","r")))
{

and the results are dumped as pure htm like..

Code:
"; $start_position=strpos($myLine, $start); $end_position=strpos($myLine, $end)+strlen($end); $length=$end_position-$start_position; $myLine=substr($myLine, $start_position, $length); // Display HTML echo $myLine; ?>


the above code is correct and not stripped....
btw...the above stuff was to try but isnt part of the code ...
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Oct 12, 2006 6:16 pm Reply with quote

Can you echo the $getfeed variable and see its output?

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
hitwalker







PostPosted: Fri Oct 13, 2006 8:29 am Reply with quote

that also doesnt work....
it just echo's out the full feed url..

an overview.....

like i said....
it uses very litle php in the file..
i forgot to mention that it uses switch to move between urls (feeds) and show different content pages..

in the working version (older) i only has this :

if (empty($_GET["feedid"])) { $_GET["feedid"] = "xxxxxlongfeed id numberxxxxxx"; }
include ("http://xxxx&feedid=" . $_GET["feedid"] . "");

but because the urls of the page ended up like this:

index.php?feedid=VIP3C2C5C25E5FCR3D3D27PM2FHB202745HFJFNJNRT895RHBFJFRIRFJKFDNOILV5BG28PLP20


they decided to use a different approach .
So thats where the switch came in....

like...

switch ($categorie)

case 'movies':
$feedid = 'very long feed number here';
break;

etc and list goes on and at the bottom the default feed is set..

$getfeed = "http://etc...etc..&feedid=" . $feedid;
include ($getfeed);

and the first real php is on top of page with:

$categorie = $_GET['categorie'];
$feedid = $_GET['feedid'];

thats all the php in the file..

and for some reason this results in this :

Notice: Undefined index: categorie in index2.php on line 2
Notice: Undefined index: feedid in index2.php on line 3

(index2.php is the test file)
 
evaders99







PostPosted: Fri Oct 13, 2006 9:34 am Reply with quote

I am running PHP 5, if you want me to test the file, let me know. I don't see anything currently wrong with that methodology, but obviously it is not reading those variables correctly
 
hitwalker







PostPosted: Fri Oct 13, 2006 11:03 am Reply with quote

sure....can you pm me a mail address ?
 
hitwalker







PostPosted: Fri Oct 13, 2006 3:15 pm Reply with quote

any luck evader......
 
hitwalker







PostPosted: Sun Oct 15, 2006 4:17 am Reply with quote

c'mon peeps.....
anyone having luck with this?
 
gregexp







PostPosted: Sun Oct 15, 2006 7:56 am Reply with quote

Hit, I sent you an e-mail, and checked out the site, It seems to be including it in the site. I cannot reproduce the problem sorry.
 
hitwalker







PostPosted: Sun Oct 15, 2006 8:03 am Reply with quote

yes i replied with additional info about the server enviroment etc..
you didnt received it?

can you put it online and pm me the link?
 
evaders99







PostPosted: Sun Oct 15, 2006 8:41 pm Reply with quote

I seem to be running it just fine. I will link you to where I have it, and please send me the link to where you are testing it so we can compare what it should be doing
 
gregexp







PostPosted: Sun Oct 15, 2006 10:27 pm Reply with quote

Both hitwalker and evaders, I have sent you both pms pointing you to my test site, and if that is the full code on hitwalkers site, It seems to be working.
 
evaders99







PostPosted: Mon Oct 16, 2006 12:13 pm Reply with quote

Yea seems fine to me. I'm waiting to see if we can test it on hitwalker's server directly
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©