Re: PHP MYSQL and Apache Issue

  • From: "Punit Diwan" <punitdiwan@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Fri, 21 Nov 2008 21:13:49 +0530

Hi Rodney and Octivian,

    As if now we are not using any framework. Plain PHP code is there and
that is without OOPs concept. We have a local webserver. Our team is
accessing  that webserver  from different computer  on the same network. The
problem does not occur all the time but 3 out of 5  attempts gives problem.
The problem is MySql error. Lets suppose if I have queried like Select *
from Products where Product_name = 'Bike' when I use the echo command to see
the query it shows Select * from Products where Product_name = ''.
Considering this query, I can expect the MYSql error.

    It is very hard to past code because its hugelines of code.  Say we have
one php file which list the customer. When a customer is selected, the same
php file  list the products, when products is selected, the prices is shown.
So, its one php file.

    We are using different Action? values for query string and based of
values, we are executing different code.

    I know its bad style of coding but it is how the previous developers
have worked and its very difficult to change that. It will be complete
rework. But it does not happen when single person use to work on that same
site.
Regards
Punit Diwan


On Fri, Nov 21, 2008 at 6:13 PM, Rodney Haynie <RodneyH@xxxxxxxxxx> wrote:

>  There were a couple good suggestions relayed already.  I have a couple
> questions myself.
>
>
>
> ·         You said you were using a lamp server.  Are you using any
> particular framework, or is your php code all home grown?
>
> ·         Exactly how are you duplicating the problem.  You said when
> multiple people are accessing the app at the same time.  So are you
> accessing the app from 2 different computers and simultaneously clicking a
> submit button?  Or some other means.  Need the exact progression.
>
> ·         Someone already asked, but could you post the relevant parts of
> the PHP code.
>
>
>
> -Rodney
>
>
>
>
>
> *From:* programmingblind-bounce@xxxxxxxxxxxxx [mailto:
> programmingblind-bounce@xxxxxxxxxxxxx] *On Behalf Of *Ricks Place
> *Sent:* Friday, November 21, 2008 7:03 AM
> *To:* programmingblind@xxxxxxxxxxxxx
>
> *Subject:* Re: PHP MYSQL and Apache Issue
>
>
>
> Do you have a way to print or otherwise check the values passed from the 2
> client computers into the php program running on the host server? In other
> words, I would have a class with a method that gets executed as a code
> behind file for a WebPage in VWD. If I print values passed into the method
> on load event I can check Query Parameters passed with the PostBack or
> Hidden Fields or other variables which might contain the words bike or boat.
> I am wondering if there are suppose to be 2 instances of the php file if
> responding to 2 seperate requests for service. If your variables are being
> passed into the php file correctly this might be the case, don't know. But,
> making sure your variables are hitting the Host Server correctly would seem
> to be my first step in debugging. Perhaps you can use some tool but I would
> just use a print to a text file to see what values were hitting my Code
> Behind file in VWD.
>
> If you are dynamically generating the html which in turn is returned to the
> server for processing this might be a problem, at least that is about all I
> can think of.
>
> Sorry, never worked with php although thought about it often.
>
> Rick USA
>
>  ----- Original Message -----
>
> *From:* Punit Diwan <punit.diwan@xxxxxxx>
>
> *To:* programmingblind@xxxxxxxxxxxxx
>
> *Sent:* Friday, November 21, 2008 6:03 AM
>
> *Subject:* Re: PHP MYSQL and Apache Issue
>
>
>
>
> Yes you are right. Its server side scripting. Suppose if I right ech 2+2
> then the on browser we will get 4 as 2+2 is processed on server side and its
> response is sent to browser in the form of HTML. if I do echo '<H1> Hello
> World</H1>'' Then hello world will be sent to browser and the browser
> process the HTML Tag which is H1 and display the Phrase "Hello World" in
> Head 1
>         This is how PHP works.
>
>
> Punit Diwan
> Tata Consultancy Services
> Ph:- 04712519400
> Cell:- 09826092262
> Mailto: punit.diwan@xxxxxxx
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.        IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________
>
> =====-----=====-----=====
>
> Notice: The information contained in this e-mail
>
> message and/or attachments to it may contain
>
> confidential or privileged information. If you are
>
> not the intended recipient, any dissemination, use,
>
> review, distribution, printing or copying of the
>
> information contained in this e-mail message
>
> and/or attachments to it are strictly prohibited. If
>
> you have received this communication in error,
>
> please notify us by reply e-mail or telephone and
>
> immediately and permanently delete the message
>
> and any attachments. Thank you
>
>
>
>
>
>

Other related posts: