php disables?

Status
Not open for further replies.

ezsite

New Member
Messages
118
Reaction score
0
Points
0
i am asking y is php on my acount disabled? i cant show my visitors their IP addresess?
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
PHP shouldn't be disabled on any account.

What code are you using? It's probably an error there. And what error message, if any do you get?

Also make sure to save all php files with a .php extension.
 

Anna

I am just me
Staff member
Messages
11,414
Reaction score
546
Points
113
some php functions are disabled for security though
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
Yes, but I believe the user was referring to PHP in general.
 

Anna

I am just me
Staff member
Messages
11,414
Reaction score
546
Points
113
agree that it does sound as he means php in general, but still he gives a certain example that made me think he could be referring to a specific part of it only.
he does complain that he can't let users see their own IP.
 

ezsite

New Member
Messages
118
Reaction score
0
Points
0
im using this script

<?php
$img_number = imagecreate(180,20);
$backcolor = imagecolorallocate($img_number,70,73,80);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = " Your IP Address $_SERVER[REMOTE_ADDR]";
Imagestring($img_number,2,2,2,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

it was working 1 month ago but its not working anymore
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
can you try

PHP:
 <?php
$img_number = imagecreate(180,20);
$backcolor = imagecolorallocate($img_number,70,73,80);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
$number = " Your IP Address ".$_SERVER[REMOTE_ADDR];
Imagestring($img_number,2,2,2,$number,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>

Edit: Sorry, that doesn't work.
 
Last edited:

ezsite

New Member
Messages
118
Reaction score
0
Points
0
you have to save it as a .php file then access from a web address
it was working before but now it suddenly stoped. if this problem is not resolved im going to have to look for another host.
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Can you link to it? Or tell us what is causing it to not work? Do you get an error? I don't have the time always to hunt around users' accounts looking for scripts that they need help with.
 
Last edited:

ezsite

New Member
Messages
118
Reaction score
0
Points
0
yes i get an error, go to http://ezunit.net/ip.php

it says 500 internal error.

im telling u nothing is wrong wit scriping it wrong wit your server.


also another service i provide in php is not working either. my articles database is not working.
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
203
Points
63
We're working on some modified PHP versions so we can accommodates everyone's scripts.
 
Status
Not open for further replies.
Top