Re: [PHP] https question

2013-09-25 Thread Daniel Brown
On Wed, Sep 25, 2013 at 1:55 PM, Tedd Sperling  wrote:
> Hi gang:
>
> I have a client who had his entire site moved to another host -- no big 
> problem.
>
> However, the old site had a https directory, where I had secure scripts to do 
> credit-card transactions, but the new site doesn't have a https directory -- 
> in fact it doesn't even have a http directory at all. So, what options do I 
> have to do secure transactions?
>
> I remember someone saying that this could be done via a .htaccess file, but I 
> don't have the code, nor am I positive this is the answer.
>
> What do you recommend?

Sounds like it may have been moved from a Plesk server to a
non-Plesk server (or something using a similar path setup).  If it's
still Apache-based, yes, an .htaccess mod_rewrite directive should
suffice.  And, while it's out-of-scope for this list, an example, for
posterity:

# .htaccess - placed in the web root
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [QSA,R,L]


-- 

Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Friday's Question

2013-09-20 Thread Daniel
25 network admin and programmer and yes I use a mouse pad - my mouse
hates me if I dont use it.

-- 
Regards,
Daniel Fenn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Friday's Question

2013-09-20 Thread Daniel Brown
On Fri, Sep 20, 2013 at 1:20 PM, Jen Rasmussen  wrote:
> LOL. What in the heck is a Bag Bomb?

He's referring to Bag Balm.

http://www.bagbalm.com/


-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Friday's Question

2013-09-20 Thread Daniel Brown
On Fri, Sep 20, 2013 at 12:51 PM, Tedd Sperling  wrote:
> Hi gang:
>
> Do you use a Mousepad?

I'm in my mid-thirties and - despite having an optical mouse - I
do indeed still use a mousepad.  A customized one that the wife did
for me for Christmas one year: images of Futurama, the Cleveland
Browns, Minnesota Vikings, and several aircraft, all surrounding a
picture of her and our daughter.  I've found that shiny surfaces -
such as my desk - reflect too much of the laser, causing the mouse to
be far less responsive.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Resolving a PHP Notice Error

2013-09-17 Thread Daniel Brown
On Tue, Sep 17, 2013 at 3:38 PM, Ron Piggott
 wrote:
>
> I am wanting to establish a default sort by preference when the user hasn’t 
> specified one.  I setup to test this with:
>
> 
> if ( !is_set( $sort_by_preference ) ) {

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

-- 

Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP-5.5.2 +opcache segfaults with Piwik

2013-09-03 Thread Daniel
Just so that you know, I've posted in the forum topic as well:
http://forum.piwik.org/read.php?2,105879
Regards,
Daniel Fenn






On Tue, Sep 3, 2013 at 12:42 AM, Lester Caine  wrote:
> Jan Ehrhardt wrote:
>>>
>>> Could you try to add a function_exists check to
>>> >libs/upgradephp/upgrade.php?
>>> >
>>> >This at the function declaration of _json_encode:
>>> >if (!function_exists('_json_encode')) { function _json_encode($var, ...
>>> >
>>> >And a extra } at the end.
>>
>> This patch, together with upgrading to the latest OPcache from github
>> solved my segfaults and fatal errors.
>
>
> Jan  - could you post the solution on http://dev.piwik.org/trac/ticket/4093
> - better that you get the credit than one of us pinch it ;)
>
>
> --
> Lester Caine - G8HFL
> -
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] exec and system do not work

2013-08-27 Thread Daniel Brown
On Sun, Aug 25, 2013 at 11:41 PM, Ethan Rosenberg
 wrote:
> Dear List -
>
> I'm lost on this one -
>
> This works -
>
> $out = system("ls -l ",$retvals);
> printf("%s", $out);
>
> This does -
>
> echo exec("ls -l");
>
> This does not -
>
> if( !file_exists("/var/www/orders.txt"));
> {
>$out = system("touch /var/www/orders.txt", $ret);
>$out2 = system("chmod 766 /var/www/orders.txt", $ret);
>echo 'file2';
>echo file_exists("/var/www/orders.txt");
> }



-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to send "post"-variables in a "Location" header

2013-08-27 Thread Daniel Brown
On Mon, Aug 26, 2013 at 3:48 PM, Ajay Garg  wrote:
> Hi all.
>
> I have a scenario, wherein I need to do something like this ::
>
> ###
> $original_url = "/autologin.php";
> $username = "ajay";
> $password = "garg";
>
> header('Location: ' . $original_url);
> ###
>
> As can be seen, I wish to redirect to the URL "autologin.php".
>
> Additionally, I wish to pass two POST key-value pairs :: "user=ajay" and
> "password=garg" (I understand that passing GET key-value pairs is trivial).
>
> Is it  even possible?
> If yes, I will be grateful if someone could let me know how to redirect to
> a URL, passing the POST key-value pairs as necessary.

No.  Sending a 'Location:' header issues an HTTP 301 by default,
which means the browser will follow it using a GET request.  If you
can't pass the information from one location to another using sessions
or (less ideally) cookies, you might consider doing a cURL POST
request in the background and passing the session ID back to the
browser, and having it handle it appropriately (read: session
hijack).

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Permissions

2013-08-27 Thread Daniel Brown
On Tue, Aug 27, 2013 at 3:07 AM, David Robley  wrote:
>
> I beg to differ here. If the x bit isn't set on a directory, that will
> prevent scanning of the directory; in this case apache will be prevented
> from scanning the directory and will return a 403.

Well, that's partially correct.  If a directory is owned by
someone other than the current user (for example, root) and is 0776,
you can list the directory content from outside of the directory to
get a basic file listing.  What you won't get by doing that, however,
is anything other than the file name and type, because the kernel is
forbidden from executing mtime, ctime, and owner/group queries on the
files.  In addition, you won't be able to enter the directory (cd).

That said, if Ethan is running his Apache server as the user
'ethan' (which isn't mentioned) then it would be fine regardless.

As for the 's' notation, that's either a bitmask of 0400 or 0200,
which are for setuid and setgid, respectively.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Off the wall - sub-domain question

2013-08-27 Thread Daniel Brown
On Wed, Aug 21, 2013 at 5:16 PM, Jim Giner  wrote:
> I have a main domain (of course) and a sub domain.  I'm really trying to
> steer my personal stuff away from the main one and have focused all of my
> php development to the sub-domain.
>
> Lately I noticed that google catalogs my sub-domain site stuff under the
> main domain name and the links that come up lead to that domain name with
> the path that takes the user to the sub-domain's home folder and beyond.
>
> Is there something that php (apache??) can do to control either google's
> robots or the user's view (url) so that it appears as a page of my
> sub-domain?  I'm really new at this stuff and know nothing.  I'm lucky that
> google is even finding my site!

You'd probably want to do some 301 redirects with mod_rewrite to
force the domain over to the subdomain if under that directory.  In so
doing, Google (and other search engines) will drop the /subdomain
folder, and index only the destination.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Output to File Instead of Browser

2013-08-20 Thread Daniel Pöllmann
Buffering is the more comftable way because if you write all html to a
variable, output that might be created in a function, you did not modify
will not be included.

Non critical errors that create an output (notice/warning) will not ve
included as well.

Another way would be to create a script which makes a http request to the
output script and saves the response to the file

Daniel
Am 20.08.2013 18:39 schrieb "Floyd Resler" :

> I have a php file that generates a form.  Of course, this displays in the
> browser.  How can I have the form generated from my script but either saved
> to a file or the output returned to another script?
>
> Thanks!
> Floyd
>
>


Re: [PHP] PHP vs JAVA

2013-08-20 Thread Daniel Brown
On Tue, Aug 20, 2013 at 10:00 AM, Tedd Sperling  wrote:
> Hi guys:
>
> A teacher at my college made the statement that JAVA for Web Development is 
> more popular than PHP.
>
> Where can I go to prove this right or wrong -- and/or -- what references do 
> any of you have to support your answer? (sounds like a teacher, huh?)
>
> Here are my two references:
>
> http://w3techs.com/technologies/details/pl-php/all/all
>
> http://w3techs.com/technologies/history_overview/programming_language/ms/y
>
> But I do not know how accurate they are.
>
> What say you?

While I couldn't find anything comparable - from the same source
and window of time - for Java trends on the web, there was an article
released by Netcraft in January of this year that shows PHPs continued
growth[1].  It may, at the least, provide a basis for comparison
should you or your adversary be so inclined to dig deeper.


^1: 
http://news.netcraft.com/archives/2013/01/31/php-just-grows-grows.html

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mysqli Extension

2013-08-19 Thread Daniel P. Brown
On Aug 19, 2013 2:32 PM, "Ethan Rosenberg" 
wrote:
>
> Dear List -
>
> My mysqli extension seems to have gone away.
>
(REACTED)

Remember: avoid putting passwords - especially for root users - on a
public mailing list, which is also permanently archived.

> echo "hello2";
> var_dump(function_exists('mysqli_connect'));// this returns boo(false)
> $db = 'Store';
> $cxn = mysqli_connect($host,$user,$password,$db);
>
> I tried to reinstall -
>
> rosenberg:/home/ethan#  apt-get install php5-common libapache2-mod-php5
php5-cli
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> libapache2-mod-php5 is already the newest version.
> libapache2-mod-php5 set to manually installed.
> php5-cli is already the newest version.
> php5-cli set to manually installed.
> php5-common is already the newest version.
> php5-common set to manually installed.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
> It did not help.
>
> TIA
>
> Ethan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


Re: [PHP] Finally....

2013-08-17 Thread Daniel
Yay, Thankyou :)
Regards,
Daniel Fenn






On Sat, Aug 17, 2013 at 2:30 AM, Robert Cummings  wrote:
> On 13-08-16 11:58 AM, Marc Guay wrote:
>>
>> Those Belgacom emails were the only thing keeping me from a crushing
>> loneliness - undo!
>
>
> *sniffle* Another friend bites the dust *sniffle*.
>
>
> --
> E-Mail Disclaimer: Information contained in this message and any
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure,
> copying, and distribution are prohibited unless authorized.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Finally....

2013-08-16 Thread Daniel Brown
# ezmlm-list ~ezmlm/php-general | grep skynet
supp...@skynet.be

# ezmlm-unsub ~ezmlm/php-general supp...@skynet.be

# ezmlm-list ~ezmlm/php-general | grep skynet
#

No more of those "Your e-mail concerning our products and
services" autoreplies from the Belgacom Webteam.  Sorry it took me
this long to realize it and get around to it.

Happy Friday.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to upstream code changes to php community

2013-08-16 Thread Daniel Brown
On Tue, Aug 13, 2013 at 12:38 AM, Shahina Rabbani
 wrote:
