php-general Digest 18 Sep 2013 09:20:48 -0000 Issue 8366

Topics (messages 322076 through 322082):

Re: Resolving a PHP Notice Error
        322076 by: Daniel Brown
        322077 by: Sebastian Krebs

assign database result to iinput text box
        322078 by: iccsi

high traffic websites
        322079 by: Negin Nickparsa
        322080 by: Sebastian Krebs
        322081 by: Negin Nickparsa
        322082 by: Camilo Sperberg

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Tue, Sep 17, 2013 at 3:38 PM, Ron Piggott
<ron.pigg...@actsministries.org> wrote:
>
> I am wanting to establish a default sort by preference when the user hasn’t 
> specified one.  I setup to test this with:
>
> <?php
>
> if ( !is_set( $sort_by_preference ) ) {

    Did you create a function is_set(), or did you mean to use the
construct isset()?

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

--- End Message ---
--- Begin Message ---
2013/9/17 Ron Piggott <ron.pigg...@actsministries.org>

>
> I am wanting to establish a default sort by preference when the user
> hasn’t specified one.  I setup to test this with:
>
> <?php
>
> if ( !is_set( $sort_by_preference ) ) {
>
>     $sort_by_preference = "government_wording";
>
> }
>
> ?>
>
> But I am receiving a Notice error:
>
> Notice:  Undefined variable: sort_by_preference in GIFI_codes.php on line
> 11- Line 11 is “if ( !is_set( $sort_by_preference ) ) {“What is the correct
> way to test this without triggering a Notice error?Ron
> Ron Piggott
>

Because actually you are looking for isset() (not is_set()).


>
>
>
> www.TheVerseOfTheDay.info
>



-- 
github.com/KingCrunch

--- End Message ---
--- Begin Message --- I have following html code to show my input text box and php to connect server and select result from database server. I would like to know how I can I use php to assign the value to my input text.
Your help and information is great appreciated,

Regards,

Iccsi,

<INPUT type="text" name="Mytxt" id="MytextID" />


<?php
$username = "root";
$password = "myPassword";
$hostname = "localhost";

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
 or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";

//select a database to work with
$selected = mysql_select_db("iccsimd",$dbhandle)
 or die("Could not select aerver");

//execute the SQL query and return records
$result = mysql_query("SELECT invid, invdate, note, amount FROM invheader");


--- End Message ---
--- Begin Message ---
In general, what are the best ways to handle high traffic websites?

VPS(clouds)?
web analyzers?
dedicated servers?
distributed memory cache?


Sincerely
Negin Nickparsa

--- End Message ---
--- Begin Message ---
2013/9/18 Negin Nickparsa <nickpa...@gmail.com>

> In general, what are the best ways to handle high traffic websites?
>
> VPS(clouds)?
> web analyzers?
> dedicated servers?
> distributed memory cache?
>

Yes :)

But seriously: That is a topic most of us spent much time to get into it.
You can explain it with a bunch of buzzwords. Additional, how do you define
"high traffic websites"? Do you already _have_ such a site? Or do you
_want_ it? It's important, because I've seen it far too often, that
projects spent too much effort in their "high traffic infrastructure" and
at the end it wasn't that high traffic ;) I wont say, that you cannot be
successfull, but you should start with an effort you can handle.

Regards,
Sebastian


>
>
> Sincerely
> Negin Nickparsa
>



-- 
github.com/KingCrunch

--- End Message ---
--- Begin Message ---
Thank you Sebastian..actually I will already have one if qualified for the
job. Yes, and I may fail to handle it that's why I asked for guidance.
I wanted some tidbits to start over. I have searched through yslow,
HTTtrack and others.
I have searched through php list in my email too before asking this
question. it is kind of beneficial for all people and not has been asked
directly.


Sincerely
Negin Nickparsa


On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs <krebs....@gmail.com>wrote:

>
>
>
> 2013/9/18 Negin Nickparsa <nickpa...@gmail.com>
>
>> In general, what are the best ways to handle high traffic websites?
>>
>> VPS(clouds)?
>> web analyzers?
>> dedicated servers?
>> distributed memory cache?
>>
>
> Yes :)
>
> But seriously: That is a topic most of us spent much time to get into it.
> You can explain it with a bunch of buzzwords. Additional, how do you define
> "high traffic websites"? Do you already _have_ such a site? Or do you
> _want_ it? It's important, because I've seen it far too often, that
> projects spent too much effort in their "high traffic infrastructure" and
> at the end it wasn't that high traffic ;) I wont say, that you cannot be
> successfull, but you should start with an effort you can handle.
>
> Regards,
> Sebastian
>
>
>>
>>
>> Sincerely
>> Negin Nickparsa
>>
>
>
>
> --
> github.com/KingCrunch
>

--- End Message ---
--- Begin Message ---
On Sep 18, 2013, at 09:38, Negin Nickparsa <nickpa...@gmail.com> wrote:

> Thank you Sebastian..actually I will already have one if qualified for the
> job. Yes, and I may fail to handle it that's why I asked for guidance.
> I wanted some tidbits to start over. I have searched through yslow,
> HTTtrack and others.
> I have searched through php list in my email too before asking this
> question. it is kind of beneficial for all people and not has been asked
> directly.
> 
> 
> Sincerely
> Negin Nickparsa
> 
> 
> On Wed, Sep 18, 2013 at 10:45 AM, Sebastian Krebs <krebs....@gmail.com>wrote:
> 
>> 
>> 
>> 
>> 2013/9/18 Negin Nickparsa <nickpa...@gmail.com>
>> 
>>> In general, what are the best ways to handle high traffic websites?
>>> 
>>> VPS(clouds)?
>>> web analyzers?
>>> dedicated servers?
>>> distributed memory cache?
>>> 
>> 
>> Yes :)
>> 
>> But seriously: That is a topic most of us spent much time to get into it.
>> You can explain it with a bunch of buzzwords. Additional, how do you define
>> "high traffic websites"? Do you already _have_ such a site? Or do you
>> _want_ it? It's important, because I've seen it far too often, that
>> projects spent too much effort in their "high traffic infrastructure" and
>> at the end it wasn't that high traffic ;) I wont say, that you cannot be
>> successfull, but you should start with an effort you can handle.
>> 
>> Regards,
>> Sebastian
>> 
>> 
>>> 
>>> 
>>> Sincerely
>>> Negin Nickparsa
>>> 
>> 
>> 
>> 
>> --
>> github.com/KingCrunch
>> 

Your question is way too vague to be answered properly... My best guess would 
be that it depends severely on the type of website you have and how's the 
current implementation being well... implemented.

Simply said: what works for Facebook may/will not work for linkedIn, twitter or 
Google, mainly because the type of search differs A LOT: facebook is about 
relations between people, twitter is about small pieces of data not mainly 
interconnected between each other, while Google is all about links and all type 
of content: from little pieces of information through whole Wikipedia.

You could start by studying how varnish and redis/memcached works, you could 
study about how proxies work (nginx et al), CDNs and that kind of stuff, but if 
you want more specific answers, you could better ask specific question.

In the PHP area, an opcode cache does the job very well and can accelerate the 
page load by several orders of magnitude, I recommend OPCache, which is already 
included in PHP 5.5.

Greetings.


--- End Message ---

Reply via email to