Jump to content

quiettech

Members
  • Posts

    82
  • Joined

  • Last visited

About quiettech

  • Birthday 08/23/1969

Contact Methods

  • Website URL
    http://www.quiettech.co.uk

Profile Information

  • Gender
    Not Telling
  • Location
    U.K.

quiettech's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello all, I've been doing PHP for around a month now. Even managed to produce a pro-bono website for a friend as part of my apprenticeship covering mysql access, minor security features (input validation mostly), SOAP, sessions and cookies. If you are interested in taking a peek, it's at http://www.mzproperty.co.uk. But that's beside the point. I'm quite happy with the language and its features, but there is one thing nagging me that I can't find an answer for on my yet small book collection (if you can call 2 books a collection). I'm definitely wanting to get into OOP and make that my main conduct in developing php applications. It just feels natural to take this step; and even more so for someone like me who is coming from a background in programming languages where OOP takes centrestage. This is my question... In creating a class, I'm doing this on a script file that will be included in every php file that creates instances of that class. However it worries me that I may be forcing the server to reevaluate the class definition in every page that is requested and where objects of that class get instantiated. Basically every page is its own entity that forces all includes to be parsed from scratch. This is how I look at PHP. For bigger, more complex classes and hierarchies however this may become just too inefficient. How does PHP really work with Apache? In the absence of a caching mechanisms like eAccelerator, ZendOptimizer, PhpExpress and others, is there a certain level of caching occurring at least at session level that I can trust to not worry too much? Or do class definitions in fact get parsed over and over again with every request? TIA.
  2. Yup. Hence a meeting I had with them and my subsequent decision to move to another server. I'm still in a learning process of PHP, Apache and Linux. I cannot afford to have a customer service seemingly working against me.
  3. I will definitely take a look too. The price is not an issue, but within reasonable limits. And that is within those limits. Well, the information simply isn't there in most cases. However, as I said I wasn't looking right because since we last spoke, everywhere I go to look for a VPS solution, I now see root ssh access as if by magic. Oh well. The whole confusion arose from a series of emails I traded with this 1and1 customer support fella and... just nevermind. It's been a long day. Thanks again, you both.
  4. Just looking at that "Full Root Access" on the website says it all. Amazing feat, I must say. Because that's the first VPS I see offering that feature. Either that or I haven't been looking right. I've bookmarked it and will take a better look later today. I'll direct any further questions I might have their way. Thank you for the link.
  5. I'm not sure where to post this, so that probably means this is the place. I've just came from a tiresome meeting at a London based webhosting company. I didn't get what I want and wasn't even given a t-shirt or one of those cup rubber bases. Need your help in finding a good web hosting company. Price is not so much an issue. Services offered is. I've been delving into these companies websites, but I gather the voice of experience speaks more truth than the voice of the marketing department. I'm wanting a Virtual Server plan where I can host and manage several websites, each with its own account and control panel. Not so much a reseller plan since I will be the one actually managing these websites, but the principle is the same. Of all the things I could ask for, I absolutely need the following. No company so far gives me all of them: PEAR/PECL with the ability to install libraries Ability to install php modules. In the very least a friendly support team that actually says yes when the time comes to request the installation of an .so cron jobs (most do. But since it's essential to me, here it is) Ability to install and configure smarty outside htdocs Ability to access database from client software in another location. I mean, phpmyadmin is nice and all, but I want to use my own mysql client (through ssh tunneling if it needs to) The closest I found so far was HostGator. But they don't seem to allow mysql access outside phpMyAdmin and I'm eerie of their "we'll evaluate your request" for the first and second points as noted on the website. Sounds like they won't.
  6. You must escape double quotes that you wish to be part of a string. The escape character in PHP is the \ (backslash). <?php echo "He turned around, \"It is time you get to bed!\". He stood there waiting for an answer."?> Meanwhile, since you are not parsing anything inside those strings, you should instead use single quotes and get used to them as a means to express strings in PHP. You only want to use double quotes when you mean to parse their contents. <?php $myvar = 2; echo "You are right. It's past {$myvar}am"; ?> Finally check the PHP manual for other special characters that need to be escaped.
  7. Note sure where to put this, but I have a feeling this is the best option considering it is mostly about Apache behavior. I'm trying to better understand the decision to remove persistent connections from the mysqli PHP extension. After reading a few articles on the matter, the general idea seems to be that persistent connections are "evil". This to do mostly with the fact MySQL doesn't provide sound support for this connection type (lacks support for locks and failed transactions, for instance)... Regardless, what I don't understand is persistent connections in the context of Apache child processes. So I need your help. How does Apache connect to MySQL. My understanding so far was that Apache was the owner of this connection and that it was identified as the client. When a web user, regardless of session state, requests a web page that connects to MySQL, if there is a persistent connection in place, they will use that one connection. In short, no matter how many users I have accessing my website, only one connection to mysql exists if I pool all those through mysql_pconnect(). Isn't this so? Why are Apache child processes mentioned over and over again?
  8. Thanks mj, Another thing that occurred to me after posting (it's always after posting, bleh!) is that I could document.write the whole anchor tag. On that case a <noscript> tag would become a viable alternative. Anyways, either way it's solved. Thanks again.
  9. Hello all, I'm having trouble defining how I should complement event handlers in a situation where javascript is either disabled or not supported. I have a simple event handler: <a href='#' onclick="doPrice('<?php echo $_SESSION['currency'] ?>')">Change to <?php echo $_SESSION['currency'] == 'EUR' ? 'Pounds.' : 'Euros.'; ?></a> All doPrice() does is set a cookie and alter the DOM to display prices in the correct currency. I want server side scripting to do this for me in case javascript is not available. The problem is not how to do it with PHP. The problem is how to correctly present a noscript tag to replace the above. How do you replace event handlers in no script situations?
  10. Thank you effigy. Looking over these two commands on the web. I've checked with the help of 'dir' that indeed that the owner of these files is ftpusers. All I need to know now is how is apache identified in the system so I can change these files ownership. Any ideas?
  11. Echo those $sql variables. Then post them here please, noting which echo corresponds to what query. That will helps heaps
  12. Hello all, My experience on linux and apache is still very limited. So this may be quite the noob question. However being so tied up with the PHP learning process, I would appreciate if you apologized me for not looking for an answer myself and instead do the lazy thing and post here. I'm trying to control access to some files on my webhost through chmod. Basically I want certain files to be set to 600 and folders to 700, limiting their access to the owner only. However something I've read earlier confused me... If these files were uploaded through FTP, does this really mean Apache is not the owner? How can I revert that? I'm chmoding the files the quick way after uploading them and from within the FTP client application.
  13. This is doable jsphp. But for best results it involves creating one preg_replace for every operation; that is one for INSERT INTO, another for CREATE TABLE, etc. But before we get into the details of that, I'm pretty sure Postgre supports sophisticated logging operations schema wide (not confirmed. Just my guess). This would be a much better approach. What do you think?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.