> Hi,
>
> I have done some modifications to the php source code and i tested it with
> php bench and I observed  some improvement.
>
> I wanted to upstream these code changes to PHP community.
> I searched the wed but i didnt find proper guide to upstream the code to
> php.
>
> Please help me by  providing the information how to upstream my code
> changes to php  source code community.

Start by subscribing to intern...@lists.php.net and introducing
yourself on that list, which is intended for the discussion of the
ongoing development of the runtime and related things.  You may also
want to hop on EFNet and join #php.pecl, which - like internals@ - is
specifically for discussion of furthering the core development (not
for any time of support).

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session Vars not staying active

2013-08-03 Thread Daniel P. Brown
On Aug 3, 2013 3:03 PM, "dealTek"  wrote:
>
> Hi all,
>
>
> I am having trouble with session vars.
>
> I'm trying to implement the credit card direct pay method outlined here...
>
> http://developer.authorize.net/api/dpm/
>
> - Basically, page 1 is my form that goes outside my site to the cc
gateway company then comes back with a result... (PG2)
>
> Problem: if I try to create session vars on page 1 - they don't work on
page 2.
>
> Am I correct in thinking that when this process leaves my site and goes
to the gateway, then returns, it is similar to creating a new session and
that is why the session vars don't remain active?
>
> Thanks in advance.

Are you calling session_start() on both pages or at least using a
session auto start?  Also, is the API returning the data by redirecting the
client (browser) or doing a postback?

If the remote server is calling back behind the scenes, then you'll
need a workaround and additional processing, or the ability to pass the
session ID and assume the client-initiated session (not ideal).  If it's
all processed by the browser, the redirection should have no bearing, as
the session will persist based upon the server-side data and the
client-side cookie; the server will have no knowledge of the client's
redirection to the payment gateway (nor any remote destination).


Re: [PHP] suhosin and 5.4 onwards

2013-08-03 Thread Daniel
Well I do not use suhosin as I can lock down PHP with things like
disable_function, disable_classes along with more advance function
such as chroot and mod_security.

On 8/3/13, Nick Edwards  wrote:
> Ok, so I know this might start flame wars, but... here goes ;)
>
> It seems suhosin  is dead as far as 5.4 goes, now, some make
> allegations that it is no longer needed since php has allegedly
> incorporated much of its safe guards, but these claims are from self
> proclaimed experts (a term i use very loosley) on forums and blogs.
>
> So, is the general opinion here, from actual "factual experience"  and
> not because you read the same trashy bloggers as I did,  in agreeance?
>  is it genuinely true that suhosin is now irrelevant with 5.4 upwards
> and php is now much safer on its own?
>
> We have always appreciated its work to stop plugins and so forth
> escaping local jails by example   open_base  or some other lock-down
> type setting, plus injections and so forth.
>
> if php has incorporated such, thats fine, but I have no idea where to
> turn to ask for factual information on this, so I'm asking here and
> hope that a dev or someone in the inner circle knows the facts, and
> not rumours or sumizes, or a tleast more facts than half the self
> appointed gurus claim :)
>
> Thanks
> Nikki
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Regards,
Daniel Fenn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] /tmp/directory

2013-07-23 Thread Daniel Brown
On Mon, Jul 22, 2013 at 10:10 PM, Tedd Sperling  wrote:
> On Jul 22, 2013, at 4:10 PM, Matijn Woudt  wrote:
>
>> On Mon, Jul 22, 2013 at 5:20 PM, Tedd Sperling  wrote:
>>
>>> Hi gang:
>>>
>>> I should know this, but I don't.
>>>
>>> Where is the /tmp/ directory?
>>>
>>> You see, I have a client where his host has apparently changed the /tmp/
>>> directory permissions such that old php/mysql scripts cannot write to the
>>> /tmp/ directory anymore -- they did at one time.
>>>
>>> So, how do I fix it?
>>>
>>> Cheers,
>>>
>>> tedd
>>>
>>>
>> Switch host? /tmp is required by the FHS and POSIX standards (writable for
>> any user), any host changing that should have no customers.
>>
>> - Matijn
>
>
> Good point -- we will add that reason to the many other reasons why we are 
> changing host.
>
> Keep in mind, the installed software worked for nearly a decade and now the 
> host has changed something that caused this error, but the current host 
> doesn't seem to know what happened.

If it's /tmp, it's /tmp.  The leading slash indicates that it's in
the filesystem root.  However, if it's just tmp, then it could - and
probably is - under the client's home directory.  Unless they're
chrooted; then it could be displayed as /tmp, but would actually be
virtualized by the OS, where /tmp isn't really /tmp, but could be
/var/virtfs/user/tmp.

Confusing?  Sure.  Off-topic for the list?  Sort of, but that's
easy enough to change.

Since you can't use get_sys_temp_dir() on 4.3.10, you should
instead see if $_ENV contains an array key for TMP, TMPDIR, or TEMP.
Or, if you'd rather, you can use getenv('TMP') and the like.  It
doesn't mean that you'll get any useful information back (or anything
at all, necessarily), but it's another thing to try when using such an
antiquated version (I believe it was released at the end of 2004).

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] pass parameter from client to server

2013-07-18 Thread Daniel Brown
On Thu, Jul 18, 2013 at 6:04 PM, iccsi  wrote:
> I have a select control on the form and need to pass value user select to my
> query parameter.
> I just realized that user entry value is client side and query parameter is
> server side.
> Are there any way to read client parameter to pass to server?
>
> You information and help is great appreciated,

Not from PHP unless you pass it via GET or POST, or as a cookie.
You may want to look into JavaScript, jQuery, and AJAX for your
specific needs, but that all gets beyond the scope of this list.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] I am completely lost and need an advice (beginner)

2013-07-18 Thread Daniel Brown
On Thu, Jul 18, 2013 at 3:08 PM, php colos  wrote:
> Hello world!
>
> I'm trying to learn PHP ( first programming language that I learn) and
> I feel kinda lost. I've read PHP programming 3rd edition( O'reilly),
> 'getting good with PHP' by Andrew Burgees and some tutorials on the
> internet but can't code something more complex than 'hello world'.
>
>
> I do understand functions/values/operators/control structures, etc but
> as I said, I feel that I can't use the language.
> Am I reading the wrong books for a beginner?
>
> Any advices?
>
>
>
> *Apologies if this email might seem confusing. :)

Perhaps I'm biased, but I think other folks will agree --- the
official documentation is your best source of learning second only to
your own experiences with the language.  Check through the user notes
as well, as they often provide very valuable insight and other
developers' personal experiences.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Error checking ON

2013-07-17 Thread Daniel Brown
On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling  wrote:
> Hi gang:
>
> Considering:
>
> On Jul 17, 2013, at 11:41 AM, Jim Giner  wrote:
>
>> Since you state that you haven't made any changes to the system (in 
>> general), I'm going to guess that you modified an 'included' file and it has 
>> an error in it, such as an unmatched curly brace.  As Dan said, turn on all 
>> error checking and reporting and see what message you get.
>
> This is what I do for error checking:
>
> ini_set('error_reporting', E_ALL | E_STRICT);
> ini_set('display_errors', 'On');
> ini_set('log_errors', 'On');
> ini_set('error_log', 'error_log');
>
> Is this:
>
> 1. Sufficient?
>
> 2. An overkill?
>
> 3. OK?
>
> 4. OR, better served with this (and provide an example).

That's standard practice.  Sometimes, though, it isn't enough, and
we find ourselves using Derick's Xdebug, mod_top, or performing an
strace on either the execution or attached to a process.  For nearly
all cases, though, that's sufficient without being overkill (except
for production cases).

--

Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Premature end of script

2013-07-17 Thread Daniel Brown
On Wed, Jul 17, 2013 at 11:22 AM, R B  wrote:
> Hello,
>
> 5 years ago, y developed a php system and was working fine. But 20 days
> ago, when y try to access to some pages (not all the pages), in the log
> appears this message and the page is not displayed:
>
> ==> /usr/local/apache/logs/error_log <==
> [Wed Jul 3 02:36:58 2013] [error] [client 10.30.6.161] Premature end of
> script
> headers: /home/capitale/public_html/miembros/myscript.php
>
> Can you help me please with this error?

It's the vaguest of all errors and the bane of the existence of
any developer who comes across it (at least it's rarer in PHP than it
was in Perl years ago).  Essentially, it would require a lot more
information that what's been provided for us to help you debug.

What things have changed in the last month?  Have you upgraded
PHP?  Made any changes to the code or any of the dependencies?  Is the
server out of available disk space?  Is something causing it to run
out of memory?  What happens when you run the same script from the
CLI?  What do you see when you enable all errors and error reporting?


--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to read PHP-FPM config values using phpinfo

2013-07-16 Thread Daniel
Hi there,

Just a question, do you have Apache configured to use the PHP-FPM and
not the Apache module? That something that people can mess up on.

Thanks :)



On Wed, Jul 17, 2013 at 9:58 AM, Amiya Maji  wrote:
> Hi all,
>
> I am using PHP-FPM with Apache 2.4. I periodically change my php-fpm.conf
> and reload it by sending USR2 signal to the FPM process. Is there a way to
> print the updated parameters in FPM using phpinfo().
> At present I am not seeing any FPM specific parameters in phpinfo. Any
> suggestion is appreciated.
>
> Thanks!
> Amiya.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Kickstarter Project on Massive Log data Aggregation and Processing with Open Source Software

2013-07-15 Thread Daniel Brown
On Jul 15, 2013 11:29 PM, "Israel Ekpo"  wrote:
>
> Hi Everyone,
>
[snip!]

No.  Good luck with your endeavor, but please do not broadcast it to
this list.


[PHP] Find a list of function that clashes?

2013-07-05 Thread Daniel
Hello all,

I'm just wondering if there is a way of getting a list of functions
that will clash across 2 folders.

I'm trying to update wp-united so that I can use it with WordPress
multisite. I know that some of the functions are the same in both
phpbb and WordPress. Is there any way of generating a list of all the
functions that are the same across both phpbb and WordPress?

Regards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] scandir doesn't find all files

2013-06-22 Thread Daniel Pöllmann
Hi,
I have some files in a directory - some are uploaded via ftp and some other
are created by a php script.

Scandir just finds the uploaded files, but none of the created files.
I can't run chown() because the server is part of shared hosting.

I can't find anything about this behavour in the documentation.

Best wishes,
Daniel


Re: [PHP] Re: [PHP-DEV] [PHP] PHP 5.5.0 final has been released!

2013-06-21 Thread Daniel
I hope this will get people like WordPress to get up and support
mysqli out of the box. going to cause big issues if they don't.






