Different code executes in debug to run

General discussion on Zend Studio
Post Reply
tim5599
Posts: 4
Joined: Thu Jun 12, 2014 3:29 pm

Different code executes in debug to run

Post by tim5599 » Thu Jun 12, 2014 3:42 pm

First post here. I must plainly be missing something really obvious, but this problem has been dogging me for a couple of days and I've exhausted all the search terms I can think of on Google to get a solution..

Anyway...

My first little project has one page, index.php with a form. The first time through it displays some data for today from my i series. The form is presented above the data for the user to change the date and cre-submit. The form then posts back to the same page getting data for the changed date.

Anyway, this all works as planned when I run it in debug (F11). But when I just run (Ctrl + F11) the code that gets executed seems to be completely different! It's like it's running a previous version of the code, even when I come out of Studio and back in again. It feels like it's running an older cached copy. The 'new' version connects to my i using an intentionally blank user and password, the 'old' version connects with my own user id and password (before I changed to blanks) which disables my IBM i profile because I had to recently change my password on there. This, as you can imagine, is very tiresome!

Can anyone tell me what I may have done?

Thanks in advance!

User avatar
natalia_b_zend
Posts: 366
Joined: Wed Jan 25, 2012 5:51 pm

Re: Different code executes in debug to run

Post by natalia_b_zend » Thu Jun 12, 2014 7:21 pm

Please check:
Right click on your index.php > Run As > Run Configurations
compare this confugiration with
Run As > Debug Configurations
Maybe those two launch configurations have different servers or application/project name defined?
Natalia Bartol
Zend Studio Team

tim5599
Posts: 4
Joined: Thu Jun 12, 2014 3:29 pm

Re: Different code executes in debug to run

Post by tim5599 » Fri Jun 13, 2014 9:25 am

Hi Natalia

Thanks for the reply. I have tried what you say and scrutinized the settings in both the Run As > Configurations and Debug As > Configurations windows and they are the same.
The servers are the same, the file names and paths are the same and the URLs are the same (both checked to Auto-Generate URL).

Do you have any other thoughts what my problem might be?

Thanks again

Tim

tim5599
Posts: 4
Joined: Thu Jun 12, 2014 3:29 pm

Re: Different code executes in debug to run

Post by tim5599 » Mon Jun 16, 2014 11:00 am

Things go from bad to worse, when I now run the project after the week-end it just says "Launching index.php" has encountered a problem No tests found in index.php !!!

When I click on details i get the most helpful message of No tests found in index.php. How is that more details?? How does that help??? Have spent ages searching on Google but not finding much in the way of help.

Have to say that so far Zend Studio is not a patch on Visual Studio !!

Anyone out there who can help me please?

User avatar
natalia_b_zend
Posts: 366
Joined: Wed Jan 25, 2012 5:51 pm

Re: Different code executes in debug to run

Post by natalia_b_zend » Mon Jun 16, 2014 11:30 am

How exactly do you run your project?
Do you click on 'Run' button on top toolbar? Seems like your are trying to run as PHPUnit tests.
Please use right-click on project (or index.php) > Run As... > Run Configurations and make sure you use 'PHP Web Application' config type and not 'PHPUnit'.
Natalia Bartol
Zend Studio Team

tim5599
Posts: 4
Joined: Thu Jun 12, 2014 3:29 pm

Re: Different code executes in debug to run

Post by tim5599 » Mon Jun 16, 2014 1:49 pm

hi Natalia,

I'm running it as a web application. Please see the screen shot attached which shows the run configuration and how I'm running the code.

I've blanked out the IP address of my i series but the IP address is the same in both screen shots.

Does this give you any clue as to what I've done wrong?

Thanks

Tim
zend studio error.jpg
zend studio error.jpg (187.63 KiB) Viewed 3218 times

Post Reply