NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] cant return back to debug login page after submit


Joined: 26 Aug 2008
Posts: 9
Reply with quote
Hi,
I'm found that I can't debug the OSCMAX project after login page. At first I goto login.php page using debugger, I can step thru the source code, then when the login web page show up at output tab, I click the "sign in" button (without enter email and pasword, so expect login error). The login web page redirect to itself with login error message, it didnt automatic goto first line of source code at login.php. There is no error message from Nusphere debugger. So the debugger has been skip quietly and I can't use it for this case.

Since OSCMAX project is huge and link to many files and many folders, I had tried many days to minimise it but without success.

Below is my setup, as details as possible, let me you know if you need further info.

The source code is downloaded from
svn checkout http://oscmax2.googlecode.com/svn/branches/michael_s/rc4/trunk/. I am using TortoiseSVN to retrieve the whole projects.

My installation is on my hard disk:
1. Copy all files in CATALOG to server at C:\www\yoursite\public_html\.
2. Run the install at http://your_web_site/install
3. Follow prompts......
I use nuspere internal server for running the debugger.

My project settings are:
==============================
Project: C:\Users\daream\AppData\Roaming\NuSphere\PhpED\projects\osCMax_p5.ppj
Root directory: C:\www\oscmax_p5\public_html
Run mode: System Default
Using php5 debugger as in associations setting.
Loaded Configuration File C:\Program Files\nusphere\phped\php5\php.ini
extension_dir C:\Program Files\NuSphere\PhpED\php5\extensions

Current versions
=================
PHP Version 5.2.8
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with DBG v3.6.1, (C) 2000,2008, by Dmitri Dmitrienko
with NuSphere PhpExpress v2.0.0, Copyright (c) 2002-2008 NuSphere Corp, by Dmitri Dmitrienko

I had tried simple login project, the debugger is working fine.
Hope you can advice.
View user's profileFind all posts by daream88Send private message


Joined: 26 Aug 2008
Posts: 9
Reply with quote
I notice the difference of href string for working sample and oscmax login when mouse over both buttons.

working sample: http://locahost:8080/login_test.php?DBGSESSID=397948161772000074;d=1,p=0,c=1

oscmax: http://oscmax/login.php?action=process

So that is the reason missing of DBGSESSID cause the debugger cant go back to walk thru code?

Below are the partial html code for oscmax login form.

<form name="login" action="http://oscmax/login.php?action=process" method="post">
................................
<input type="text" name="email_address">
..................................
<input type="password" name="password" maxlength="40">
..............................
"<input type=\"image\" src=\"includes/languages/english/images/buttons/button_login.gif\" border=\"0\" alt=\"Sign In\" title=\" Sign In \">"
........
</form>

Would appreciate anyone give advice.
View user's profileFind all posts by daream88Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
So that is the reason missing of DBGSESSID cause the debugger cant go back to walk thru code?


No, that's not the reason. Seems the reason is that login redirects to another web site.
Look, you noticed that the first login page is on

http://locahost:8080/

while the form submits data to

http://oscmax/

that's big difference.
Seems the software can't understand its initial URL including protocol, host, and port and expects (or configured to ) http://oscmax/.
In this case I'd recommend to run Settings Wizard and setup your project to use local Apache or what ever your local server services http://oscmax/.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Aug 2008
Posts: 9
Reply with quote
Thank you dmitri point to me the exact problem that I miss.

After use the Project Setting Wizard, change the root URL to be localhost:8080 by replace oscmax_p5 and edit configure.php files in oscmax project. Now I can use the debugger successfully, it go back login file after submit. Note previously use oscmax is for illustrate purpose, my actual root dir is still C:\www\oscmax_p5\public_html.

However, because the above changes, I can only run the project at FF and IE using localhost:880 instead of oscmax_p5 because I'd changed the configure.php.

I dont understand I have setup oscmax_p5 as domain(host) name and vhost in Apache and run well at both browsers using URL http://oscmax_p5/, but why Project Setting Wizard cannot accept my oscmax_p5 domain (host) name. It said "Host name oscmax_p5 is not resolved. Please check spelling and make sure your firewall does not block PhpED"
Here is my oscmax_p5 setup:

1. Added a line "127.0.0.1 oscmax_p5" into file c:\windows\system32\drivers\etc\hosts.
2. Unmasked "Include conf/extra/httpd-vhosts.conf" at apache httpd.conf.
3. Added below lines at httpd-vhosts.conf.
<VirtualHost *:80>
DocumentRoot C:/www/oscmax_p5/public_html
ServerName oscmax_p5
ServerAlias oscmax_p5
<Directory "C:/www/oscmax_p5/public_html">
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Note that if I change to <VirtualHost *.8080>, the browser cannot find oscmax_p5 also.
Thanks in advance for any advice
View user's profileFind all posts by daream88Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
It said "Host name oscmax_p5 is not resolved


Correct. RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.
In your case, there is underscore, so the hostname violates the RFCs.
you may read this on the page http://en.wikipedia.org/wiki/Hostname and in the corresponding RFCs.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Aug 2008
Posts: 9
Reply with quote
Hi dmitri,
You again point directly to me my mistake. After the change of hostname and folder name, problem solved.
Thanks a million for relieve my many days headache. Smile
Now I should more enjoy the benefit of debugger.
View user's profileFind all posts by daream88Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
in the next update we'll add support for underscores in the host names and make the error message more clearer about incorrect characters in the entered hostname vs "non-resolved hostname" as it's now.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 26 Aug 2008
Posts: 9
Reply with quote
glad to hear that, nushpere is ongoing improve tool user friendly even added with helpful message. That improve user productivity.
View user's profileFind all posts by daream88Send private message
[resolved] cant return back to debug login page after submit
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
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic