Reply to Re: Re-opening a file

Your name:

Reply:


Posted by Jerry Stuckle on 07/16/07 00:17

W Marsh wrote:
> On 15 Jul, 15:27, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> W Marsh wrote:
>>> On 15 Jul, 14:41, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>> Sorry, my crystal ball is in the shop. I have no idea what might be
>>>> happening. Maybe if you post your code...
>>> No. For one thing it's private, commercial code, and secondly, I've
>>> given enough information about the problem.
>> Maybe in your opinion you have. But you have given us no idea about how
>> you're going about the problem or a lot of other things.
>>
>> If you had given enough information, we could help you.
>>
>> And BTW - in PHP there is no such thing as "private" code. Once you
>> give it to a customer the source is available, unless you get one of the
>> encryption engines, i.e. from Zend.
>
> Well, there is. Not a single person outside of the company will ever
> see this code, because it's a backend system that powers customer
> facing front ends. Surely you have come across such a situation
> before! Not all PHP ends up as forum software.
>

So? That makes it so special? ROFLMAO!

>>> I don't appreciate people making sarcastic comments like that. If you
>>> have no idea about the problem then keep quiet, or if you genuinely
>>> are missing important details, make a polite request, e.g. "Are you
>>> doing X between closing and re-opening the file?". I'm not an outlet
>>> for problems with your insecurities and ego.
>> And I don't appreciate people arguing that they have provided enough
>> information when they are asking for help.
>>
>> I have no insecurities, and my ego isn't a problem. But obviously yours
>> are.
>
> I'm sure you don't like Google Groups, but it's a useful tool.
> Searching your posts reveals the same attitude across the board. Your
> prey is innocent people requesting help, and you feed on them by
> taking any opportunity you can to point out flaws in their questions,
> or failing that, their posting style. It's an all too common geekish
> attitude, and you're only embarrassing yourself by conforming
> wholesale to an unattractive, unintelligent stereotype. Pretending
> that you don't understand the question because it isn't formatted to
> your requirements is just obtuse. I understand your pain, and I'm
> guilty of similar things to some extent, but your arrogance record and
> tag team bullying is awful.
>

And quite frankly, I really don't give a damn what you think. And if
you really searched, you would find a lot of good information coming
from me, also.

I'm just past the point in my lifetime that I need to suffer assholes
like you who post insufficient information and expect us to guess at the
answer.

As for whether I like Google Groups or not - the fact you use them is an
excellent indication of your IQ.

>>> If you really are that unimaginative, then here's some code (using my
>>> own original description as a design spec, proving my point somewhat):
>> I don't need to be "imaginative". I can come up with at least a half
>> dozen ways to do what your description says you're doing.
>>
>> I need to see the code YOU are using.
>>
>> If you want help here, you need to get rid of the attitude and post
>> something which SHOWS the problem.
>
> If you want to help here... etc. etc.
>

Exactly. You're the one asking for help, not me. And with your
attitude, you won't get much help here.

OTOH, if you want to pay my regular rate ($125/hr., 4 hour minimum,
payable in advance), I'll be glad to guess at your problem. And when
your 4 hours runs out, you can pay for another 4 hours of my time.


>>
>>
>>> define(FILE_NAME, "somefile.txt");
>>> $dataOrig = array("here", "is", "some", "data", "to", "be",
>>> "serialized");
>>> $file = fopen(FILE_NAME, "w");
>>> flock($file, LOCK_EX);
>>> fwrite($file, serialize($dataOrig));
>>> fclose($file);
>>> $file = fopen(FILE_NAME, "r");
>>> $dataNew = unserialize(fread($file, filesize(FILE_NAME)));
>>> print_r($dataNew); // Expected output: Array ( [0] => here [1] => is
>>> [2] => some [3] => data [4] => to [5] => be [6] => serialized )
>>> It is not representative of the original code in terms of design or
>>> error checking, but it does reproduce the problem on the production
>>> server (no output, due to getting no data in the original file). It
>>> does however run correctly on a my own web server, which suggests the
>>> problem is one of configuration that somebody with experience in this
>>> field could shed some light on, which I would be grateful for.
>>> Do you see?
>> Now we're getting someplace - and this is MUCH DIFFERENT than your
>> original problem. The fact it works on one server but not another is
>> something you never mentioned before, for instance.
>
> Yes, that would have been useful information. I would have provided it
> in a much nicer way if you made a less sarcastic request, and I hadn't
> just looked at your other posts!
>

Not at all a sarcastic comment. Actually, one you will find quite often
in this group from several people when assholes like you expect us to
guess at their problem.

>> For one thing, you don't have all errors enabled - or you would have
>> seen that your first line is wrong. It should be:
>>
>> define('FILE_NAME', "somefile.txt");
>
> Yuck. I dislike PHP, as a language. I wish that I didn't have to use
> it. It seems almost designed to catch the programmer out - a syntax
> error should be rigid. The fact that the code works anyway seems more
> like a "syntax recommendation". It is ridiculous for PHP to make the
> assumption that the programmer has read every detail of the (poor)
> documentation that exists for language elements, and punish the time-
> pressed newcomer by expecting him to know that there is an option for
> enabling all errors.
>

I find the documentation is excellent. But you need to READ it -
something you have obviously not done.


>> Now some other questions:
>>
>> What versions of PHP are the two systems using?
>
> I can't be minor version accurate about the production server on a
> Sunday, but I know it's PHP5. The server I did the successful test on
> is running PHP 4.4.2.
>
>> What OS are they using?
>
> Production: Gentoo Linux.
> Test: Ubuntu Linux
>
>> What directory are you writing the file to?
>
> Production: /usr/censored/censored2/files/
> Test: /home/var/wwwroot/vhosts/sitename.com/httpdocs
>
>> Do you have permission to flock() the file?
>
> Yes.
>
>> Once I corrected the above problem your code works on two different systems.
>
> I suspect it will work on most systems, which is unfortunate for me,
> as it probably means I am facing an obscure configuration issue.
>
> Thanks for your help.
>
>

And quite frankly, from the rest of your attitude, I'm not interested in
spending any more of my volunteer time helping you. If you want to pay
for my help, let me know via email.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация