Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-22-2009, 12:42 PM   #1
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
PHP people... Quick question on why this no longer works...

This code used to work... Then my host upgraded my PHP and now it lo longer works... Pooh pooh!

Code:
if ($cmd == 'go' && ($url && $title && $blogs && $types))

The variables $url, $title, $blogs and $types all are arrays.

Again, this used to work yesterday.... Now it doesn't.

PHP was 5.2.5 and is now 5.2.9.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 12:44 PM   #2
HorseShit
Too lazy to set a custom title
 
Join Date: Dec 2004
Posts: 17,513
how is your blog network doing?
HorseShit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 12:46 PM   #3
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
After their upgrade, did they get apache up and running properly?

A simple upgrade 'shouldnt' effect an already working script
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 12:54 PM   #4
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
After upgrade everything else worked... except for this particular script. For some reason it doesn't return TRUE anymore. I believe it has something to do with the variables being arrays...

Blog network is going good.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 01:06 PM   #5
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Did they enable safe mode when they upgraded?
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 01:15 PM   #6
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
they probably disabled register_globals
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 01:16 PM   #7
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
Ah... was a globals problem.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2009, 02:01 PM   #8
gornyhuy
Chafed.
 
gornyhuy's Avatar
 
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
In case anyone is keyword searching, there actually is a backward-INcompatible change from PHP4.X to php5.X involving arrays.

In php5 If you don't explicitly declare a variable as an array and then later you try to use certain array functions on it (slice, splice, etc), it will not work.

I learned this the hard way when I upgraded a dedicated box with a bunch of legacy php code on it.
__________________

icq:159548293
gornyhuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:04 PM   #9
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,409
Quote:
Originally Posted by gornyhuy View Post
In case anyone is keyword searching, there actually is a backward-INcompatible change from PHP4.X to php5.X involving arrays.

In php5 If you don't explicitly declare a variable as an array and then later you try to use certain array functions on it (slice, splice, etc), it will not work.

I learned this the hard way when I upgraded a dedicated box with a bunch of legacy php code on it.
Thanks for the heads up!
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:17 PM   #10
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Quote:
Originally Posted by V_RocKs View Post
This code used to work... Then my host upgraded my PHP and now it lo longer works... Pooh pooh!

Code:
if ($cmd == 'go' && ($url && $title && $blogs && $types))

The variables $url, $title, $blogs and $types all are arrays.

Again, this used to work yesterday.... Now it doesn't.

PHP was 5.2.5 and is now 5.2.9.
You should also write the code cleaner by using things like isset($url) instead of the way you're doing it.. Doing it the way you're doing it is going to be throwing a lot of errors you just don't see (unless you set the error reporting higher) but that could very well be being logged to the server error log. I learned that the hard way when I had a log filling up my disk space on a small virtual acount.

By the way.. If you ever want to source out your programming, I'd be interested in doing some of your stuff..
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:22 PM   #11
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
coding the phps

($url && $title && $blogs && $types)

that must be returning true

why not maybe change to

if($cmd == 'go' ){
if($url==true && $title==true && $blogs==true && $types==true){}
}
?

Last edited by 2012; 03-23-2009 at 06:26 PM.. Reason: i no know
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:32 PM   #12
calmlikeabomb
Confirmed User
 
calmlikeabomb's Avatar
 
Join Date: May 2004
Location: SW Palm Bay, Florida
Posts: 1,323
This thread makes my balls hurts.

If they are arrays you should first check to make sure that's indeed what they are.

http://php.net/is_array

Also, try using a switch instead of a null else or long ass if-elseif-else chain.

http://php.net/switch

I'm happy the code you posted here fails
__________________
subarus.
calmlikeabomb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:35 PM   #13
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
echo 'help me' . '<BR>' ;
echo 'help meeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' ;
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:37 PM   #14
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
Quote:
Originally Posted by calmlikeabomb View Post

I'm happy the code you posted here fails
how nice of you
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:48 PM   #15
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Quote:
Originally Posted by calmlikeabomb View Post
This thread makes my balls hurts.

If they are arrays you should first check to make sure that's indeed what they are.

http://php.net/is_array