On Sat, Jun 22, 2013 at 8:59 AM, Martin Amps  wrote:
> I second this - great to see both finally available. Fantastic release!
>
> Martin Amps | CIO
> www.iCracked.com
> iCracked | Redwood City, CA
>
> On Jun 21, 2013, at 2:01 PM, Julian  wrote:
>
>> Awesome work and the new design for the php.net website is also nice ;)
>>
>> Am 20.06.2013, 23:22 Uhr, schrieb Julien Pauli :
>>
>>> Hello!
>>>
>>> The PHP Development Team would like to announce the immediate release of
>>> PHP 5.5.0. This release includes a large number of new features and bug
>>> fixes.
>>>
>>> A separate release announcement is also available. For changes in PHP
>>> 5.5.0 since PHP 5.4, please consult the PHP 5 ChangeLog.
>>>
>>> Release Announcement: http://www.php.net/release_5_5_0.php
>>> Downloads:http://www.php.net/downloads.php#v5.5
>>> Changelog:http://www.php.net/ChangeLog-5.php#5.5.0
>>>
>>> Thanks to all contributors that made this new version available.
>>>
>>> regards,
>>>
>>> David Soria Parra & Julien Pauli
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A Strange Problem

2013-06-20 Thread Daniel Brown
On Thu, Jun 20, 2013 at 2:14 PM, Tedd Sperling  wrote:
> Bastien:
>
> You were right on - by changing the directory to what I needed, everything 
> works.
>
> My follow-up question is "Why?"
>
> I have *never* had to specifically tell any script to chdir() -- why with 
> that one?

Sounds like either a chroot or virtual environment (such as,
execution of the script in a separate directory) issue.  Check the
output of this:

= 5.3) {
echo __DIR__.PHP_EOL;
} else {
echo getcwd().PHP_EOL;
}
?>

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hoping nobody notices it isn't Friday.

2013-06-18 Thread Daniel Brown
On Tue, Jun 18, 2013 at 1:36 PM, Richard Quadling  wrote:
> Hi.
>
> We've all been told that 'free software' is to be thought of as 'free
> speech', not 'free beer'.
>
> Well, I hope to muddy the waters with this link.
>
> https://www.facebook.com/TheFreeBeerApp

I'd say that I'd make an exception, but since it appears to only
be available for you Redcoats, I'll remind you that today is Tuesday,
and admonish you for making the week feel that much longer for all of
us.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
To be more technical:

If intval('8315e839da08e2a7afe6dd12ec58245d') would return NULL instead of 8315 
then PHP would be still weak-typed and the developer could know that the 
conversion failed. Good idea? Of course NULL should be transparent in 
operations like +. So 0 + NULL should be still 0.

Regards
Daniel

-Ursprüngliche Nachricht-
Von: BUSCHKE Daniel 
Gesendet: Donnerstag, 13. Juni 2013 13:28
An: 'Pete Ford'; php-general@lists.php.net
Betreff: AW: AW: [PHP] PHP is Zero

Hi,

> It gives up when it finds a non-numeric character (as the documentation would 
> tell you)

Why is PHP doing that? I know it works as designed and I know it is documented 
like this but that does not mean that it is a good feature, does it? So lets 
talk about the question: Is that behaviour awaited by PHP software developers? 
Is that really the way PHP should work here? May we should change that?!

BTW: I talked to some collegues and friends since my first post. They all 
guessed that "'PHP' == 0" is false within a few seconds. I think the 
weak-typed-PHP is a little to weak at this point.

Regards
Daniel


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi,

> It gives up when it finds a non-numeric character (as the documentation would 
> tell you)

Why is PHP doing that? I know it works as designed and I know it is documented 
like this but that does not mean that it is a good feature, does it? So lets 
talk about the question: Is that behaviour awaited by PHP software developers? 
Is that really the way PHP should work here? May we should change that?!

BTW: I talked to some collegues and friends since my first post. They all 
guessed that "'PHP' == 0" is false within a few seconds. I think the 
weak-typed-PHP is a little to weak at this point.

Regards
Daniel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi,
thanks for your answer. Especially the answer "42" made me laughing :)

My "Why" questions should be understand as "Why must it be like that" questions.

>> On 13/06/13 08:59, BUSCHKE Daniel wrote:
>> 5. Thats a bug I have opend: https://bugs.php.net/bug.php?id=51739 where I 
>> also had the same problems because "8315e839da08e2a7afe6dd12ec58245d" was 
>> converted into float(INF) by throwing everything starting from "da08.." away.
>>
> That's a very different proposition, and probably has more to do with word 
> size: float is 32-bit, so only the first 32 bits are used and if anything 
> else is found the conversion falls back to INF. To handle really big integers 
> like 8315e839da08e2a7afe6dd12ec58245d you probably need a more specialist 
> library (or language)

For me it is not. PHP throws things away during conversion. In my opinion a 
language (compiler, interpreter whatever) should not do that. Never ever! 
Either it is able to convert the value or it is not.

What about of returning "null" instead of "0" if the conversion is not perfect? 
So intval('F') could return NULL and intval('0') could return 0.

Regards
Daniel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: [PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi,
I used 2 x =. Using 3 x = would not result in that behaviour because string is 
not equal to number. I am fine === here. I explicitly talk about the 2 x = 
variant.

BTW:

# php -r 'var_dump("PHP" == 0);'
bool(true)
# php -r 'var_dump("PHP" == 1);'
bool(false)

regards
Daniel

-Ursprüngliche Nachricht-
Von: georg [mailto:georg.chamb...@telia.com] 
Gesendet: Donnerstag, 13. Juni 2013 10:35
An: BUSCHKE Daniel
Cc: php-general@lists.php.net
Betreff: Re: [PHP] PHP is Zero

Sorry missed to post list as well

> Hi Daniel,
> here is wild goose
>
> i assume you have 3 x =
> in your "problem" formulation
> which could possibly result in the akward standard C mixup; the 
> rightmost = first parsed and resulting in an ASSIGMENT to the variable 
> with that value, the comes the parsing of == which is the equivalence 
> test, and see; the variable is the same since it was just assigned 
> that value; if this theory is correct you would get TRUE regardless 
> what number is following :) /g
>
> - Original Message -
> From: "BUSCHKE Daniel" 
> To: 
> Sent: Thursday, June 13, 2013 9:59 AM
> Subject: [PHP] PHP is Zero
>
>
>> Hi all,
>> I want to start a discussion about a PHP behaviour that drives me 
>> crazy for years. For the beginning I would like you to guess what the 
>> result of the following snippet will be:
>>
>> var_dump('PHP' == 0);
>>
>> I know the difference of == and === but the result was unexcpected 
>> for me. And I hope it is also for you. The result is simply "true". 
>> Why is it true? I guess this happens because of the conversion from 
>> 'PHP' to a number which will be 0 in PHP. And of course 0 equals 0. 
>> There are several points that I just want to drop into this 
>> mailinglist to discuss
>> about:
>>
>> 1. Why? :)
>> 2. Why is PHP converting the String into a Number instead of 
>> converting the Number into a String? (If my guess concerning the 
>> behaviour is
>> correct)
>> 3. Why is PHP throwing data away which has the developer explicit 
>> given to the interpreter?
>> 4. Why does var_dump(0 == 'PHP'); has the same result as the snippet 
>> above? This meens that the equal operator is not explictly 
>> implemented in the string or integer?
>> 5. Thats a bug I have opend: https://bugs.php.net/bug.php?id=51739 
>> where I also had the same problems because "8315e839da08e2a7afe6dd12ec58245d"
>> was converted into float(INF) by throwing everything starting from 
>> "da08.." away.
>>
>> I am using PHP since the year 2000. This means I have 13 years of 
>> experience in PHP and I really would like you to NOT just answer 
>> "works as designed". I know it works as designed but I want to 
>> discuss the design. Also I know that the "fuzzy" behaviour of type 
>> conversion is a main feature of PHP. I guess this is one point which 
>> makes PHP that successfull. But - in my opinion - the described 
>> behaviour is to fuzzy and just confuses developers.
>>
>> Best Regards
>> Daniel Buschke
>>
>> --
>> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
>> http://www.php.net/unsub.php
>>
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP is Zero

2013-06-13 Thread BUSCHKE Daniel
Hi all,
I want to start a discussion about a PHP behaviour that drives me crazy for 
years. For the beginning I would like you to guess what the result of the 
following snippet will be:

var_dump('PHP' == 0); 

I know the difference of == and === but the result was unexcpected for me. And 
I hope it is also for you. The result is simply "true". Why is it true? I guess 
this happens because of the conversion from 'PHP' to a number which will be 0 
in PHP. And of course 0 equals 0. There are several points that I just want to 
drop into this mailinglist to discuss about:

1. Why? :)
2. Why is PHP converting the String into a Number instead of converting the 
Number into a String? (If my guess concerning the behaviour is correct)
3. Why is PHP throwing data away which has the developer explicit given to the 
interpreter?
4. Why does var_dump(0 == 'PHP'); has the same result as the snippet above? 
This meens that the equal operator is not explictly implemented in the string 
or integer?
5. Thats a bug I have opend: https://bugs.php.net/bug.php?id=51739 where I also 
had the same problems because "8315e839da08e2a7afe6dd12ec58245d" was converted 
into float(INF) by throwing everything starting from "da08.." away.

I am using PHP since the year 2000. This means I have 13 years of experience in 
PHP and I really would like you to NOT just answer "works as designed". I know 
it works as designed but I want to discuss the design. Also I know that the 
"fuzzy" behaviour of type conversion is a main feature of PHP. I guess this is 
one point which makes PHP that successfull. But - in my opinion - the described 
behaviour is to fuzzy and just confuses developers.

Best Regards
Daniel Buschke

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sorry for the blast from the past

2013-06-02 Thread Daniel Brown
On Sat, Jun 1, 2013 at 9:02 PM, Tamara Temple  wrote:
>
>
> Sorry for replying to a message from 2011 -- for some reason I had a
> whole bunch of PHP messages suddenly show up in my inbox from the
> past. I generally don't check the year of an unread message in my inbox,
> as I try to keep inbox-zero.
>
> Anyway, carry on!

Gah.  Didn't see this before, so I didn't know you already noticed
the date before I started ribbing you earlier.  Backfired on me like a
'69 Pinto.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] browser rendering

2013-06-02 Thread Daniel Pöllmann
Well I think it depends.
When the image is part of the website, like a chart or something like that
you can use the height and width attribute inside the img tag (don't forget
alt for correct validation).
When the image is part of the layout or you're having multiple images like
in a gallery with the same height and width you should use the
corrosponding css.

It might be useful to resize the image on serverside so that the browser
doesn't have to load a big image and then resize it to a tiny pic. This
will - in most cases - speed up your website. But you have to use the tags
even with a perfectly sized picture, otherwise the browser will be confused
when the image can't be loaded

Daniel
Am 02.06.2013 15:12 schrieb "georg" :

> Possibly this issue is for other fora, which you might direct me, anyways;
>
> I have been dablling making my own little webpages, however having gotten
> a nice
> result jon fireforx, I realize picture sizes gets treated very differntly
> on different browsers !!!
> so the looks of the pages get very strange from smaller (Opera) and much
> bigger (Explorer)
> brower !!!
>
> any hints for mitigation ?
>
> br georg
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] URL Rewriting

