Error 404 with php game, but the page is there (ezRPG)

  • (2 Pages)
  • +
  • 1
  • 2

27 Replies - 1730 Views - Last Post: 15 October 2012 - 06:45 PM Rate Topic: -----

#16 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 05:50 PM

I hope you are not trying to rum it from your ftp folder. I just drug it to a public folder directory and it worked.

... and yes the server has everything to do with it.
Was This Post Helpful? 0
  • +
  • -

#17 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 05:54 PM

No, I do not plan on running it through my FTP server. I just used that to send it to the host server, public, so I would not have to send every single file. Basically used the FTP as a bulk uploader. It has to be the host I am using, but the host clearly states that they support PHP and Mysql. So, the problem eludes me.
Was This Post Helpful? 0
  • +
  • -

#18 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 06:05 PM

*sigh* okay you need to play more with a local server. This should be as easy a drag, drop, point your browser to the right path. Make a folder and add a simple we page to it . Try to navigate to it. If you can't then work on setting permissions. Once that works drop in the project files and go.
Was This Post Helpful? 0
  • +
  • -

#19 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 06:08 PM

How does one set up a local server? If I go through this and still can't get it to work, then I might as well quit. As you said that you got it to work x.x
Was This Post Helpful? 0
  • +
  • -

#20 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 06:10 PM

Go investigate xampp if you run windows. Lamp for Linux. Etc
Was This Post Helpful? 0
  • +
  • -

#21 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 06 October 2012 - 07:38 PM

Alrighty, I have downloaded XAMPP and now have it completely installed. I've opened the Control Panel, but that is as far as I have really gotten. I do not know how to access the local server, which should be my computer IP address I believe, or as to where to place the rpg files to run it myself locally; to see if it even works. As you have stated that you have done it yourself and the code does work.

First time I have ever ran XAMPP so any help would be greatly appreciated. Also I am sorry if this seems like it is taking a lot time to sort out, but these are steps that I have never taken before. But feel rest assured that I greatly appreciate your patience with me and helping me so far.
Was This Post Helpful? 0
  • +
  • -

#22 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 169
  • View blog
  • Posts: 1,298
  • Joined: 22-October 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 07 October 2012 - 12:01 AM

View Postmodi123_1, on 07 October 2012 - 12:10 PM, said:

Go investigate xampp if you run windows. Lamp for Linux. Etc


Or WAMP, which is my favorite windows server.
Was This Post Helpful? 0
  • +
  • -

#23 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 11:12 AM

So after hours of banging my head against the keyboard(not literally) I finally got the game to work. I can log in and play around, but under further investigation(of course I am going to mess with every page before I release it) ; I attempting to register as a new member. Unfortunately, the 'Captcha' does not load. Here is the code:

<?php
define('IN_EZRPG', true);

require_once('init.php');

//$code_length = rand(5,6);
$code_length = 4;
$rand_start = mt_rand(0, 250);
$font = 'static/fonts/Capture_it.ttf';
$fontSize = 30;
$padding = 10;

$l1 = strtoupper(createKey(1, 1));
$l2 = strtoupper(createKey(1, 1));
$l3 = strtoupper(createKey(1, 1));
$l4 = strtoupper(createKey(1, 1));
$verify_string = $l1 . ' ' . $l2 . ' ' . $l3 . ' ' . $l4;
$real_string = $l1 . $l2 . $l3 . $l4;
$verify_code = sha1(strtoupper($real_string) . SECRET_KEY);

$_SESSION['verify_code'] = $verify_code;

function makeRBGColor($color, $image)
{
    $color = str_replace("#", "", $color);
    $red = hexdec(substr($color, 0, 2));
    $green = hexdec(substr($color, 2, 2));
    $blue = hexdec(substr($color, 4, 2));
    $out = ImageColorAllocate($image, $red, $green, $blue);
    return $out;
}

$wordBox = imageftbbox($fontSize, 0, $font, $verify_string);

