Lost 600 lines of source code

Lost 600 lines of source code

Postby bwwilson on Sun Nov 13, 2011 2:18 pm

Hi everyone,
Just developed my first real php app but have a real problem that has happened four times. My script has a section for php at the top of my source, several lines of html, then a php section with functions, then ended with the closing body and html tags. I test my page and everything works as expected. The next day I open my php page and from the point where I started the code for my functions the next 600 lines of source code are missing. I had backup copies, but I am stumped by why it does this. Thanks in advance for any help you can give

Bruce.
bwwilson
 
Posts: 5
Joined: Sun Nov 13, 2011 2:01 pm

Re: Lost 600 lines of source code

Postby kentatzend on Mon Nov 14, 2011 8:55 pm

Open how with what tool ....
User avatar
kentatzend
 
Posts: 1781
Joined: Thu Dec 11, 2008 1:08 pm

Re: Lost 600 lines of source code

Postby bwwilson on Mon Nov 14, 2011 10:07 pm

I'm using Notepad++ to key the code, but that's not when I'm having the problem. I keyed and tested all my code and everything was working, the next day I was showing someone my nifty new web site and when I pulled up my Projects.php web page, the bottom half of the page was missing. I checked the Zend logs and it said I had and undefined function in my code. The undefined function "projmenu" that was in the source for Projects.php was completely missing from the source code along with about 500 more lines of code. The php section that disappeared was just after the </html> tag. Today I moved all of my functions above the </html> tag to see if it makes any difference. I'm not sure if this is a problem with the Zend server or the AS/400... Thanks
Bruce
bwwilson
 
Posts: 5
Joined: Sun Nov 13, 2011 2:01 pm

Re: Lost 600 lines of source code

Postby kentatzend on Mon Nov 14, 2011 10:31 pm

Well ... I sort of doubt it's Zend Server as the php source is ready only from Zend Server's perspective but ... you never know. I'd have a tendency to suspect something else. Is it only one file that has this problem? Several? Does the code do any file writing or anything like that?
User avatar
kentatzend
 
Posts: 1781
Joined: Thu Dec 11, 2008 1:08 pm

Re: Lost 600 lines of source code

Postby bwwilson on Tue Nov 15, 2011 2:27 am

Well, I also assumed that the source code was read only... How do you trace something like this? I'm running this on a Iseries 720 V6R1 system. Could I journal the source to see what is causing this loss? This has happend on another web page at pretty much the same point in the source, just after the ending </html> tag, everything after that disappears at random times. I have got to be able to count on this working consistantly. The first time it happened, I though it was something to do with the file not being fully saved from the PC. The loss of the code over the weekend with my development PC being powered off eliminated that possibility. The only thing that makes sense is that when PHP is preparing the code into html format, that there's some sort of bug that overlays the source. I wish this were supported by IBM so that I could call one place and get some answers.
Thanks,
Bruce
bwwilson
 
Posts: 5
Joined: Sun Nov 13, 2011 2:01 pm

Re: Lost 600 lines of source code

Postby kentatzend on Tue Nov 15, 2011 5:46 pm

I'm not a really IBM i expert but maybe one of the other folks on the form has some ideas ...
User avatar
kentatzend
 
Posts: 1781
Joined: Thu Dec 11, 2008 1:08 pm

Re: Lost 600 lines of source code

Postby aseiden on Tue Nov 15, 2011 6:19 pm

I've never heard of anything like this.

Bruce, are you running Zend Server? What version?

You probably should open a ticket with Zend support.
aseiden
 
Posts: 711
Joined: Thu Apr 09, 2009 5:45 pm

Re: Lost 600 lines of source code

Postby bwwilson on Wed Nov 16, 2011 2:49 am

Our Iseries is running Zend server community edition Version 5.1.0 PHP version 5.3.6 We had a consultant that setup PHP on our system who wanted us to wait before we registered so that our 12 months of free support (????) would start when we actually started using our system for production. I moved the sections of code that were being lost to be above the closing </html> tag and so far..... I haven't had the error re-occur yet. I can see that PHP will be a huge tool for us in the future, if it is as reliable as I expect the Iseries to be. Thanks for your help.
Bruce
bwwilson
 
Posts: 5
Joined: Sun Nov 13, 2011 2:01 pm

Re: Lost 600 lines of source code

Postby erich_hieden on Wed Nov 16, 2011 9:47 am

Haven't heard of this neither. But maybe we can learn something new.

What's the full path of this file?
What are the file permissions?
Is there an IPL when you lose the source?

I have to admit that I'm truly clueless at the moment, but that's something I want to change.
erich_hieden
 
Posts: 349
Joined: Tue Jul 07, 2009 9:01 am

Re: Lost 600 lines of source code

Postby bwwilson on Thu Nov 17, 2011 11:54 pm

The file is inside the htdocs. /prj/projects/projects.php. I moved the code above the ending </HTML> tag and I haven't had the problem reoccur yet. We re-ipl the iseries every night. Come to think of it, the problem has always happened the next day when I try to login. My response time when I write to the IFS is painfully slow. Could this be a factor? Hate to give up and host this on a pc...
bwwilson
 
Posts: 5
Joined: Sun Nov 13, 2011 2:01 pm

Next

Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 0 guests