2013-06-02 Thread Daniel Brown
Studying archaeology now, Tam?  ;-P


On Sat, Jun 1, 2013 at 8:22 PM, Tamara Temple  wrote:
> Silvio Siefke  wrote:
>> On Wed, 22 Jun 2011 17:50:49 -0400 Daniel P. Brown wrote:
>> > > Has someone a Link with Tutorials or other Information?
>> >
>> > Not entirely sure what you're asking here, or how you (or the
>> > nginx folks) expect it to relate to PHP.  Do you mean that you want to
>> > use PHP to have theme2.php act as if it was called as theme.php?id=2 ?
>>
>> I have me write a blog, but my blog has link like blogdetail.html?id=1 or =2
>> through 16 at moment. And for google and other Search  Engines not good the
>> links, better where i can rewrite to a fix link, and when someone use the
>> link, php write to correct url.
>
> Common SEO mythology is that you need pretty human-understandable
> links. (In point of fact, the search engines care not in the least.)
> However, human-understandable URLs are a benefit to users when they want
> to understand what they're linking to or clicking on.
>
> A human-understandable link is more like:
>
> http://www.example.com/blog/2013-05-a-day-in-the-life-of-my-dog
>
> not:
>
> http://www.example.com/blog/2
>
> as that really does not provide any more information than:
>
> http://www.example.com/blog.php?id=2
>
> Otherwise, Daniel's solution below should do the trick.
>
>> Sorry my english not perfect on earth.
>>
>>
>> > If so, it's not redirect or rewrite, and it's extremely hacky, but
>> > this is the only real way PHP could achieve the desired result:
>> >
>> > > > // dynamictheme.php
>> >
>> > if (preg_match('/.*([0-9]+)\.php/Ui',$_SERVER['PHP_SELF'],$match)) {
>> >   $_GET['id'] = $match[1];
>> >   include dirname(__FILE__).'/theme.php';
>> > }
>> >
>> > ?>
>> >
>> > Then just symlink dynamictheme.php to your various themes like so:
>> >
>> > ln -s dynamictheme.php theme2.php
>> > ln -s dynamictheme.php theme301.php
>> > ln -s dynamictheme.php theme18447.php
>> >
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sorry for the blast from the past

2013-06-01 Thread Daniel
On Sun, Jun 2, 2013 at 11:02 AM, Tamara Temple  wrote:
>
>
> Sorry for replying to a message from 2011 -- for some reason I had a
> whole bunch of PHP messages suddenly show up in my inbox from the
> past. I generally don't check the year of an unread message in my inbox,
> as I try to keep inbox-zero.
>
> Anyway, carry on!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

It all good, it happens :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Webpage Persistence Load balancing

2013-05-29 Thread Daniel Brown
On Wed, May 29, 2013 at 8:03 AM, Al  wrote:
> I'm having a webpage Persistence problem, it is intermittent.  I suspect it
> is caused by load-balancing.
>
> Specifically:
>
> Users are connected to a webpage form to complete.  Generally, everything is
> OK if they take a minute or even more to complete the form. However,
> sometimes they report to me, and I've seen it myself, the connection has
> been dropped by the server in a short time.  They enter the data and Submit
> it to the server, and the page just reloads and their data is lost.
>
> I have the PHP ignore_user_abort(true); etc.
>
> Is there anything I can do to fix this or is it a server issue that you must
> fix?

Well, either way, it would be up to you to fix it.  We wouldn't
have anything to do with the server (well, unless you were hosted with
my company, but the PHP project itself isn't any way related to the
corporate stuff).  Of course, it could just be the ambiguity of the
term "you" in the sentence throwing me off here.

That said, is this a standard HTML page displayed in a normal,
modern-era browser, or is there a different frontend, such as Flash, a
mobile client, an API, or something of the sort?  And is the page
being timed-out with JavaScript, or simply timing out with the
sessions?

Lastly, if you suspect that it is the load-balancing, and the
balancer isn't capable of persistence itself (such as if you're using
round-robin), and sessions themselves are breaking, it's probably
because you're relying on file-based sessions, which do not (by
default) synchronize between servers.  Instead, you'll need to
centralize your sessions in a database, memcached, or similar option.

For some hints on session management and how you can manage it
across server clusters, check out the session_set_save_handler()
function[1].



^1: http://php.net/session_set_save_handler




--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Random

2013-05-23 Thread Daniel Brown
On Thu, May 23, 2013 at 4:51 PM, Last Hacker Always onpoint
 wrote:
> Hey I need code for random number 1-30 for my site.

You need to know that you've been removed from the list (but you'd
still have to be subscribed to be able to read this).

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Source code of original PHP release.

2013-05-23 Thread Daniel Brown
On Thu, May 23, 2013 at 2:16 AM, chris  wrote:
> I'm currently writing a paper on the evolution of PHP and web
> development/security as a whole.
> One of the things I want to incorporate is snippets of source code to show
> how things have grown and advanced since the 90's
>
> If anyone could help me out I would be much appreciated. All my attempts of
> trying to find it have turned up nothing :(

Everything you want (and more) regarding that is in the Museum:

http://museum.php.net/

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] undef func

2013-05-10 Thread Daniel Brown
On Fri, May 10, 2013 at 3:18 PM, tamouse mailing lists
 wrote:
>
> Aren't DLLs a Windows thing?

Yeah, I misread the bit about "MS XP" and thought he was using XP
for this install.  I just realized the remainder of the discussion
between us was off-list, so - for posterity - my response, when
finding out it is indeed a Linux box, is: pecl install pdo_odbc.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] undef func

2013-05-10 Thread Daniel Brown
On Fri, May 10, 2013 at 6:15 AM, georg  wrote:
> Hello !
>
> im increasingly frustrated on my effort to get PHP/ODBC going with Apache on 
> Linux (did it on MS XP, that was trixy but this is worse, nothing seem to be 
> correct; utilities missing, erroneous file-directory references, crapy 
> stringency in description...)
>
> well:
>
> "undefined function odbc_connect() " is what I currently find in my Apache 
> Error_log
>
> So evidently I have sucessfully gotten at least PHP to get working, but to 
> connect to ODBC
>
> (this then would indicate that dynamical loading of libararies is not 
> successful, but what...)
>
> man tnx for clues
> georg

Did you uncomment the line in php.ini to load the ODBC DLLs?

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP]

2013-05-08 Thread Daniel Brown
On Wed, May 8, 2013 at 3:13 PM, Steven Staples  wrote:
>
> Why does this feel like a new function/feature for PHP now?
>
> Function acronymize($acronym)
> {
> // do stuff here now... :S
> }



--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP]

2013-05-08 Thread Daniel Brown
On Wed, May 8, 2013 at 1:26 PM, David OBrien  wrote:
>
> That would be reverse acronymization :)

You're absolutely correct.  Deacronymize?

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP]

2013-05-08 Thread Daniel Brown
On Wed, May 8, 2013 at 1:14 PM, Tedd Sperling  wrote:
>
> PS: PHP + > "Produced by Horses & Ponies." ? You got too much time on your 
> hands Daniel.

Sometimes I wish that were the case.  Honestly, I think it's
having a three-and-a-half-year-old daughter that's rubbing off on me.
She's presently obsessed with princesses (fictional, of course --- no
interest in Maria Antonia or even Kate Middleton yet).  So you're just
lucky I didn't acronymize it as the Pretty House of Princesses or
something.  And yes, I just made up the word acronymize.  It may be
Wednesday, but it feels more like a Friday.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FW:

2013-05-08 Thread Daniel Brown
If you're going to send hack attempts, at least adjust your clock
so that it doesn't look like it took almost a month for your SPAM to
get here.  We're not the Pony Express.  (And, no, PHP doesn't stand
for Produced by Horses & Ponies.)

On Thu, Apr 11, 2013 at 11:43 AM, Paul Novitski
 wrote:
> http://www.shinwa-kensetsu.sakura.ne.jp/bth7rz.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP compiler - HipHop performance

2013-04-25 Thread Daniel Fenn
On Fri, Apr 26, 2013 at 1:56 PM, Norah Jones  wrote:

> Hi,
>
> I have downloaded HipHop for my website, I am going through various web
> links which are suggesting that performance will improve 3-6 times. However
> I don't know the Stability of the HipHop.
>
> Please provide your inputs so that I can decide to use HipHop.
>
> Thanks,
> Norah Jones
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


I looked into HipHop once, and I decided not to use it, I felt that there
are other ways of improving performance. Having said that, it really
depends on what your running IE wordpress, phpbb, mybb etc.

I rather install some cache plugin for wordpress and install something like
xcache but that just me though.


Re: [PHP] Commands which call exec() or shell_exec() ??

2013-04-09 Thread Daniel Brown
On Tue, Apr 9, 2013 at 3:11 PM, Ken Kixmoeller  wrote:
> Hi -- -
>
> Strange problem. One of my applications was just moved to a new server. The
> new server has php configured to blacklist some functions (using
> "disable_functions="). One of the "banned" functions is exec().
>
> The error log is reporting "shell_exec() has been disabled for security
> reasons"  --- but exec() or shell_exec() are not in my code *anywhere*. The
> program and line number being reported makes absolutely no sense.
>
> Are there other php commands that really call exec() or shell_exec() ???
> Any clues how this could happen? Fixes (other than un-blacklisting the
> command, of course)?
>
> Many thanks,
>
> Ken

If you're positive you aren't executing any command line code
(backticks, passthru(), et cetera), then check to see if arbitrary
code is somehow being attempted via your scripts.

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] htaccess question

2013-04-09 Thread Daniel Brown
On Tue, Apr 9, 2013 at 2:07 PM, Al  wrote:
> I know it's not a php question, but I can't readily find the answer
> elsewhere.
>
> I want to make this directive universal. Put htaccess file on any host in
> any folder.
>
> This works
> RewriteEngine On
>
> RewriteCond %{SERVER_PORT} !=443
>
> RewriteRule ^(.*)$ https://www.foo.org/bar/$1 [R=301,L]  #Here the foo.org
> and /bar must be specified
>
> I want what is in effect
>
> RewriteRule ^(.*)$ https://{host_name}/{directory}/$1 [R=301,L]
>
> I can easily do this with php regex capturing the (host and dir) and then
> rewriting the text string; but the Apache directives are not obvious.

You were on the right track:

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] magic_quotes_gpc stays on even when disabled in php.ini

2013-03-27 Thread Daniel Fenn
I think ";magic_quotes_gpc = Off" should be "magic_quotes_gpc = Off"

Then restart apache/php or whatever it is your running

Regards,
Daniel Fenn