$wordBoxWidth = $wordBox[2];
$wordBoxHeight = $wordBox[1] + abs($wordBox[7]);

$containerWidth = $wordBoxWidth + ($padding * 2);
$containerHeight = $wordBoxHeight + ($padding * 2);

$textX = $padding;
$textY = $containerHeight - $padding;

$captchaImage = imagecreate($containerWidth, $containerHeight);

$red = randColor();
$green = randColor();
$blue = randColor();
$backgroundColor = ImageColorAllocate($captchaImage, $red, $green, $blue);

$rred = 255-$red;
$rgreen = 255-$green;
$rblue = 255-$blue;
$textColor = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);

imagefttext($captchaImage, $fontSize, 0, $textX, $textY, $textColor, $font, $verify_string);

$angle = mt_rand(-3, 3);
$captchaImage = imagerotate($captchaImage, $angle, $backgroundColor);


$line = ImageColorAllocate($captchaImage, $rred, $rgreen, $rblue);

for($i = 0; $i < 10; $i++)
{
    $xStart = mt_rand(0, $containerWidth);
    $yStart = mt_rand(0, $containerHeight);
    $xEnd = mt_rand(0, $containerWidth);
    $yEnd = mt_rand(0, $containerHeight);
    imageline($captchaImage, $xStart, $yStart, $xEnd, $yEnd, $line);
}


imagefilter($captchaImage, IMG_FILTER_CONTRAST, 1);
//imagefilter($captchaImage, IMG_FILTER_BRIGHTNESS, 10);

//imagefilter($captchaImage, IMG_FILTER_EDGEDETECT);
imagefilter($captchaImage, IMG_FILTER_GAUSSIAN_BLUR);

header('Content-Type:image/png');
ImagePNG($captchaImage);
?>



Was This Post Helpful? 0
  • +
  • -

#24 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 11:29 AM

Quote

So after hours of banging my head against the keyboard(not literally) I finally got the game to work

what did you change on your server to do this? Seriously.. it should have just been a drag and drop operation.

Quote

Unfortunately, the 'Captcha' does not load.

Am I to take this as the question, or is there something else I missed? If this is the case - what sort of errors is it throwing up? What does the page look like? Do things load after it?

Frankly, some obscure PHP library coupled with an unknown install/existing based ("of course I am going to mess with every page before I release it") may make this darn annoying to "debug by proxy" though a member here.

End game - MORE information will be the mantra.
Was This Post Helpful? 0
  • +
  • -

#25 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 06:19 PM

I opened a 'help ticket' to my host provider and they informed me that all of my created directories, files and folders should be placed under a default directory. Once I placed them under said default directory, everything seemed to work beautifully. During the installation of the game I was able to create an admin account, which allowed me to register and enter the game. Seeing that everything worked just fine.

Unfortunately, when I attempted to register to the game, such as a guest/new member would, the captcha image does not load. A captcha image displays numbers and/or letters to verify that the guest/new member is human and not a bot. Everything else on the game is working beautifully, this is the only issue that I am having now.
Was This Post Helpful? 0
  • +
  • -

#26 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 06:34 PM

Shocker.. it was the environment.

Are you in debug mode?

http://ezrpg.uaktech...hread-1476.html
https://code.google....i/AddingCaptcha
Was This Post Helpful? 0
  • +
  • -

#27 ShibataTim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 05-October 12

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 06:44 PM

I'm not in debug mode, but I have opened a new help ticket with my host to see if they can resolve the issue. I was hoping that someone would of looked through the code I posted above of the captcha page itself and tell me if there was any errors.
Was This Post Helpful? 0
  • +
  • -

#28 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9094
  • View blog
  • Posts: 34,146
  • Joined: 12-June 08

Re: Error 404 with php game, but the page is there (ezRPG)

Posted 15 October 2012 - 06:45 PM

There isn't an auto capatcha thing in php.. that's built into this exrpg system.. it would be best to talk to them.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2