Also, try using a switch instead of a null else or long ass if-elseif-else chain.

http://php.net/switch

I'm happy the code you posted here fails
switch is for pussies... you're not a real programmer unless your code is unreadable.
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:49 PM   #16
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
Quote:
Originally Posted by Tempest View Post
switch is for pussies... you're not a real programmer unless your code is unreadable.
no shit homie, don't you know they just re-instated the "goto" statement. Get with the times loser Your point in mute
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 06:57 PM   #17
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
if ($_GET['cmd'] == 'go' && (($_GET['url'] && $_GET['title']) && ($_GET['blogs'] && $_GET['types'])))

Win.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 07:00 PM   #18
calmlikeabomb
Confirmed User
 
calmlikeabomb's Avatar
 
Join Date: May 2004
Location: SW Palm Bay, Florida
Posts: 1,323
^ That's a fail, because it'd require the array to be passed via the url.

Unless you're assigning an array to $_GET, which in case would also be a fail.

Plus you're still not checking to see if the variables are arrays. Wouldn't you want to do that before any processing occurs?
__________________
subarus.

Last edited by calmlikeabomb; 03-23-2009 at 07:02 PM..
calmlikeabomb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 07:04 PM   #19
calmlikeabomb
Confirmed User
 
calmlikeabomb's Avatar
 
Join Date: May 2004
Location: SW Palm Bay, Florida
Posts: 1,323
I want to know what url, title, blogs, and types variable are part of so i can see the big picture. Wtf, does your script do.
__________________
subarus.
calmlikeabomb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 07:09 PM   #20
2012
So Fucking What
 
2012's Avatar
 
Industry Role:
Join Date: Jul 2006
Posts: 17,189
Quote:
Originally Posted by Killswitch View Post
if ($_GET['cmd'] == 'go' && (($_GET['url'] && $_GET['title']) && ($_GET['blogs'] && $_GET['types'])))

Win.
Quote:
Originally Posted by calmlikeabomb View Post
^ That's a fail, because it'd require the array to be passed via the url.

Unless you're assigning an array to $_GET, which in case would also be a fail.

Plus you're still not checking to see if the variables are arrays. Wouldn't you want to do that before any processing occurs?
Quote:
Originally Posted by calmlikeabomb View Post
I want to know what url, title, blogs, and types variable are part of so i can see the big picture. Wtf, does your script do.
http://www.gofuckyourself.com/showpo...00&postcount=9
2012 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 07:42 PM   #21
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Quote:
Originally Posted by fartfly View Post
no shit homie, don't you know they just re-instated the "goto" statement. Get with the times loser Your point in mute
When I heard that I was exstatic... almost ended up with a cum stain...
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 08:28 PM   #22
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
This works. I'm not sure if it's proper for what you're doing or not, but maybe it helps.
Code:
$cmd=$_GET['cmd'];
$url=$_GET['url'];
$title=$_GET['title'];
$blogs=$_GET['blogs'];
$types=$_GET['types'];
$check=is_string($url)&&($title)&&($blogs)&&($types);

if(($cmd=='go')&&($check != FALSE)){
	echo "YAY!";
}else{
	echo "BOOO!";
}
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 08:45 PM   #23
Why
MFBA
 
Industry Role:
Join Date: Mar 2003
Location: PNW
Posts: 7,230
VooDoo, wtf you been up to lately man? good to see your still kickin.
Why is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 08:49 PM   #24
NaughtyRob
Two fresh affiliate progs
 
NaughtyRob's Avatar
 
Industry Role:
Join Date: Nov 2004
Location: Inside teen pussy
Posts: 29,602
Fucking geeks....



J/K I wish I knew php


Last edited by NaughtyRob; 03-23-2009 at 08:51 PM..
NaughtyRob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2009, 11:37 PM   #25
uno
RIP Dodger. BEST.CAT.EVER
 
uno's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
Quote:
Originally Posted by fartfly View Post
no shit homie, don't you know they just re-instated the "goto" statement. Get with the times loser Your point in mute
I'm on a grammar kick. Moot, not mute.
__________________
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost - For all your hosting needs, present and future. Tell them I sent ya!
uno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.