On Thu, Mar 28, 2013 at 11:39 AM, Madan Thapa  wrote:
> Hi,
>
> I installed php 5.3.23 recently on a CentOS sever  and magic_quotes_gpc
> stays on even when disabled in php.ini
>
>
> root@server [~]# grep magic_quo  /usr/local/php5.3/lib/php.ini
> ; magic_quotes_gpc
> ;magic_quotes_gpc = Off
> magic_quotes_runtime = Off
> magic_quotes_sybase = Off
> root@server [~]#
>
>
>
>
> php info results:
>
> magic_quotes_gpcOnOnmagic_quotes_runtimeOffOffmagic_quotes_sybaseOffOff
>
>
>
> Is anyone aware of such issues for php 5.3.23 ?  or any  where i might look
> at in troubleshooting this?
>
>
> Please advise.
>
> Thank you

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] application level variable file

2013-03-22 Thread Daniel Brown
On Fri, Mar 22, 2013 at 10:22 AM,   wrote:
> I am very new to the PHP application and would like to create a new project.
> I would like to have a file to save my application level variable and
> functions.
>
> I would like to know does PHP have any default file name and file path for
> this file like Web.config file for ASP.Net and Application.cfm for
> ColdFusion?
>
> Your help and information is great appreciated,

No.

For more info: http://php.net/manual

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Surge 2013 CFP open

2013-03-20 Thread Daniel Brown
The below is a good example of why to trim your signature before
sending an email to a public mailing list.  Ignoring for a moment the
irrelevance of the conference, a one-line email should not have a
nineteen-line signature --- particularly when the "notice" is null and
void when sent willingly to a public forum.


On Mon, Mar 18, 2013 at 2:30 PM, Katherine Jeschke  wrote:
> The Surge 2013 CFP is open. For details or to submit a paper, please visit
> http://surge.omniti.com/2013
>
> --
> Katherine Jeschke
> Director of Marketing and Creative Services
> OmniTI Computer Consulting, Inc.
> 11830 West Market Place, Suite F
> Fulton, MD 20759
> O: 240-646-0770, 222
> F: 301-497-2001
> C: 443/643-6140
> omniti.com
> Surge 2013 
>
> The information contained in this electronic message and any attached
> documents is privileged, confidential, and protected from disclosure.  If
> you are not the intended recipient, note that any review, disclosure,
> copying, distribution, or use of the contents of this electronic message or
> any attached documents is prohibited. If you have received this
> communication in error, please destroy it and notify us immediately by
> telephone (1-443-325-1360) or by electronic mail (i...@omniti.com). Thank
> you.



-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Introduction ... !

2013-03-01 Thread Daniel Brown
On Fri, Mar 1, 2013 at 12:54 PM, Jim Giner  wrote:
>
> What gives you such optimism?  I recently saw a list of languages in use and
> PHP has dropped quite a bit over the last 5 or more years.
> Being a relative newbie myself, I'm happy that PHP exists and is so readily
> available to us hobbyists, etc.  Certainly am in favor of your optimism, but
> curious (hey it's Friday!) about your prediction.

Just knowing how the patterns go.  It's always the same, and it
will likely be the same again.  No guarantees, but all it takes is a
bit of fostering of the community to return it to a decently-vibrant
forum.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Introduction ... !

2013-03-01 Thread Daniel Brown
On Fri, Mar 1, 2013 at 10:57 AM, Nick Whiting  wrote:
> Hello PHP'ers!
>
> Just thought I would introduce myself to the mailing list since I've worked
> with PHP for almost 10 years now and yet haven't really been community
> active ...
>
> I've developed quite a few open-source projects over the years that I hope
> someone here will find as useful as I have ... they are all hosted on
> Github @prggmr.
>
> XPSPL - Signal Processor in PHP
> docpx - PHP Documentation Generator for Sphinx
>
> Again Hello Everyone!

Welcome to the list, Nick.  Looking forward to having you involved
in the discussions we have go on here.  The list isn't nearly as
active as it was about five years ago, but that's likely to change.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Stupid question

2013-02-28 Thread Daniel Brown
On Wed, Feb 27, 2013 at 9:14 PM, Curtis Maurand  wrote:
>
> Well that means the docs on the PEAR MDB2 website are incorrect and should
> be fixed.  Thanks for the lesson.

If there's an issue with the docs, you're right, they should
definitely be fixed.  We'd appreciate it very much if you could take a
moment and submit it as a bug report at https://bugs.php.net/.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Stupid question

2013-02-26 Thread Daniel Brown
On Tue, Feb 26, 2013 at 4:27 PM, Curtis Maurand  wrote:
> I have the following:
>
> $dsn = "mysqli://$username:$password@$hostname2/$database";
> $options = array(
> 'debug' => 3,
> 'result_buffering' => false,
>   );
>   $dbh =& MDB2::factory($dsn, $options);
> if (PEAR::isError($mdb2))
> {
> die($mdb2->getMessage());
> }
>
>
>
>
> function tallyCart($_u_id,$dbh){
>while($row = $result->fetchrow(MDB2_FETCHMODE_ASSOC)) {
> $_showCheckOut=1;
> $_pdetail=new ProductDetail($row{'product_ID'},
> $row{'product_Quantity'}, $_u_id);
>  $_getSubTotal += $_pdetail->_subTotal;
>  $_counter++;
> }
> }
>
> I'm getting:  Call to undefined method MDB2_Error::fetchrow()
>
> anyone have any ideas?  Can I not pass a database handle to a function?
>
> Thanks,
> Curtis

Hate to answer a question with a question, but:

1.) Do you have the PEAR package MDB2 installed?
2.) Where is $result defined?  I don't see it in your code snippet here.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Very Large File Splatter

2013-02-22 Thread Daniel Brown
On Fri, Feb 22, 2013 at 4:04 PM, Brian Smither  wrote:
> PHP 5.4.4-TS-VC9 on Windows XP SP3 NTFS non-system drive with 18GB free.
>
> I dare not try to replicate this. As such, I cannot firmly place the blame on 
> PHP.
>
> I have peppered a PHP application with a call to a function which 
> appends-only to a logfile the parameters passed to it. Each pass of the 
> application creates many MB of content.
>
> It is conceivable that I ran out of hard drive space.
>
> When that which what I was working on seemed to be acting very weird, I 
> rebooted the computer only to see thousands of lines scroll by from Windows 
> repairing the file system.
>
> I discovered logfile contents in many dozens of files. The timestamp and 
> filesize of the damaged files were not changed. Only the contents replaced 
> with slices of the logfile.
>
> Again, I'm not going to try to 'intentionally' replicate this, so I ask:
>
> Has PHP's interface with the NTFS file sub-system ever been reported to 
> splatter a file across the contents of a drive?

Not to my knowledge.  It actually sounds to me like a code issue.
Are you using file_put_contents() with the parameters in reverse
order, by chance?

If you can show the write portion of the code in your iteration,
as well as a sample of the naming convention, it may offer more clues.
 In any case, either disk space or inode exhaustion is likely the
reason things borked-up for you.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] stripped \n

2013-02-20 Thread Daniel Brown
On Wed, Feb 20, 2013 at 1:32 PM, Matijn Woudt  wrote:
>
> An input with type=text is used for single lines, so yes, newlines get
> stripped.
> Either use a textarea with style="display: none", or store the data in a
> session instead.

Or at least .

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP fails to install on Ubuntu 12.10. What's going on?

2013-02-14 Thread Daniel Brown
On Thu, Feb 14, 2013 at 4:56 PM, Andy McKenzie  wrote:
>
> Can I just mention, as so many others have, how much I hate the fact
> that this list is configured to not reply to the list by default?

I know.  Actually, the only reason it's like this is because a lot
of people will take the conversations off-list on their own, so we
don't force the list as the reply-to address.  After ~13 years,
though, it's difficult to justify the change.

No problem on the forward, though.  Thanks for contributing to the
community.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP fails to install on Ubuntu 12.10. What's going on?

2013-02-14 Thread Daniel Brown
Remember to hit reply-all, Andy, so it goes to the list as well as
the previous author.

On Thu, Feb 14, 2013 at 2:49 PM, Andy McKenzie  wrote:
> On Thu, Feb 14, 2013 at 2:29 PM, Daniel Brown  wrote:
>> On Thu, Feb 14, 2013 at 2:20 PM, Chris Bergstresser  
>> wrote:
>>> Hi all --
>>>
>>>I've got a cloud server on Rackspace.  If I bring up a fresh Ubuntu
>>> 12.10 machine image, and type "apt-get install php5" it seems to
>>> install fine.  But if I then type "php -version" I get "PHP Parse
>>> error:  syntax error, unexpected end of file in Command line code on
>>> line 1".
>>>
>>>What went wrong?  How can I fix it?
>
> I'm pretty sure the php5 package in ubuntu doesn't include the cli
> client.  Try adding apt-get install php5-cli (or whatever they're
> calling the package these days) and see if the version command works
> then.  Also, you may need a second hyphen before the word version.

Yes, it would be php5-cli, but since he's getting the response
from PHP (parse error) and not the environment saying the command
isn't found, it shows he's got the CLI installed.  Ubuntu is actually
really helpful with a lot of that, too, since - if it can't find the
command - it'll suggest packages from APT to install which match the
command given.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP fails to install on Ubuntu 12.10. What's going on?

2013-02-14 Thread Daniel Brown
On Thu, Feb 14, 2013 at 2:20 PM, Chris Bergstresser  wrote:
> Hi all --
>
>I've got a cloud server on Rackspace.  If I bring up a fresh Ubuntu
> 12.10 machine image, and type "apt-get install php5" it seems to
> install fine.  But if I then type "php -version" I get "PHP Parse
> error:  syntax error, unexpected end of file in Command line code on
> line 1".
>
>What went wrong?  How can I fix it?

Not only is that extremely vague, but it's possibly more of an
issue with Ubuntu's repo than PHP itself.  Nonetheless, try this and
reply to the list with the output of each:

php -v
php -r 'echo phpversion().PHP_EOL;'
php -nv

Also, while it does work with PHP, note that, with a few
exceptions such as `find`, *NIX CLI short options (single dash)
generally expect a single character, while long options
(double-dashes) take longer strings.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] webDAV/CalDAV client class experience ?

2013-02-13 Thread Daniel Brown
On Tue, Feb 12, 2013 at 3:40 PM, B. Aerts  wrote:
> Hello,
>
> I'm working on this one for more than a year (personal project) - but I'm
> turning pretty desperate here.
>
> I'm trying to connect to 2 Calendars through the CalDAV protocol.
> The calendars are hosted by 2 webmail providers.
> If I try to sync through a dedicated calendar, like iCal or Thunderbird
> Lightning add-on, this works fine.
>
> However, once I try to do it through "native" PHP, I fail miserably - even
> if I mimick HTTP requests as recorded by Charles (HTTP debugging proxy).
>
> Up until now, I used the inc_caldav-client-v2.php, which worked for a while
> and then stopped all of a sudden. The PUT requests failed, and then any HTTP
> request got caught in what appears to be a socket timeout.
>
> My question: is anyone using some webDAV/CalDAV class that actually works ?
> If not, any tutorial on the subject is also deeply appreciated ( all I can
> rely on is the IETF spec rfc4791, which is far from accesible reading
> material)

