Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-04-2010, 01:26 AM   PM User | #1
DirtyD
New to the CF scene

 
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DirtyD is an unknown quantity at this point
Question $_GET in Xitami not parsing?

Server: Xitami
OS: Windows Vista home basic
PHP Version: 5.3.3
Web browsers: Firefox(v3.6.8), Internet Explorer(v7.0.6)

Problem:
I cannot seem to get the function "$_GET" to work on the server
Now, the code does work in a free php web host I was using.

sample code:
Code:
<?php
$num = $_GET['var'];
echo "the word is: $num";
?>
For the example if i use http://127.0.0.1/index.php?var=123.

The page shows up blank.
When i view source in both browsers it only shows "the word is: "

Any help would be appreciated.
If you need more information, let me know.

By no means am I a PHP expert .

~Thank you,
Donnie
DirtyD is offline   Reply With Quote
Old 09-04-2010, 02:04 AM   PM User | #2
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
Any reason why you're not using Apache?
tfburges is offline   Reply With Quote
Old 09-05-2010, 01:09 AM   PM User | #3
DirtyD
New to the CF scene

 
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DirtyD is an unknown quantity at this point
I can use Xitami anywhere anytime as long as I'm at a computer. I mostly use it when I'm at the library or at a friends house. I do have LAMP on a computer with 9.04(haven't gotten around to get latest ), but If I want to edit/test pages if I'm not at home, I need something portable.

Is there anything else i can use that's a little better then Xitami and portable?
DirtyD is offline   Reply With Quote
Old 09-05-2010, 04:50 AM   PM User | #4
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
My best guess is that when Xitami parses the URL it stops at the file extension... which would be kind of absurd but I've seen stranger bugs. If this is the case and you know C, since Xitami is open source... with a little effort you can probably find where it handles the URL and change it to make sure it passes the entire string to PHP... and recompile Xitami. (Then I'd submit the bug/solution to Xitami's homebase to help others out hehe.) If that's not it... it could be a compatibility issue with Xitami and PHP and would most likely not be a quick and easy fix.

I'm still a little confused though. You say you can use Xitami anywhere anytime as long as you're at a computer... what's stopping you from doing the same with Apache? Is installing Apache blocked at the library while installing Xitami is not? Maybe I'm misunderstanding the scope of Xitami's functionality. Is it just a single simple executable or something?
tfburges is offline   Reply With Quote
Old 09-05-2010, 06:33 PM   PM User | #5
DirtyD
New to the CF scene

 
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
DirtyD is an unknown quantity at this point
Xitami is a portable web server and does not need to be installed.

When you first extract the zip file after downloading, there are 92 files and 17 folders within the "app" folder. Everything is within that folder.

_xiopen%5F2%5F5%2Ezip~ -> xitami-25 -> app -> everything

To start the server you run an exe file named "xigui32". Your website goes in "webpages" folder that is in "app".


We are not "suppose" to install anything at the library. I have installed php on a computer there , but i don't want to do to much and end up getting banned from being able to get on their computers. On my friends computers they probably wouldn't mind me installing Apache.

I didn't think about Xitami stops parsing right after the extension, I assumed that "$_get" was just being parsed wrong or not at all within the page.

Xitami allows filters for extensions.
for example:
when i set up php with Xitami i had to go to http://localhost/admin -> log in -> Configuration -> Filters

then add
.php under "File extension" and c:\php\php.exe under "Filter command or script"

my point with this is "maybe" i have to add another filter for Xitami to parse further then just extension...

hmmm...

well, Thanks for bringing in another way to view the problem . maybe trying a new filter would be better. Maybe add ".php?*"... hopefully * will act as a wild card.

even if adding a filter does not work, the idea you posted as what the problem could be sounds much more likely to be the problem that is happening.
DirtyD is offline   Reply With Quote
Reply

Bookmarks

Tags
$_get, php 5, problem, xitami

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:37 PM.


Advertisement
Log in to turn off these ads.