I haven't tried them myself, but there are PEAR packages for
client-server implementations for WebDAV:

http://pear.php.net/search.php?q=webdav&in=packages&x=0&y=0

They're not actively maintained by anyone right now (feel free to
apply to change that if you'd like the responsibility), but the most
recent server version was released just this past October (the client
version is about a year older).  At the very least, it may be enough
to get you started.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DEV] new FTP function

2013-01-18 Thread Daniel Brown
On Fri, Jan 18, 2013 at 10:33 AM, KISE  wrote:
> Paul Dragoonis,
>
> Actually it wont work i did tried it before, if the dir end with / it will
> list the directories inside the path you gave it and if it doesn't have any
> directories it will return false since there is no directories to return.
>
> you have to take out the last / and then remove the directory in question
> and list the files in the parent directory and check if the dir exists
> otherwise it will return false, i spent 3hrs yesterday thinking why its
> returning false even though the directory exists.

The discussion is now getting more into the general coding realm
than internals, so let's move it over there in case anyone wants to
mention something like:

function ftp_dir_exists($conn, $currentDir) {
$currentDir = (substr($currentDir,-1,1) == '/') ?
substr($currentDir,0,-1) : $currentDir;
$list  = ftp_nlist($conn, '-dF '. $currentDir);
return in_array($currentDir, $list);
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Some date() oddities

2013-01-08 Thread Daniel Brown
On Tue, Jan 8, 2013 at 3:43 PM, Arno Kuhl  wrote:
> I've bumped into an odd result with the date() function that I can't make
> sense of.
>
> Starting with a unix timestamp for 31 December 2012 13:12:12 (which is
> 1356952332) I calculate a week number:
>
> $ux_date = 1356952332;
>
> $weeknumber = date("W", $ux_date);   // returns 01 instead of 52

Because, technically, 31 December was the second date of the
*fifty-third* week of 2012.  However, because the majority of the week
falls in 2013, it's rounded-in with that.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQLi

2012-12-20 Thread Daniel Brown
On Thu, Dec 20, 2012 at 12:18 PM, Stephen  wrote:
> I read about the subject in another thread.
>
> Where does PDO fit?
>
> That is what I have used for sometime. Am I good?

Right as rain.  PDO is a preferred abstraction layer in PHP and
isn't going anywhere anytime soon.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: form validation

2012-12-20 Thread Daniel Brown
On Thu, Dec 20, 2012 at 10:34 AM, Jim Giner
 wrote:
>
> If you are using
> mysql for a db, then you should already be using mysql_real_escape_string in
> place of addslashes.

Actually, you should start moving toward MySQLi, as mysql_*() is deprecated.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-08 Thread Daniel Brown
On Sat, Dec 8, 2012 at 10:52 AM, Jim Giner  wrote:
> Didn't work.
>
> Let me explain my domain names.  My main domain is "albanyhandball.com".  I
> have two subs called "x.albanyhandball.com" and "y.albanyhandball.com".
> Attached to each of these is what my isp calls an "add-on domain" name.
> These two names are not similar at all.  As in "addon1.net" and
> "myothersub.com", but each is tied to one of the sub-domain names.  Looking
> at a phpinfo dump, the true sub-domain names (*.albanyhandball.com) show up
> only in the SERVER_ADMIN setting, while my add-on domain names show up in
> the SERVER_NAME settings.

That won't work and should not work.  You could technically do it,
but you'd be deliberately creating an XSS for your sites.  If it
worked that way on its own, it would either be (a) a horrible browser
or (b) 1995.

It'll work for the subdomains, but not addon or parked domains.

> I've read about passing the session id to a script and using that to opene
> up the existing session file.  Is this something I could do in this case?
> Or am I SOL?

You can pass the session ID and reactivate the session that way,
sure.  Not pretty, and it does lead to security considerations, but it
would work.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-07 Thread Daniel Brown
On Fri, Dec 7, 2012 at 3:20 PM, Sebastian Krebs  wrote:
>
> Would be better to put 'session.cookie_domain' into the php.ini. In both
> cases: Clear cookies (at least for your site) completely and set
> session.auto_start to 0.

If it's configured on the server for overrides, sure, a local one.
 Otherwise, the system php.ini will break all other domains on the
server.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-07 Thread Daniel Brown
On Fri, Dec 7, 2012 at 3:04 PM, Jim Giner  wrote:
>
> OK - now that I've messed us all up, help me to understand your proposed
> solution.  I added the ini-set line to my first script.  Then I called my
> second one and still had the same problem with a missing session var.  Is
> there a corresponding line I need in the 'called' script?  And does it
> matter where this line is place within the script?

From your response to Sebastian, I'm not sure it will work.  They
need to be subdomains of the same domain; different domains won't
work.  However, proceeding with the presumption that the subdomains
are under the same SLD (e.g. - apple.example.com and
orange.example.com), this should work:



Then



-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-07 Thread Daniel Brown
On Fri, Dec 7, 2012 at 2:54 PM, Jim Giner  wrote:
>
> What if my sub-domain names are not in the form of 'a.domain.com' and
> 'b.domain.com'.

A subdomain is a subdomain.  Unless you've discovered a new
magical form of subdomain that is not, you should be fine.  And if you
have, in fact, made that discovery, you're probably the reason the
Mayans predicted a very short winter this year.  Thanks for screwing
us, Jim.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-07 Thread Daniel Brown
On Fri, Dec 7, 2012 at 2:38 PM, Jim Giner  wrote:
> On 12/7/2012 2:36 PM, Daniel Brown wrote:
>>
>> On Fri, Dec 7, 2012 at 2:33 PM, Jim Giner 
>> wrote:
>>>
>>> Something new for me - working with scripts on two of my sub-domains.
>>>
>>> I want to call script 2 in my B domain from script 1 in my A domain.
>>>
>>> It appears that the session vars established in script 1 do not show up
>>> in
>>> script 2.  Is that because the domain name is different?  Is this where
>>> one
>>> must grab the session id and use it in another script in order to retain
>>> the
>>> original session and its vars? If this is so, can someone elaborate on
>>> the
>>> capture of the session id process?
>>
>>
>>  Are both domains on the same physical (or virtual) server?
>>
> Yes - they are sub-domains of my main one.



The preceding dot before the SLD allow the session cookie to be
accessible on *.example.com.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session ?

2012-12-07 Thread Daniel Brown
On Fri, Dec 7, 2012 at 2:33 PM, Jim Giner  wrote:
> Something new for me - working with scripts on two of my sub-domains.
>
> I want to call script 2 in my B domain from script 1 in my A domain.
>
> It appears that the session vars established in script 1 do not show up in
> script 2.  Is that because the domain name is different?  Is this where one
> must grab the session id and use it in another script in order to retain the
> original session and its vars? If this is so, can someone elaborate on the
> capture of the session id process?

Are both domains on the same physical (or virtual) server?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP site search broken?

2012-12-05 Thread Daniel Brown
On Tue, Dec 4, 2012 at 3:56 PM, Paul M Foster  wrote:
> Is it just me, or is the search feature on php.net broken?
>
> When I enter a full search term (known good function name) and then hit
> the arrow, it brings me back to the generic search page. If I enter a
> partial search term and then click on one of the suggested
> "completions", it usually (not always) does the same thing. Etc.

It's probably a legitimate issue.  I made some changes last week
to the DNS and fundamental server functionality to speed things up.
We're now using a service named myracloud[1] to help with traffic and
server load for the primary web box (the main php.net / www.php.net
system), as well as static.php.net, which handles graphics and other
media.  Unfortunately, as with any major changes, there are a few
hiccups here and there for some users.  Primarily, these are in the
form of HTTP 301's; when the server issues a redirect order, sometimes
the data isn't being sent along with it.  We're working to resolve the
issues; I just made one moderately-sized commit to hopefully repair a
lot of the issues, and will be making at least one more shortly.

If you or anyone else reading this continue to experience issues,
please submit them as bugs at https://bugs.php.net/ and zip me a quick
email to bring it to my attention.

^1: https://myracloud.com/en/?_locale=en

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to read emails with php

2012-12-04 Thread Daniel Brown
On Tue, Dec 4, 2012 at 1:44 PM, Farzan Dalaee  wrote:
> Same error
> I think its need something else for opening service like ssl setting or
> somthing like that
> Or this host im using block imap or pop3 access

Per list rules, please don't top-post.

Some things to consider:

1.) Incorrect domain name.  Be sure the domain is spelled
correctly and is registered.
2.) System not configured to serve IMAP.
3.) Firewall blocking access to port 143.
4.) Host down.

Try pinging the domain.  If you get a response back, try either
using Telnet to connect to the domain on port 143 or using an email
client with the same access details and credentials you're trying to
use in your code.

At this point, it's evident that it's not a PHP problem, so you'll
need to research the rest on your own.


-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to read emails with php

2012-12-04 Thread Daniel Brown
On Tue, Dec 4, 2012 at 8:10 AM, Farzan Dalaee  wrote:
> hi guys
> i want to open an email content ( subject ,body , attachment ) with php
> i use imap_php but its wont connect to host
> what should i do?
> thanx

Start by finding out why it won't connect.  Check the logs on the
server if you can, that's always the best place to look first.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to get a PHP bug fixed?

2012-11-17 Thread Daniel Brown
On Sat, Nov 17, 2012 at 1:51 AM, Enumag  wrote:
> Hi, there is a bug I'd like to be fixed and even a patch is available. But
> there is still no reaction at all after 2 years. What else can I do to get
> the bug fixed?
>
> https://bugs.php.net/bug.php?id=45351 - patch available from 2010-06-13
> https://bugs.php.net/bug.php?id=48724 - patch available from 2012-04-13

The PHP General mailing list is only for discussing the use of the
language and developing in PHP, not really for the development of the
language itself.  Instead, you should try to discuss these things on
the PHP Internals list at intern...@lists.php.net.  You may also want
to speak with some of the developers via IRC on EFnet #php.pecl to
discuss if there is any interest in patching the bugs you've
mentioned.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] select function

2012-10-25 Thread Daniel Brown
On Thu, Oct 25, 2012 at 5:35 PM, Jeff Burcher  wrote:
> Hi,
>
>
>
> I can't remember if this is the PHP list for RPG programmers or not, so
> apologize if this is the wrong one.

This is just a general PHP mailing list.  Guessing you need the other one.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Date manipulation

2012-10-25 Thread Daniel Brown
On Thu, Oct 25, 2012 at 3:06 PM, Ron Piggott
 wrote:
>
> Is it possible for PHP to accept the following as a date:
>
> 04:11:22 Aug 21, 2011 PDT
>
> so I may output it as:
>
> gmdate(‘Y-m-d H:i:s’)
>
> - I want the time zone included

Sure.



-- 

Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 5:34 PM, Ashley Sheridan
 wrote:
>
>
> Crontab is the daemon which runs cron jobs, and some distros have set up
> special files called cron.daily (or daily.cron I don't recall),
> cron.hourly, etc to make it easier to schedule jobs.

Quick clarification and correction here:

The cron *daemon* is crond, while the *script* that is
batch-processed by cron is called the crontab.  When it is executed,
it is referred to as a cron job.

That said, Ash is right about the rest.  Different OS flavors
(BSD, Linux, UNIX, SunOS/Solaris, HP-UX, et cetera) often use
different path and file standards.  Linux, in general, uses a command
`crontab` which opens the local user's environment-configured editor
to modify the user's crontab in the spool.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help using PHP 5.3.3 mail() with Apache James

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 5:00 PM, Steven Pogue  wrote:
> Has anyone been successful at using the above on a RHEL 6.2 environment? I
> am able to use Postfix using the php.ini SENDMAIL_PATH but when I bring
> down PostFix, start Apache James and switch the sendmail_path value to
> point to the Apache James 2.3.2 provided wrapper
> (/opt/james-2.3.2/bin/sendmail.py) the return code on mail() indicates it
> failed and no record of the wrapper being invoked.
>
> Calling the wrapper directly from the command-line works as expected so
> the problem is somewhere between PHP and the sendmail_path invocation.

What is the output of the following code?

'.PHP_EOL;
echo trim(`ls -al /opt/james-2.3.2/bin/sendmail.py`).PHP_EOL;
echo ''.PHP_EOL;
?>

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 4:59 PM, Jim Giner  wrote:
>>
> Yes - same msg same time

If it wouldn't be a problem, can you provide the script here (or
on a site like Pastebin), as well as the crontab time entry for this?
While checking the crontab, make sure a duplicate entry for this
wasn't somehow added.

In the event that you'd like to keep this information from the
archives and general mailing list (and depending on the security
implications based upon what's divulged, I'd recommend it), I invite
you to send it to me privately, off-list, and I'll take a look at it
later tonight or tomorrow morning.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] cron job problem

2012-10-23 Thread Daniel Brown
On Tue, Oct 23, 2012 at 4:48 PM, Jim Giner  wrote:
> I have a php script that has been triggered by my hoster's cron process(?)
> to run once a day since last March.  It's been running fine - and I've made
> no changes to it.  Suddenly in the last couple of days it is running twice
> it seems.  The whole process sends an email at its conclusion and the
> receipient tells me today that she's getting two emails only a minute apart.
>
> Any ideas on why this might happen?  I haven't contact my host company yet -
> thought I'd ask around first.

Though not really a PHP question, there are several reasons this
could happen, including a race condition that is being encountered due
to a slowdown of the host system or changes to the system's
environment.  Are the emails she's receiving identical?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Missing email

2012-10-20 Thread Daniel Brown
On Sat, Oct 20, 2012 at 5:00 AM, Karl DeSaulniers  wrote:
> @Moderator
> Any reason why my emails do not post or at least dont post for hours later?

There is no moderator on this list.  I'm probably about as close
as it comes.  Can you explain more about the problems you're
experiencing so that I can look into it further?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wrong time being displayed by PHP!

2012-10-17 Thread Daniel Brown
On Wed, Oct 17, 2012 at 2:28 PM, Richard S. Crawford
 wrote:
>
> You can see the current output of the above code here:
>
> http://projectbench.extensiondlc.net
>
> I've confirmed that the server is set to PDT. The value of date.timezone in
> php.ini is "America/Los_Angeles", which should be (currently) -8 hours from
> UTC, but it looks like the PDT offset is only set to -4. Does that even make
> sense?

Yes, `date` at the command line is showing it, and sure, the
timezone is showing as PDT on both ends, but it's also using -0400 for
the timezone.  In any case, this is something your administrator needs
to handle, and isn't something with PHP or your code, from the looks
of it.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel Brown
On Oct 16, 2012 5:24 PM, "Richard S. Crawford" 
wrote:
>
> Sorry about that. I was getting very frustrated with the issue, and I
forgot. I'll be sure to keep it in mind.

No worries.

>>
>> With regard to debugging your issue, it's extremely unlikely that
>> it's PHP's fault, since no one else has the same issue.  However, it
>> does indeed sound as though there's a configuration mismatch or a bad
>> setting of the system clock (as suggested earlier by myself and
>> others).  What's the output when you run the code below?
>>
>> >
>> if (php_sapi_name() == 'cli') {
>> define('NL',PHP_EOL);
>> } else {
>> define('NL',''.PHP_EOL);
>> }
>>
>> echo date_default_timezone_get().NL;
>>
>> echo date('r').NL;
>>
>> echo gmdate('r').NL;
>>
>> echo time().' ('.date('Z').')'.NL;
>>
>> echo trim(`date`).NL;
>>
>> ?>
>
>
> This is the output:
>
> America/Los_Angeles
> Tue, 16 Oct 2012 17:22:09 -0400
> Tue, 16 Oct 2012 21:22:09 +
> 1350422529 (-14400)
> Tue Oct 16 17:22:09 EDT 2012

Is this a shared server, Rich? As shown, the admin configured the
timezone of the machine to be EDT and set the clock right, but php.ini must
be set to PDT. You can easily override this with a local php.ini file, an
.htaccess directive, or by placing date_default_timezone_set() near the top
of the code.


Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel Brown
On Tue, Oct 16, 2012 at 4:19 PM, Richard S. Crawford
 wrote:
>
> Thanks for the suggestion. Unfortunately the problem seems to be that PHP
> thinks the America/Los_Angeles timezone is the same as EDT. I'm not sure
> how to approach this issue.

Per list rules, just a gentle reminder: please don't top-post.

With regard to debugging your issue, it's extremely unlikely that
it's PHP's fault, since no one else has the same issue.  However, it
does indeed sound as though there's a configuration mismatch or a bad
setting of the system clock (as suggested earlier by myself and
others).  What's the output when you run the code below?

'.PHP_EOL);
}

echo date_default_timezone_get().NL;

echo date('r').NL;

echo gmdate('r').NL;

echo time().' ('.date('Z').')'.NL;

echo trim(`date`).NL;

?>

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wrong time being displayed by PHP!

2012-10-16 Thread Daniel P. Brown
On Tue, Oct 16, 2012 at 2:02 PM, Richard S. Crawford
 wrote:
> The value of date.timezone in php.ini is set to "America/Los_Angeles".
>
> The local time is 11:02 a.m. Yet the output of date("h:i a e") is:
>
> 02:02 pm America/Los_Angeles
>
> which is three hours ahead of the real time.
>
> Why is this? What's going on?

Your server time is probably set incorrectly.  That's EDT, not
PDT, so it sounds like the timezone is what you expect, but the system
time is incorrect.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Beneficial site spamming framework

2012-10-15 Thread Daniel Brown
On Sat, Oct 13, 2012 at 5:10 PM, Ashley Sheridan
 wrote:
>
> It was only your replies coming through so often, so I doubt its my end. 
> Also, the newsgroup is the same thing as the mailing list I believe, in this 
> instance.

Hmm I only got each reply once as well, so I'm not entirely
convinced it's an issue with Maciek's setup.  Ash, you don't happen to
have any misfiring forwarders or multiple addresses subscribed, do
you?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP The Right Way (website)

2012-10-14 Thread Daniel Brown
On Sun, Oct 14, 2012 at 11:48 AM, Jim Giner
 wrote:
>>
> Sounds like a good idea, but as for me - if I was a newbie I'd have a
> problem with their very first instructions.  It says right off the start to
> type in the following:
> php -5 localhost:8000

That should be a capital S, not a five.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Reaching the PHP mailing list owners

2012-10-12 Thread Daniel Brown
On Fri, Oct 12, 2012 at 2:19 PM, Helmut Tessarek  wrote:
> Hello Daniel,
>
> I wanted to get an answer to my question (which you would have seen, if you
> actually had read the mail).

I briefly glanced, and no more, because anyone with any idea of
Internet etiquette knows not to forward an entire bunch of junk to a
public and wholly-unrelated mailing list.  Had you considered the
appropriate options, such as reading about how to contact us, you'd
have gotten a response.  Note that the tone of your reply here has
already changed the tenor of this entire discussion now.

> I got a mail that messages bounced from my mail server. So I sent a reply to
> the list owner to get an explanation how this is possible, since my mail
> server only rejects mails which are flagged by the clamav milter (and this did
> not happen). But then, instead of an answer, I got an automated response,
> which basically means only one thing: I don't give a damn about your problems
> and buzz off. Mailing list owners are supposed to be real people, not bots.

And, for the most part, we are (save for a few sentient androids).
 However, go to news.php.net and look at those bounce messages.  Note
it's all consecutive, within a relatively small window of time.  Then,
using your own suggestion about reading the email, look at the bounce
response: the messages were undeliverable up to a time threshold, when
the server gave up.  Sounds like there was an issue connecting to your
SMTP system during that window.  If you have the appropriate access,
you might want to review your mail logs during this window.

> I'm sorry, I was really irritated by this automated respone. It is not very
> professional sending people to go in circles.

Well, as the adage goes, you'll catch more flies with honey than
with vinegar.  And considering this is the very first message I've
ever seen from you, it sounds like either (a) you didn't follow the
proper protocol, or (b) there's something in the process we need to
review.  If you think the issue lies on our end, you can submit a bug
at https://bugs.php.net/ and detail the steps to reproduce the issue.
If it is indeed something we need to correct, believe me, we will.  We
don't deliberately attempt to mislead or frustrate people, despite how
it might have seemed.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Reaching the PHP mailing list owners

2012-10-12 Thread Daniel Brown
What is it you're trying to achieve with the below, Helmut?


On Fri, Oct 12, 2012 at 1:53 PM, Helmut Tessarek  wrote:
> Well, this is useful.
>
> First I get a a message that the owner of the list is available at
> internals-ow...@lists.php.net and then I get another automated reply.
>
> On 12.10.12 13:48 , PHP Lists Owner wrote:
>> This is an automated response to your message to 
>> "internals-ow...@lists.php.net"
>>
>> If you are trying to post to one of the PHP mailing lists, the correct
>> address looks something like php-general@lists.php.net.
>>
>> If you are having problems unsubscribing, follow the directions
>> located online at http://php.net/unsub
>>
>> Thanks!
>>
>> --- Your original email is below.
>>
>> Hello,
>>
>> Can you please explain to me how this can happen?
>> My mail server only rejects mails which do not pass the clamav milter and I
>> haven't seen any virus alerts in the mail log which would refer to the
>> messages you have mentioned.
>>
>> Cheers,
>>  Helmut
>>
>>
>> On 12.10.12 6:44 , internals-h...@lists.php.net wrote:
>>> Hi! This is the ezmlm program. I'm managing the
>>> intern...@lists.php.net mailing list.
>>>
>>> I'm working for my owner, who can be reached
>>> at internals-ow...@lists.php.net.
>>>
>>>
>>> Messages to you from the internals mailing list seem to
>>> have been bouncing. I've attached a copy of the first bounce
>>> message I received.
>>>
>>> If this message bounces too, I will send you a probe. If the probe bounces,
>>> I will remove your address from the internals mailing list,
>>> without further notice.
>>>
>>>
>>> I've kept a list of which messages from the internals mailing list have
>>> bounced from your address.
>>>
>>> Copies of these messages may be in the archive.
>>>
>>> To retrieve a set of messages 123-145 (a maximum of 100 per request),
>>> send an empty message to:
>>>
>>>
>>> To receive a subject and author list for the last 100 or so messages,
>>> send an empty message to:
>>>
>>>
>>> Here are the message numbers:
>>>
>>>63243
>>>63245
>>>63244
>>>63246
>>>
>>> --- Enclosed is a copy of the bounce message I received.
>>>
>>> Return-Path: <>
>>> Received: (qmail 81005 invoked from network); 30 Sep 2012 14:49:47 -
>>> Received: from unknown (HELO lists.php.net) (127.0.0.1)
>>>   by localhost with SMTP; 30 Sep 2012 14:49:47 -
>>> Return-Path: <>
>>> Received: from [127.0.0.1] ([local])
>>>  by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with INTERNAL
>>>  id 70/00-15389-30C58605 for <>; Sun, 30 Sep 2012 10:49:39 -0400
>>> From: Mail Delivery System 
>>> To: internals-return-63243-tessarek=evermeet...@lists.php.net
>>> Subject: Mail Delivery Failure
>>> Message-Id: <6E/e1-13052-744d6...@pb1.pair.com>
>>> Date: Sun, 30 Sep 2012 10:49:39 -0400
>>>
>>> This message was created automatically by the mail system (ecelerity).
>>>
>>> A message that you sent could not be delivered to one or more of its
>>> recipients. This is a permanent error. The following address(es) failed:
>>>
>> tessa...@evermeet.cx (while not connected): 554 5.4.7 [internal] 
>> exceeded max time without delivery
>>>
>>> -- This is a copy of the headers of the original message. --
>>>
>>> Return-Path: 
>>> X-Host-Fingerprint: 76.75.200.58 pb1.pair.com
>>> Received: from [76.75.200.58] ([76.75.200.58:4337] helo=lists.php.net)
>>>  by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
>>>  id 6E/E1-13052-744D6605 for ; Sat, 29 Sep 2012 
>>> 06:58:15 -0400
>>> Received: (qmail 1431 invoked by uid 1010); 29 Sep 2012 10:57:45 -
>>> Mailing-List: contact internals-h...@lists.php.net; run by ezmlm
>>> Precedence: bulk
>>> list-help: 
>>> list-unsubscribe: 
>>> list-post: 
>>> List-Id: internals.lists.php.net
>>> Delivered-To: mailing list intern...@lists.php.net
>>> Received: (qmail 1417 invoked from network); 29 Sep 2012 10:57:45 -
>>> Authentication-Results: pb1.pair.com smtp.mail=tyr...@gmail.com; spf=pass; 
>>> sender-id=pass
>>> Authentication-Results: pb1.pair.com header.from=tyr...@gmail.com; 
>>> sender-id=pass
>>> Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 
>>> as permitted sender)
>>> X-PHP-List-Original-Sender: tyr...@gmail.com
>>> X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com
>>> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
>>> d=gmail.com; s=20120113;
>>> 
>>> h=mime-version:in-reply-to:references:date:message-id:subject:from:to
>>>  :cc:content-type;
>>> bh=prZm0cGKMFMCkD/fbiF1tCeiDSlTMznmUQpVEygTdy0=;
>>> b=TOSHdETdaKP7G5Ou1eBP7tZVyMRgBjAmfZTyGJWi4L3mNrHEVponyIOiJFE9Vl9Qpq
>>>  
>>> k9Th+dyyG39Yqh6QinwAz0CEa2NptoMgeKofnF5MxHxXlq0aykkArjJSBUaHFZxFpaVg
>>>  
>>> 3Pw8mm8Aw3a1FbsZTsbiEIRFPVcUiEJEWPzbATHgw0iS8WFXLH4qkcLYC2tUeGM13koQ
>>>  
>>> rY926iqJEfnSsmegqWWs

[PHP] Friday - Return of Brain Teasers

2012-10-05 Thread Daniel Brown
About five-and-a-half years ago, we had a brainteasers thread
going on[1].  Last year it was briefly resurrected[2], and both times
got some good content and dialogue going.  So I'd like to reprise the
thread in 2012, as well.  Those of you connected to me on Facebook
(parasane) or Twitter (@oidk) might already have seen it, but a simple
one to get things rolling:



-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Round help needed

2012-09-27 Thread Daniel Brown
On Thu, Sep 27, 2012 at 11:05 PM, Chris Payne  wrote:
> Hi everyone,
>
> I'm having one of those nights where nothing is working, please help
>
> What I have is this:
>
> $rounded_number = round($test, -3);
>
> Here's the problem i'm having, I need it to increment to the nearest 1000
> but it seems to only work if the number is over 500.  For example:
>
>
> 123666  WILL round to 124000 BUT if I put 123085 (As an example) it doesn't
> round it, it just stays at 123085 - I know it's probably something totally
> ridiculously simple but i'm having a mental block tonight.
>
> Any help would really be appreciated.

 Sounds like one of those "should be obvious, but isn't" issues.
This gives the desired result:



So I wonder if it's your variable (perhaps even type-casting) or
some other portion of your code.  Can you elaborate and share some of
your bytes with the class, Mr. Payne?

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Responding to an XML data post

2012-09-27 Thread Daniel Brown
On Thu, Sep 27, 2012 at 1:48 PM, Bastien Koert  wrote:
> Hi All,
>
> I am stuck in something where a 3rd party app pushes an XML post to my
> site. They need me to respond to that push with a synchronous XML post
> back confirming that the data was received / had issues etc. Those
> XMLs are defined, but I am not sure how to push that XML back. A
> simple
>
> echo $xml;
>
> is not making back to their system. Not sure how I can post back to their site

If it's an actual postback, they should've given you an API
endpoint for you to do a cURL post back to their side.  If not, and
they're just expecting an XML response, it could be that your XML is
improperly formatted.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP as Application Server

2012-09-26 Thread Daniel Brown
On Wed, Sep 26, 2012 at 5:58 AM, Maciej Liżewski
 wrote:
>
> Why there is no possibility to run PHP in "application server" way among
> other SAPI modules and other possibilities to run PHP? PHP would encounter
> great performance boost and became more "enterprise" :) Just look at Ruby
> which is slow as hell compared even with PHP.
>
> By "application server" I mean scenario when there is statefull application
> on server side not only by session mechanizms but all classes definitions
> maintained in memory (no need to load class definition on every request),
> static class members (and their changes) persistent, background threads,
> etc. This way any op-code cachers won't be necessary...
>
> sounds great, huh? others have it already, so why doesn't PHP? are there
> any cons? problems too hard to solve (one can be memory leaks, thread safe
> coding, etc)? I mean it - I am realy curious why there is no such
> possibility and is there any hope we could get it?

While there are no real plans to incorporate a full-fledged
application server at this time, PHP 5.4 does have an embedded
server[1] for development and such.  It's certainly not advisable to
use it for production, but the fact is, it's there.

 With regard to an actual production-worthy application server,
you might be interested in HipHop[2], which was developed by some of
the engineers over at Facebook.

^1: http://php.net/manual/en/features.commandline.webserver.php
^2: 
https://developers.facebook.com/blog/post/2010/02/02/hiphop-for-php--move-fast/

-- 

Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Vulnerability Announced in phpMyAdmin

2012-09-25 Thread Daniel Fenn
Thank you for the heads up.

On 9/26/12, tamouse mailing lists  wrote:
> On Tue, Sep 25, 2012 at 3:20 PM, Daniel Brown  wrote:
>> Just a three-list cross-post to bring it to everyone's attention
>> at once, in case you weren't already aware.  It was announced today
>> that a compromised SourceForge mirror was distributing a malicious
>> file with the phpMyAdmin package that allows an attacker to
>> arbitrarily execute code on a server hosting the exploitable package.
>> Obligatory (not intentionally self-serving) social media link here:
>>
>> https://twitter.com/oidk/status/250688002005811200
>>
>
> Signal boosting...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Regards,
Daniel Fenn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Vulnerability Announced in phpMyAdmin

2012-09-25 Thread Daniel Brown
Afternoon, folks;

Just a three-list cross-post to bring it to everyone's attention
at once, in case you weren't already aware.  It was announced today
that a compromised SourceForge mirror was distributing a malicious
file with the phpMyAdmin package that allows an attacker to
arbitrarily execute code on a server hosting the exploitable package.
Obligatory (not intentionally self-serving) social media link here:

https://twitter.com/oidk/status/250688002005811200

I don't especially know how this might affect other projects that
are hosting on the same mirror, but I hope at least some of the more
popular projects will take a moment to verify the integrity of their
packages on the affected mirror ('cdnetworks-kr-1' mirror in Korea,
for those interested).

Those of you who have phpMyAdmin installed should check
immediately to see if your installation is vulnerable to the exploit,
particularly if it's auto-updated or has been installed or updated
recently.

We now return you to your regularly-scheduled Tuesday (unless
you're east of the EEST time zone, in which case, Happy Hump Day).

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: How to limit source IP in PHP

2012-09-18 Thread Daniel Brown
On Tue, Sep 18, 2012 at 9:15 AM, Ian  wrote:
>
> Hi Curtis,
>
> I am suffering from sleep deprivation due to a new family addition and I
> fail to see how your code will prevent a malicious user from binding to
> an IP that I do not want him to.  It appears to be an example of how to
> bind to an IP, not how to prevent it.
>
> Could you please explain?

Congrats on the new little one, Ian, and if you don't already
know, you're in for a long ride of sleepless nights.  Get used to it.

That aside, please start a new thread if you'd like to discuss
that in greater detail, as it will go off-topic from and out of scope
of the originally-posted question.  Others subscribed to the thread
may not want to be bothered with the discussion, while others who are
ignoring the thread (thinking it's a long, drawn-out,
beating-a-dead-horse discussion) may never see a valuable discussion
take place.

-- 

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   9   10   >