Re: [PHP] Random 404 screens

2013-02-09 Thread Mike Mackintosh


On Saturday, February 9, 2013 at 11:51 AM, Geoff Shang wrote:

 On Sat, 9 Feb 2013, Jim Giner wrote:
 
  Lately, my web pages are giving me some problems. Once a day or so one or 
  more of my pages/scripts will give me a 404 error page saying my web page 
  has 
  timed out. Problem is that the page was just displayed. I click on a link, 
  the page shows up, I click on a button on it to trigger some activity and 
  voila! An error. I hit refresh and my page is back and things work ok.
  
 
 
 Since someone mentioned network issues, I will ask this question.
 
 Is it actually a 404 page? That is to say, does the string 404 
 actually appear in the error document?
 
 If it does, then this would rule out your home network, as 404 is a 
 response code returned by the webserver.
 
 Geoff.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

What about your HTTP server (Apache, nginx, lighttpd)? Is is overloaded or all 
child-threads/workers busy?


RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Mike Mackintosh


 Original message 
From: Sean Greenslade zootboys...@gmail.com 
Date:  
To: Bulent Malik bma...@ihlas.net.tr 
Cc: php-general@lists.php.net 
Subject: RE: [PHP] how to calculate how much data does each ip address use ? 
 
On Feb 1, 2013 10:25 AM, Bulent Malik bma...@ihlas.net.tr wrote:



 This task is not really suited for php. I would suggest looking into
Ntop.
 It does exactly what you described.

  Hello
 
  I have  a freebsdbox firewall . also I have some internet customers.
  I want to save how much data they used in a table ( such as mysql
  table ) for each ip address.
 Apache2, php5 and mysql5.5 work on the box.
 
  How can I do it ?  any script or tool.
 
  Thanks

 How can i save in table using ntop ?  is there any document ?


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



Look at www.highonphp.com/regex-pattern-parsing-ifconfig

You can use exec to run ifconfig and parse the output using the above.

Re: [PHP] PDO mysql Connection issue

2012-11-28 Thread Mike Mackintosh
On Wednesday, November 28, 2012 at 4:50 PM, ad...@buskirkgraphics.com wrote:
 I am having a PDO mysql connection issue I cant explain.
 
 On server server1.mydomain.com (http://server1.mydomain.com)
 I have a test script
 ?php
 $pdo = new PDO('mysql:host=171.16.23.44;dbname=test', 'user','password');
 ?
 171.16.23.44 is by an A record called server2.mydoamin.com 
 (http://server2.mydoamin.com) they are 2 different
 servers.
 This script returns an error:
 ERROR: Access denied for user 'user'@'server1.mydomain.com 
 (http://server1.mydomain.com)' (using password:
 YES)
 
 I find this ODD because that is not the server i am connecting TO but FROM.
 Why would the PDO connection be referring back to its own localhost instead of
 the intended domain.
 I have tried this by fully qualified domain name, same thing.
 I have ensured the route does exist on the connecting server.
 I have ensured there is no local reference to the domain name/IP back to its
 self.
 
 I log into 171.16.23.44 and there is NO record of the failed attempt.
 I validate the user has remote access rights.
 I validate there is not a firewall rule blocking the host/port/you name it.
 I telnet from the server to the destination via port 3306 it connects.
 
 BTW (171.16.23.44) IS FAKE I AM USING THE IP AS AN EXAMPLE HERE.
 
 Any clue as to WHY the host parameter is not setting or is it setting and
 something else is wrong?
 
 


Have you tried running FLUSH HOSTS on the MySQL server?

Also, i would try to disable DNS within MYSQL by starting with 
--skip-name-resolve 
(http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_skip-name-resolve);

-- 
Mike Mackintosh
PHP 5.3 ZCE



Re: [PHP] File moving hell on Windows

2012-07-31 Thread Mike Mackintosh
On Tuesday, July 31, 2012 at 9:35 PM, tamouse mailing lists wrote:
 On Jul 31, 2012 12:12 PM, Brian Dunning br...@briandunning.com 
 (mailto:br...@briandunning.com) wrote:
  
  Regular Windows networking.
  
  On Jul 30, 2012, at 2:29 PM, Mike Mackintosh 
 mike.mackint...@angrystatic.com (mailto:mike.mackint...@angrystatic.com) 
 wrote:

   
   What protocol are you targeting? FTP, SFTP, SSH, SMB, etc?
   
   --
   Mike Mackintosh
   PHP 5.3 ZCE
   
  
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 Is this a php problem? 

That would be SMB. There is not a lot of PHP support out there for SMB, but you 
should take a look at 

http://basitali.wordpress.com/2008/10/02/accessing-windows-share-samba-from-php/

and

http://php-smb.sourceforge.net/

-- 
Mike Mackintosh
PHP 5.3 ZCE



Re: [PHP] File moving hell on Windows

2012-07-30 Thread Mike Mackintosh
On Monday, July 30, 2012 at 5:19 PM, Brian Dunning wrote:
 I'm dealing with a Windows NT network that includes some digital printing 
 presses that also run Windows. PHP 5.3.8 is running on one NT machine. Its 
 job is to take CSV files that exist in a directory on one machine, and move 
 them to a directory on the digital presses. All the source and destination 
 folders require different network credentials to read and write -- and 
 because of red tape bureaucracy, that cannot be changed. Any suggestions how 
 I could do this? I can't find any file-move examples that include the use of 
 network credentials with each read and write. Thanks... :-(
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

What protocol are you targeting? FTP, SFTP, SSH, SMB, etc?

-- 
Mike Mackintosh
PHP 5.3 ZCE



Re: [PHP] why is (intval('444-44444') == '444-44444') EQUAL??!

2012-06-21 Thread Mike Mackintosh
Using == will compare the two values after type juggling is performed. === will 
compare based on value and type (identical).

PHP Will type juggle the string to an integer.

Your if/else is just like saying: 

php if (444 == 444) echo 'equal'; else echo 'not equal';
equal

-- 
Mike Mackintosh
PHP 5.3 ZCE


On Thursday, June 21, 2012 at 10:27 PM, Daevid Vincent wrote:

 Huh? Why is this equal??!
 
 php  $id = '444-4';
 
 php  var_dump($id, intval($id));
 string(9) 444-4
 int(444)
 
 php  if (intval($id) == $id) echo 'equal'; else echo 'not equal';
 equal
 
 or in other words:
 
 php  if (intval('444-4') == '444-4') echo 'equal'; else
 echo 'not equal';
 equal
 
 I would expect PHP to be evaluating string 444-4 against integer 444
 (or string either way)
 
 however, just for giggles, using === works...
 
 php  if ($id === intval($id)) echo 'equal'; else echo 'not equal';
 not equal
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




Re: [PHP] alias address in REMOTE_ADDR

2012-05-12 Thread Mike Mackintosh


On May 12, 2012, at 2:54, Jim Lucas li...@cmsws.com wrote:

 On 5/11/2012 10:57 PM, Tóth Csaba  wrote:
 Hi Everyone,
 
 I've run into a curious problem, not even really sure it's PHP, but that's 
 where
 I caught it, so here it is:
 
 I have two servers hanging on the net, without proxies. Let's call them 
 Server1
 and Server2. Server1 has multiple IP addresses, configured as aliases. My 
 problem:
 When I do a wget --spider from 1 to 2, I get the eth0 (not alias) address in
 Apache's accesslog on Server2. But when I do a 
 file_get_contents(http://server2.tld),
 and observe the $_SERVER['REMOTE_ADDR'] on Server2, I get one of the alias 
 IP addresses
 back. What can cause this? I really need the eth0 IP address back in 
 REMOTE_ADDR.
 
 Regards,
 Csaba
 
 
 What IP address is your Apache bound to?  You eth0 or one of the alias IPs?
 
 Jim
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Do a netstat -ab and see what ip/ports apache is listening on. 

Mike Mackintosh
ZCE PHP5.3
www.highonphp.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Performance / AB issue?

2012-05-11 Thread Mike Mackintosh
How is PHP running, fast-cgi, sapi, etc..?

Is there anything in the error_log for apache? Could be an issue with 
prefork/worker.

Thanks,

Mike Mackintosh
PHP, the drug of choice - www.highonphp.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Calculating driving distance between UK postcodes

2012-05-04 Thread Mike Mackintosh
On Friday, May 4, 2012 at 10:18, Terry Ally (Gmail) wrote:
 Google works in Javascript extensively - not a language with which I
 have in-depth experience hence my reason for asking for PHP solution.
 
 For example the following will get me a JSON output with the distance in
 Kms and time. I don't know how to get PHP to read this information and
 extract just the distance. I need the distance so that I can calculate cost
 of a trip.
 
 form id=google action=
 http://maps.googleapis.com/maps/api/distancematrix/json; method=get
 input type=text name=origins value= /
 input type=text name=destinations value= /
 input type=hidden name=sensor value=false
 input type=hidden name=submitted value=1
 bra type=submit
 onClick=document.getElementById('google').submit()strongstrongGet
 Distance/strong/strong/a
 /form
 
 
 
 
 
 On 4 May 2012 15:08, David OBrien dgobr...@gmail.com wrote:
 
  Google is still your friend
  
  On Fri, May 4, 2012 at 9:36 AM, Terry Ally (Gmail) 
  terrya...@gmail.comwrote:
  
   Does anyone have a working/example PHP script that calculates driving
   distances between UK postcodes that they can share?
   
   Thanks
   
   --
   *Terry Ally*
   
   Twitter.com/terryally
   Facebook.com/terryally
   ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
   To print or not to print this email is the environmentally-searching
   question!
   Which has the highest ecological cost? A sheet of paper or constantly
   switching on your computer and connecting to the Internet to read your
   email?
   
  
  
  
  http://stackoverflow.com/questions/2296087/using-php-and-google-maps-api-to-work-out-distance-between-2-post-codes-uk
 
 
 
 
 -- 
 *Terry Ally*
 Twitter.com/terryally
 Facebook.com/terryally
 ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
 To print or not to print this email is the environmentally-searching
 question!
 Which has the highest ecological cost? A sheet of paper or constantly
 switching on your computer and connecting to the Internet to read your
 email?
 
 

You should look into curl. Make a post request with the form data as post 
payload. 


-- 
Mike Mackintosh
www.HighOnPHP.com

Re: [PHP] sms class

2012-04-17 Thread Mike Mackintosh
In reality, a SMS messages are transported the SS7 network, or voice network. 
To make the digital transition, carriers use a box called an SMPP gateway. To 
get access to this box, is by contract and terms of he carrier, and most 
commonly forbidden. As a result, the best bet is to use a SMS Aggregator. Once 
you subscribe to their service, they usually offer an API. 

-- 
Mike Mackintosh
www.HighOnPHP.com


On Tuesday, April 17, 2012 at 15:50, Lester Caine wrote:

 DZvonko Nikolov wrote:
  I need a class that sends sms messages to list of numbers.
  I'm quite new to that issue, so I need to know what I need
  more. Thanks in advance.
  
 
 
 Ignoring the wallies 
 
 Simply sending an SMS message is something rather more difficult that just 
 needing a class to do it.
 Google will give you a hell of a lot of crap and no real answers - I know - 
 I've 
 been through a lot of it!
 
 The bottom line is that we need to be able to send the message TO the mobile 
 phone network, and while in theory it should be simple to do that by 
 accessing 
 your own mobile phone, the providers tend to block such activity. I'm STILL 
 trying to get a SIM card I can use to send my own messages via the mobile 
 modem 
 that I HAVE got full access to, but none of the UK providers will oblige with 
 one that has this function enabled. Even though I will be paying for the 
 'airtime' ...
 
 The only way currently to do this is to sign up to a service that you pay to 
 send each messages. So what you need to look for is a suitable text sending 
 service in your area. Some have free setup and provide a few free messages, 
 then 
 charge based on your volume of messages. Many of these provide a web based 
 service to which you can submit your traffic, but that area is another 
 variable. 
 I'm using http://www.textlocal.com/ at the moment just to get things running.
 
 -- 
 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//
 Firebird - http://www.firebirdsql.org/index.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




Re: [PHP] securing a script that exec()s

2012-03-30 Thread Mike Mackintosh

On Mar 30, 2012, at 9:25 AM, rene7705 wrote:

 On Fri, Mar 30, 2012 at 3:16 PM, Peter Bauer p...@archivum.info wrote:
 
 On Fri, Mar 30, 2012 at 11:56:41AM +0200, rene7705 wrote:
 ...
 But unfortunately, $_SERVER['REMOTE_ADDR'] is my external IP, and
 $_SERVER['SERVER_ADDR'] is my internal IP.
 
 How would I best fix this?
 
 Simply log on your box via ssh (if its a unix system) and run your script
 from console or with textmode browser lynx.
 
 But the best solution would be to secure the exec call.
 
 How would I best secure the exec call?

What would the form input look like?

Mike Mackintosh
PHP, the drug of choice - www.highonphp.com



Re: [PHP] Graphing

2012-03-18 Thread Mike Mackintosh
Take a look at pChart2. It's the simplest and quickest way to generate a lot of 
nice graphs. Only requires GD.

Look at the source and you can follow their syntax. 

-- 
Mike Mackintosh
www.HighOnPHP.com


On Sunday, March 18, 2012 at 9:33, Ross Hansen wrote:

 Hey all,
 
 I have been working with php for a few years but mostly simple stuff. I'm now 
 looking at doing some graphing but have no experience with dynamic images. 
 
 I have never used imagecreate but have seen one example of it and not sure if 
 it is really what i'm after.
 It needs to graph changing data from a mysql db.
 I also understand php might not be the best option due to the server load.
 
 Just want to get peoples thoughts and suggestions.
 Was so looking at jquery.
 
 Looking forward your responses.
 
 Regards
 Ross
 
 




Re: [PHP] Any SNMP Guru's?

2012-03-15 Thread Mike Mackintosh
I don't not think there is a way without patching snmp.c prior to PHP 
configuring.

You can always do: 

$segment = explode(:, $macaddress);
foreach($segment as $seg){
$hex[] = str_pad($seg, 2, 0, STR_PAD_LEFT);
}

$macaddress = implode(:, $hex);

or use a preg replace function and match

Mike Mackintosh
PHP, the drug of choice - www.highonphp.com



On Mar 15, 2012, at 4:12 PM, David OBrien wrote:

 Using command line snmpget you can set an option to append leading 0's to
 hex values -o0
 So instead of
 
 $macaddress = 0:1a:4b:c:8d:fb;
 
 it would be
 
 $macaddress = 00:1a:4b:0c:8d:fb;
 
 is there any option using the extremely well documented php snmp extension
 to do the same?



Re: [PHP] no traffic

2012-03-06 Thread Mike Mackintosh
On Mar 6, 2012, at 8:55, Lawrence Decker lld0...@gmail.com wrote:

 I've been playing with PHP for about 6 years and I have no idea why this is
 happening... I've been writing a script to auth to AD.  When I run the
 script on my dev box, nothing.  I have wireshark running in the background
 on the dev box, I can see the script's traffic go out and hit the DNS
 server but no other traffic. Command line, no problem talking to other
 hosts with whatever port I'm trying to hit.  On my box, all the scripts
 work fine.  LDAP is enabled, but I can't hit ANY port other than DNS and if
 I use the IP in the script, I see no traffic.  Both are FC16-64 patched as
 of last week. I matched line-by-line in the phpinfo() on my box and the dev
 box - no difference.  Used this script to try any port open on other hosts
 but no traffic shows up in wireshark!! Any ideas
 
 
 Lawrence
 
 
 
 ?php
 function ping($host,$post=25,$timeout=6)
 
 {
  $fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
  if ( ! $fsock )
  {
   return FALSE;
  }
  else
  {
   return TRUE;
  }
 }
 
 /* check if the host is up $host can also be an ip address */
 $host = 'mail.bac.com';
 $up = ping($host);
 
 /* optionally display either a red or green image to signify the server
 status */
 echo 'img src='.($up ? 'on' : 'off').'.jpg alt='.($up ? 'up' :
 'down').' /';
 
 ?
 
 
 or this one
 
 
 
 ?php
 
 //using ldap bind anonymously
 
 // connect to ldap server
 $ldapconn = ldap_connect(10.13.3.10)
or die(Could not connect to LDAP server.);
 
 if ($ldapconn) {
 
// binding anonymously
$ldapbind = ldap_bind($ldapconn);
 
if ($ldapbind) {
echo LDAP bind anonymous successful...;
} else {
echo LDAP bind anonymous failed...;
}
 
 }
 
 ?
 
 
 
 phpinfo()
 
 LDAP Support enabled RCS Version $Id: ldap.c 321634 2012-01-01 13:15:04Z
 felipe $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor
 Version 20426 SASL Support Enabled

How many interfaces are on your box? From the cli can you telnet 10.13.3.10 389

Also do a netstat -na | grep 389

What returns, any open outgoing sockets?

Mike Mackintosh
ZCE PHP5.3
www.highonphp.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] iphone php

2012-03-05 Thread Mike Mackintosh
On Mar 5, 2012, at 12:30, Jim Giner jim.gi...@albanyhandball.com wrote:
 
Download dolphin browser, it's a free safari replacement using webkit. Try you 
app in there and post back the results.

Mike Mackintosh
ZCE PHP5.3
www.highonphp.com

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



Re: [PHP] iphone php

2012-03-05 Thread Mike Mackintosh
On Mar 5, 2012, at 12:52, Jim Giner jim.gi...@albanyhandball.com wrote:

 
 Jay Blanchard jay.blanch...@sigmaphinothing.org wrote in message 
 news:4f54faf8.4030...@sigmaphinothing.org...
 [snip]In the last few mins I re-booted my phone and it is now doing 
 something even worse! [/snip]
 
 Have you also cleared the cache and the cookies?
 
 You can also add Firebug to your iPhone - 
 http://www.iphone-my.com/ipad/geting-firebug-iphone-ipad/
 
 No - I didn't go that far, but I can.  More testing has revealed that Safari 
 running on my PC also doesn't like to accept the date I'm inputting.  As 
 soon as I tab off the field, it changes itself to whatever my first two 
 digits were. 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Is your input an HTML 5 date time field?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Do an LDAP Password Modify Extended Operation?

2012-02-17 Thread Mike Mackintosh


On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:

 Is it possible to do an LDAP Password Modify Extended Operation, as 
 specified in RFC 3062? The password hashing scheme in the LDAP directory I 
 am working with may change periodically, so it is my understanding that I 
 can't hash a new password according to a specific scheme, e.g., {SHA}, on 
 my side. Instead, I should use an Extended Operation and let the directory 
 do the hashing. Is that correct? The help page for ldap_set_option 
 suggests that it might be possible, but I sure can't find any example code 
 anywhere. 
 
 TIA
 
 Kirk

I have an example of this on my lab box at home. I noticed issues depending on 
if the requesting application was Linux or windows due to the different Linux 
LDAP libraries. 

When I get home I'll forward you the example of what I have so far
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Do an LDAP Password Modify Extended Operation?

2012-02-17 Thread Mike Mackintosh
On Feb 17, 2012, at 3:34 PM, kirk.john...@zootweb.com wrote:

 Mike Mackintosh mike.mackint...@angrystatic.com wrote on 02/17/2012 
 12:36:06 PM:
 
 On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:
 
 Is it possible to do an LDAP Password Modify Extended Operation, as 
 specified in RFC 3062? The password hashing scheme in the LDAP 
 directory I 
 am working with may change periodically, so it is my understanding 
 that I 
 can't hash a new password according to a specific scheme, e.g., {SHA}, 
 on 
 my side. Instead, I should use an Extended Operation and let the 
 directory 
 do the hashing. Is that correct? The help page for ldap_set_option 
 suggests that it might be possible, but I sure can't find any example 
 code 
 anywhere. 
 
 TIA
 
 Kirk
 
 I have an example of this on my lab box at home. I noticed issues 
 depending on if the requesting application was Linux or windows due 
 to the different Linux LDAP libraries. 
 
 When I get home I'll forward you the example of what I have so far
 
 Woohoo! Extended Operation doesn't seem to be a practice that is in 
 wide-spread use. Looking forward to what you've come up with. Thanks.


Kirk,

What i've been trying to do, is revive the patch i found here:

http://www.mail-archive.com/internals@lists.php.net/msg19665.html

It provides a lot of the functionality that you can only imagine and more, but 
it fails against versions 5.3.x.

I sent an email to the original maintainer, Pierangelo, but have not received a 
response yet on that status of maintenance.

Do you use OpenLDAP? I am not sure if it built, if it would support AD or not.

Mike Mackintosh
PHP, the drug of choice - www.highonphp.com


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



Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh
If you don't get any replies, try the Dev Mailing list.

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



Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh
btw, php dev = internals

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



Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh




On Feb 1, 2012, at 18:49, Matijn Woudt tijn...@gmail.com wrote:

 On Thu, Feb 2, 2012 at 12:17 AM, Tim Streater t...@clothears.org.uk wrote:
 I'm keen to look at the C source of such as substr_replace() and stripos(). 
 I've downloaded the 5.3.9 PHP source, but am having difficulty locating the 
 string functions. Could someone point me at the right directory or .c file?
 
 Thanks,
 
 --
 Cheers  --  Tim
 
 On linux you can use a combination of find and grep to find it, on
 windows there's a search function? I believe you can specify in the
 search that you want to search inside files to get it, and else you
 can use software like Notepad++ for example that has a 'search in
 files' option.
 
 - Matijn
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

See http://www.highonphp.com/how-to-find-file-by-content
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP-GTK dead?

2012-01-10 Thread Mike Mackintosh


On Jan 10, 2012, at 14:19, Yared Hufkens y4...@yahoo.de wrote:

 It seems that PHP-GTK is completely dead. The latest version (2.0.1) was
 released on May 2008, nobody answers on questions in the mailing list,
 and the latest SVN commit is nearly one year ago.
 
 Am I wrong or is it senseless to write still PHP-GTK programs?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

I wouldn't call it completely dead as many sure still use it, especially since 
the release of phar. I am as well curious though of the roadmap for it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] passing variables to php script

2012-01-10 Thread Mike Mackintosh


On Jan 10, 2012, at 15:12, Marco Behnke ma...@behnke.biz wrote:

 Am 10.01.12 21:07, schrieb Donovan Brooke:
 David Savage wrote:
 OK...I admit I'm new at thisI have this html file:
 html
 head
 titleGenerate pdf file of LD, Toll Free, and Directory Assistance
 calls/titl
 /head
 body
 form action=Q:\ASTERISK\callrecs.php method=post
 
 Stupid question . where have you copied your script? Is it lying on
 a webserver? Then I would guess that you are submitting the form on your
 webserver which hits the PHP script on your Desktop PC which in tunr
 invokes the PHP command line interpreter who has no idea what you mean
 by $_POST.
 
 Try changing the form action to simply callrecs.php and see if that works.
 
 -- 
 Marco Behnke
 Dipl. Informatiker (FH), SAE Audio Engineer Diploma
 Zend Certified Engineer PHP 5.3
 
 Tel.: 0174 / 9722336
 e-Mail: ma...@behnke.biz
 
 Softwaretechnik Behnke
 Heinrich-Heine-Str. 7D
 21218 Seevetal
 
 http://www.behnke.biz
 

Q: would be referencing a filesystem path, rather a web address interpreted by 
a  PHP processor. Make sure your .php target is within a PHP supported web 
space.

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



Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Mike Mackintosh


On Dec 16, 2011, at 12:04, Dave deal...@gmail.com wrote:

 Hi all,
 
 I need to create a year to date report with individual  Subsummary
 Report (ala filemaker / others?) headings for each month. So, I’m
 curious the best way to approach this for performance speed and
 flexibility etc.
 
 -  I can do 1 sql query for the whole year’s data - or 12 individual
 queries... probably best to do 1 big year sql query - but I’m not sure
 how to split things up with loops etc.
 
 each summary month heading will need to show:
 - total month count of records
 - special counts within each month
 - more stuff
 - also the record data
 
 like:
 
 JAN - total record count = 50 special count = 3
 
 data record 1
 data record 2
 data record 3
 
 FEB - total record count = 47 special count = 4
 
 data record 1
 data record 2
 data record 3
 etc.
 
 
 Q: is it better to do 1 year find or 12 month queries - is 1 big find faster?
 
 Q: with one year find - how do I setup 12 loops to simulate summaries?
 do i just loop through the full set and only display if record is in
 month 1 or 2 or whatever?
 
 If there are any links describing this process - that would be great
 
 any help would be appreciated...
 
 
 -- 
 Thanks - Dave
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

I would give consideration to the 'group by' function for your query, and loop 
through that.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] socket_recv

2011-11-17 Thread Mike Mackintosh
On Nov 17, 2011, at 14:03, Tim Streater t...@clothears.org.uk wrote:

 I'm playing around with web sockets and have found a couple of simple servers 
 written in PHP. They both appear to perform the initial handshake with a 
 client but then just give up because socket_recv reports that there is no 
 data. I'm confused by this as, the handshake being complete, I wouldn't 
 expect there to be any data if the client hasn't sent any. Is there a way to 
 wait with timeout on data showing up at a socket?
 
 --
 Cheers  --  Tim
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

Any indication if the socket is in blocking mode or not?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] problem with sending AT command in php

2011-11-15 Thread Mike Mackintosh


On Nov 15, 2011, at 8:25, Richard Quadling rquadl...@gmail.com wrote:

 On 15 November 2011 11:50, a dehqan dehqa...@gmail.com wrote:
 \n is for Linux
 \r is for Windows
 
 On 11/14/11, Richard Quadling rquadl...@gmail.com wrote:
 On 12 November 2011 20:02, a dehqan dehqa...@gmail.com wrote:
 dio_write($handle, 'AT')  dio_write($handle, AT) make firefox times out
 on Waiting for localhost ... .
 But dio_write($handle, AT\n) makes it prints AT exactly the same command
 or  A  A , ..
 
 On Sat, Nov 12, 2011 at 10:02 PM, Negin Nickparsa
 nickpa...@gmail.comwrote:
 
 are you sure about ATD03518726535\n?
 
  can you try if ( dio_write($handle, 'AT') )?
 
 
 
 Don't use \n, use \r.
 
 http://en.wikipedia.org/wiki/AT_commands#Example_session
 
 
 
 --
 Richard Quadling
 Twitter : EE : Zend : PHPDoc : Fantasy Shopper
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
 fan.sh/6/370
 
 
 
 No, \r is the requirement of the modem. Nothing to do with the OS.
 
 Windows uses \r\n as its line terminators, but when you talk to a
 modem, you use \r.
 
 
 
 -- 
 Richard Quadling
 Twitter : EE : Zend : PHPDoc : Fantasy Shopper
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
 fan.sh/6/370
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


I've had better luck with PHP_EOL instead of \r or \n.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CGI PHP vs. FastCGI vs. mod_php vs. application server?

2011-10-12 Thread Mike Mackintosh
Nice write up Richard

On Oct 12, 2011, at 7:06, Richard Quadling rquadl...@gmail.com wrote:

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



Re: [PHP] php.ini setting

2011-10-01 Thread Mike Mackintosh

On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote:

 On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:
 
 On 11-10-01 11:57 AM, Jim Giner wrote:
 I'm trying to set magic quotes Off as my reading tells me that it's not good
 to have it defaulted to On.
 
 
 http://php.net/manual/en/security.magicquotes.disabling.php
 
 Stephen
 
 
 
 Stephen, that page specifies the exact same line for the .htaccess that
 he said he used. I'm not sure why it would cause an internal server
 error, but I've seen some Apache configurations completely flake over
 lines in the .htaccess that were fine elsewhere.
 
 The only thing I can find online where this line will cause a server
 error is where the server is set up to allow custom php.ini files which
 override the defaults. To test this, try adding a php.ini file into the
 directory your script is (this is completely untested, I just saw it on
 a forum (http://www.bluehostforum.com/archive/index.php/t-15975.html ))
 and enter the regular php.ini line to turn it off.
 
 If that fails, I'd try and contact your hosting provider and see what
 they say, as they probably have more information specific to this
 problem, as it's most likely a setting of theirs that is causing it.
 
 -- 
 Thanks,
 Ash
 http://www.ashleysheridan.co.uk
 
 


Have you tried:

ini_set('magic_quotes_gpc', false);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Variable question

2011-10-01 Thread Mike Mackintosh

On Oct 1, 2011, at 1:59 PM, Ron Piggott wrote:

 
 If $correct_answer has a value of 3 what is the correct syntax needed to use 
 echo to display the value of $trivia_answer_3?
 
 I know this is incorrect, but along the lines of what I am wanting to do:
 
 echo $trivia_answer_$correct_answer;
 
 $trivia_answer_1 = “1,000”;
 $trivia_answer_2 = “1,250”;
 $trivia_answer_3 = “2,500”;
 $trivia_answer_4 = “5,000”;
 
 Ron
 
 
 
 
 www.TheVerseOfTheDay.info 

Best bet would to toss this into either an object or array for simplification, 
otherwise that type of syntax would need the use of eval.

example:  eval('echo $trivia_answer_'.$correct_answer.';');

best bet would be to..

$trivia_answer = array();

$trivia_answer[1] = 1000;
$trivia_answer[2] = 1250;
$trivia_answer[3] = 2500;
$trivia_answer[4] = 5000;

echo $trivia_answer[$correct_answer];


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



[PHP] New Service - Short URL Unshortener

2011-09-25 Thread Mike Mackintosh
Hey All,

Wanted to pass a kind word of a new service we launched called Unshortenr 
(www.unshortenr.com) - which was linkrater.com. 

Input a short url and you'll get the target address, the page title, and a 
description of the page. 

Soon to add an option to preview it with a images on/off type of deal.

Feedback would be appreciated.

Thanks,

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



Re: [PHP] dev to production server

2011-09-07 Thread Mike Mackintosh


On Sep 7, 2011, at 0:24, Chris Stinemetz chrisstinem...@gmail.com wrote:

 Does anyone have a procedure or know of any tutorials that explain how
 to take a mac/apache/php/mysql dev environment and converting it to
 production environment?
 
 Basically I want to host my own web site on my local machine now that
 I have finished developing it.
 
 Thanks in advance!
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

By local, do you mean a local dedicated box, or an everyday use box?

The checklist varies quite a bit depending on the results. 

Also, is your site to be served by standard port 80 traffic? Does your Internet 
host allow inbound port 80?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread Mike Mackintosh
On Aug 25, 2011, at 5:01, John Black s...@network-technologies.org wrote:

 On 24.08.2011 21:38, Mike Mackintosh wrote:
 On Aug 24, 2011, at 11:52, John Blacks...@network-technologies.org  wrote:
 On 08/24/2011 03:04 AM, Jason Pruim wrote:
 Wondering what everyone does to prevent multiple form submissions?
 My form is simply getting emailed to my email, and it redirects to a 
 success page when submitted...
 Would it be as simple as doing something with the cache control? Basically 
 I'm trying to avoid someone submitting a form... Then hitting back, and 
 submitting again, then hitting back I think you get the idea...
 What do you all do?
 Jason Pruim
 I am using $_SESSION for this. Set a value on the initial page, a timestamp 
 is a good choice, then validate the value on the receiving script and clear 
 the value.
 I like to use a timestamp because it will allow you to deny a comment which 
 took too long to submit.
 I've always tended to stay away from session for that, as when the browser 
 closes/restarts, the page is accessible again.
 
 True, a SESSION can be reset by closing the browser but I am not trying to 
 deny a user from submitting different information again. I want to prevent 
 them from submitting the same data again by accident (back button or refresh).
 
 A visitor, enters on the form UI page, the session is set, user submits and 
 the form will reset the value in session to null or destroy it.
 
 If the visitor attempts to resubmit by using refresh then it will fail 
 because session does not contain an expected value anymore. That value is 
 generated on the UI page.
 
 If the user goes back with the back button then the browser should display 
 the page from cache. The script will not be called and it will not create a 
 new session value.
 If the browser does not use the cache it will have to reload the form. This 
 will create a new session value and an empty form so the user may type a new 
 message. This is like attempting to submit a new message and is something I 
 don't block.
 
 
 I do it this way because I don't want to prevent a visitor to submit new 
 information and I don't think that the original question wanted that.
 --
 John
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Ah, ok. For that I submit the page and do a header location to a thank you 
page. This will clear the post data if the back button us clicked.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dealing with multiple form submissions

2011-08-24 Thread Mike Mackintosh


On Aug 24, 2011, at 11:52, John Black s...@network-technologies.org wrote:

 On 08/24/2011 03:04 AM, Jason Pruim wrote:
 Wondering what everyone does to prevent multiple form submissions?
 My form is simply getting emailed to my email, and it redirects to a success 
 page when submitted...
 Would it be as simple as doing something with the cache control? Basically 
 I'm trying to avoid someone submitting a form... Then hitting back, and 
 submitting again, then hitting back I think you get the idea...
 What do you all do?
 Jason Pruim
 
 
 Hi,
 I am using $_SESSION for this. Set a value on the initial page, a timestamp 
 is a good choice, then validate the value on the receiving script and clear 
 the value.
 
 I like to use a timestamp because it will allow you to deny a comment which 
 took too long to submit.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

I've always tended to stay away from session for that, as when the browser 
closes/restarts, the page is accessible again.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dealing with multiple form submissions

2011-08-23 Thread Mike Mackintosh

On Aug 23, 2011, at 9:04 PM, Jason Pruim wrote:

 Hey Everyone,
 
 Wondering what everyone does to prevent multiple form submissions? 
 
 My form is simply getting emailed to my email, and it redirects to a success 
 page when submitted...
 
 Would it be as simple as doing something with the cache control? Basically 
 I'm trying to avoid someone submitting a form... Then hitting back, and 
 submitting again, then hitting back I think you get the idea...
 
 What do you all do?
 
 Thanks!
 
 
 Jason Pruim
 li...@pruimphotography.com
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Cookies are always a great start!

On success, set a cookie, and if they access the form and cookie is set, 
redirect automatically to the thank you page.

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



Re: [PHP] A Question On Web Graphics

2011-07-12 Thread Mike Mackintosh

On Jul 12, 2011, at 3:10 PM, Thomas Dineen wrote:

 Gentle People:
 
Sorry if this appears off topic but I am not sure where to post the
 question. Please do not get mad, just recommend a better venue!
 
Currently I am quite experienced with C and learning C++ but I have
 never written graphical type applications in either!
 
Can you recommend an open source graphics package which would be
 called by C/C++ and be fit for drawing complex graphs and charts for Web 
 Applications?
 
   Also I have successfully experimented with Apache and PHP but have not yet
 identified graphics applications for this venue either! Ideas?
 
I am thinking about calling a C/C++ based application called from 
 Apache/PHP,
 where the C/C++ Application would call the graphics application as necessary!
 
   Is this the best architecture?
 
 Thanks for the help.
 Thomas Dineen
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


I had nothing but good luck with Imagick. Very powerful.

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



Re: [PHP] Re: Top Posting

2011-07-05 Thread Mike Mackintosh

On Jul 5, 2011, at 12:06, Stuart Dallas stu...@3ft9.com wrote:

 On Tue, Jul 5, 2011 at 4:48 PM, Jim Giner jim.gi...@albanyhandball.comwrote:
 
 
 Stuart Dallas stu...@3ft9.com wrote in message
 If you're looking for a sane reason why Microsoft software is popular in
 the
 business world you're not going to find one. 
 
 No - you missed my statement's point.  Not looking for anything - just
 saying it is what it is.  You won't find me defending M$ software designs -
 I was simply pointing out that the product is setup that way and nobody
 over
 the years has made any effort (?) to have it altered.  I wonder why. :)
 
 
 I didn't miss the point. As I said later on, mailing lists with archives
 have different requirements to business users - you can't compare the two.
 
 In addition, most business users live with what they're given because they
 don't have a loud enough voice. I'd also bet good money that most people
 haven't even considered the possibility of doing it differently.
 
 One final thing... you keep calling this a newsgroup. The PHP mailing
 lists
 are mailing lists first, and a newsgroup second - that's kinda why
 they're
 called the PHP mailing lists.
 
 It looks like all the newsgroups I've ever belonged to.  It acts like a
 newsgroup.  And - funny ha ha - its name begins with the word news, not
 mailing.  BTW - what does a mailing list look like?
 
 
 http://php.net/mailing-lists - this is what you're reading. They're also
 available as newsgroups on our news server. Note that they're not
 newsgroups that are also available as mailing lists.
 
 A mailing list server is a managed one-to-many distribution system. Google
 it!
 
 AND - instead of coming down on people who top post, why not come down on
 the vast majority of people of DON'T post ONLY the pertinent part(s) of the
 past emails in their own response?  Cutting down on the amount of chaff in
 the postings here would certainly eliminate the biggest reluctance to
 having
 to bottom-post.  To scroll thru 60-100 lines of quoted and re-quoted text
 only to read a two line contribution is tedious and wasteful.
 
 
 When you post at the top of a thread where most people have bottom posted,
 that's a bigger problem than untrimmed quotes.
 
 Find out what key combination gets you to the end of the message in your OS
 and learn how to use it. Oh, and bear in mind that you may miss inline
 responses by skipping to the end.
 
 Oh, so you're saying that the need to cut out the chaff is what stops you
 from bothering to cut out the chaff? Curious logic at work there.
 
 PS - note the bottom post.
 
 
 *clap* *clap* You after a medal or summink?!!
 
 -Stuart
 -- 
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/


Don't forget that apple mail doesn't have an option for default bottom posting 
and the indents suck. (yes I have a Mac)

Logically, to developers bottom posting makes more sense, but to businesses, 
they don't want to cut scroll and quote, so top posting became big.

The preference is that of the administrators and the community or business just 
need to deal with it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] iPhone sadness WOT

2011-05-31 Thread Mike Mackintosh
Thanks

:P

Sent from my iPhone

On May 31, 2011, at 9:54, Jay Blanchard jblanch...@pocket.com wrote:

 [snip]
 I beg to differ - the sarcastic remarks have been here since day one.
 
 Yeah *SHSH* What was he thinking?!
 
 ;)
 [/snip]
 
 I know huh? Whatevs.
 
 I added something to the subject so that those who don't want to read
 these can send them to /dev/null appropriately.
 
 -- 
 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] Friday Preview

2011-05-17 Thread Mike Mackintosh
Great Idea, and I cant wait!

On May 17, 2011, at 8:28 PM, Daniel Brown wrote:

Hey, folks;
 
To try to boost a bit of creative thinking and increase list
 traffic a bit, let's reach back into the past this Friday and bring
 back an oldie-but-goodie:
 
PHP Brainteasers
 
The old-heads on the list may remember how, a few years ago, we
 had a rather long group of threads where we would express common
 phrases (in English --- sorry to the non-native-speakers) in PHP code.
 For those who weren't around or don't recall, here's a very, very
 basic example:
 
 ?php
class proverb {
 
var $amount;
 
function give() {
return ++$this-amount;
}
 
function receive() {
return --$this-amount;
}
 
function steal() {
return $this-amount = 0;
}
 
function tally() {
return $this-amount;
}
 
function proverb($amount) {
$this-amount = $amount;
}
}
 
$p = new proverb(5);
 
if ($p-give()  $p-receive()) {
echo '\'Tis.'.PHP_EOL;
} else {
echo 'Give me '.$p-amount.'.'.PHP_EOL;
}
 ?
 
Here are the details:
 
1.) While it doesn't have to do anything necessarily, it
 must compile without ANY errors, warnings, or variable notices (other
 notices, such as timezone settings, are okay).
2.) It can be for any version of PHP5 --- legacy code for PHP
  5.0.0 is not eligible.
3.) Feel free to use little-known functions, variable
 declaration/modification techniques, et cetera.
4.) Obfuscation does not always count as a brainteaser.
5.) You may use variable and function names as hints.
6.) Try to employ at least the basics of code standards and
 best practices that should be common sense to all PHP developers.
 
The hope is that, with several people participating, newbies and
 experts alike will be able to say, hey, I never thought of doing it
 that way! or, wow, I didn't even know PHP had that functionality
 built-in! while also achieving the goals mentioned earlier.
 
Hope to see a good amount of participation.  Remember, wait until
 Friday (in your time zone!).  If you come up with some in the
 meantime, just hold onto them until then; there's no limit to the
 amount of submissions anyone can send.  In fact, the more we get, the
 more fun it should be for those who participate.
 
One final note --- whomever starts the thread on Friday, please
 use the following subject, verbatim:
 
PHP Brainteasers 2011
 
This way, folks who don't want to be involved can't just filter
 that thread out and not be bombarded.
 
Thanks, all.  Looking forward to seeing what everyone invents and
 puzzling over them myself!
 
 -- 
 /Daniel P. Brown
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Error Reporting/Display Errors Issues?

2011-05-10 Thread Mike Mackintosh
Unfortunately setting that within the PHP file directly still results in errors 
and notices being displayed. I'm at a loss.

Sent from my iPhone

On May 10, 2011, at 5:40, ad...@buskirkgraphics.com wrote:

 Try this for me in a page you wish to not display errors.
 ?php
 
 error_reporting(0);
 ini_set('display_errors', 0);
 
 ?
 
 
 What you are doing with this function is over riding the php.ini file and
 turning off the errors on that page.
 Place the code at the beginning of php before any includes.
 
 If this works errors are turned on or your disabling function is malformed.
 
 
 
 Richard L. Buskirk
 
 
 
 -Original Message-
 From: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com] 
 Sent: Monday, May 09, 2011 10:34 PM
 To: php-general@lists.php.net
 Subject: [PHP] Error Reporting/Display Errors Issues?
 
 Anyone else notice PHP throwing Warning and Notices even when display errors
 and error reporting disabled?
 
 I compiled PHP with the following:
 
 './configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli'
 '--disable-debug' '--disable-rpath' '--disable-static' '--with-pic'
 '--with-openssl=/usr' '--enab
 le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl'
 '--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp'
 '--with-gd' '--enable-gd-native-ttf' '-
 -with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
 '--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap'
 '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
 ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic'
 '--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr'
 '--with-pspell=/usr' '--enable-sockets' '--enable-wd
 dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU'
 '--with-ldap' '--enable-pdo' '--enable-soap'
 '--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
 l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr'
 '--with-config-file-path=/etc'
 '--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
 sr/local/mysql-5.1.49' '--with-openssl=/usr'
 
 I have also set the following:
 
 display_errors = Off = Off
 display_startup_errors = Off = Off
 error_append_string = no value = no value
 error_log = no value = no value
 error_prepend_string = no value = no value
 error_reporting = 0 = 0
 
 But i continue to receive Strict/Notice and Warnings in code that i wish to
 be hidden.
 
 Any suggestions?
 
 Thanks,
 
 Mike
 -- 
 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Error Reporting/Display Errors Issues?

2011-05-09 Thread Mike Mackintosh
Anyone else notice PHP throwing Warning and Notices even when display errors 
and error reporting disabled?

I compiled PHP with the following:

'./configure'  '--prefix=/usr/local/php-5.3.3' '--enable-cli' '--disable-debug' 
'--disable-rpath' '--disable-static' '--with-pic' '--with-openssl=/usr' '--enab
le-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl' 
'--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp' '--with-gd' 
'--enable-gd-native-ttf' '-
-with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' 
'--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap' 
'--with-kerberos=/usr' '--with-imap-ssl=/usr' '--ena
ble-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic' 
'--with-mysql=/usr/local/mysql-5.1.49' '--with-pcre-regex=/usr' 
'--with-pspell=/usr' '--enable-sockets' '--enable-wd
dx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU' 
'--with-ldap' '--enable-pdo' '--enable-soap' 
'--with-apxs2=/usr/local/apache-2.2.16/bin/apxs' '--enable-pcnt
l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr' 
'--with-config-file-path=/etc' 
'--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u
sr/local/mysql-5.1.49' '--with-openssl=/usr'

I have also set the following:

display_errors = Off = Off
display_startup_errors = Off = Off
error_append_string = no value = no value
error_log = no value = no value
error_prepend_string = no value = no value
error_reporting = 0 = 0

But i continue to receive Strict/Notice and Warnings in code that i wish to be 
hidden.

Any suggestions?

Thanks,

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



Re: [PHP] Re: Installing on a Mac: include_path issues

2011-05-05 Thread Mike Mackintosh
Run phpinfo() or php -I and see if the PHP.ini file is being loaded.

Sent from my iPhone

On May 5, 2011, at 5:40, Richard Quadling rquadl...@gmail.com wrote:

 On 5 May 2011 05:51, David Robley robl...@aapt.net.au wrote:
 Ken Kixmoeller wrote:
 
 Hey, folks -- --
 
 I am switching over my development (I hope) to a Mac. Having some
 trouble with the configuration. Rudimentary scripts run fine in the
 document_root, but beyond that, my scripts in the include_path are not
 found.
 
 The include_path has a couple of directories in which I have my
 foundation classes and a clients application classes and other
 programs. For various reasons, I put them into my Documents/Clients
 folder. When I create to set the path to these files in PHP, they are:
 
  /Users/ken/Documents/Clients/comped_php
  /Users/ken/Documents/Clients/jaguar_php
 
 PHP doesn't find them, which has me stumped.
 
 php.ini shows the include_path correctly, as:
   
 /Users/ken/Documents/Clients/comped_php:/Users/ken/Documents/Clients/jaguar_php
 
 the document_root, configured in Apache is: /Users/ken/Sites/
 
 The errors show as:
 include_once() [function.include]: Failed opening 'smm_header.php' for
 inclusion
 
 (include_path='/Users/ken/Documents/Clients/comped_php:/Users/ken/Documents/Clients/jaguar_php')
 in /Users/ken/Sites/smm_registration/smmcomputereducation.php on line 1
 
 Any ideas or suggestions?
 
 Thanks,
 
 Ken
 
 If I remember correctly, include and friends have two parts to the error
 message but you've only shown us one. For a guess, is it possible the
 apache process doesn't have permissions for those directories and/or the
 files within them?
 
 
 
 Cheers
 --
 David Robley
 
 I've got Parkinson's disease. And he's got mine.
 Today is Setting Orange, the 52nd day of Discord in the YOLD 3177.
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 include_path should only contain directories, not filenames. [1]
 
 Richard.
 
 [1] http://docs.php.net/manual/en/ini.core.php#ini.include-path
 
 -- 
 Richard Quadling
 Twitter : EE : Zend
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
 
 -- 
 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] Re: Installing on a Mac: include_path issues

2011-05-05 Thread Mike Mackintosh
What are the permissions on the include directory?

Sent from my iPhone

On May 5, 2011, at 9:42, Ken Kixmoeller phph...@comcast.net wrote:

 On Thu, May 5, 2011 at 5:59 AM, Mike Mackintosh
 mike.mackint...@angrystatic.com wrote:
 Run phpinfo() or php -I and see if the PHP.ini file is being loaded.
 
 php.ini shows the include_path correctly, as:
   
 /Users/ken/Documents/Clients/comped_php:/Users/ken/Documents/Clients/jaguar_php
 
 Oops, that line was supposed to say phpinfo() shows the include_path
 correctly. Sorry for the confusion. phpinfo() runs just fine and
 shows me what I expected.
 
 Ken
 
 -- 
 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] sem_get invalid argument for existing semaphore

2011-05-04 Thread Mike Mackintosh
Are you using the whole hex key or removing the 0x prefix? 

Sent from my iPhone

On May 4, 2011, at 8:13, Jeremy Greene jer...@zeevee.com wrote:

 Hi,
 
 
 
 I am trying to do a sem_get on a semaphore that has already been created
 by
 
 a c++ program. But I'm getting this warning:
 
 
 
 PHP Warning:  sem_get(): failed for key 0x31006dc2: Invalid argument in
 /home/jgreene/views/latest/lcast/apps/webapp/webApp.php on line 11
 
 
 
 Here is the line 11:
 
sem_get($key, 1, 0666);
 
 
 
 And here is ipcs -s before and after the php script runs:
 
 
 
 -- Semaphore Arrays 
 
 keysemid  owner  perms  nsems 
 
 0x31006dc2 1245191jgreene   6661 
 
 0x31006e01 1277960jgreene   6661 
 
 
 
 I have another c++ program that can get the existing sem with no
 problem.
 
 
 
 I can get the php script to create a new sem with no problem.
 
 
 
 It does not seem to like to get a sem that's already created... although
 I haven't tried getting a sem that's been created by another php
 script... But the entire point is that php is an ephemeral client and a
 C++ app server creates and responds/locks a resource (in this case
 shared memory - which does work fine).
 
 
 
 Btw, in the archives, way back in 2001, there was a pretty much exact
 same post... unfortunately there was no conclusion posted... I really
 hope I have better luck!!
 
 
 
 Jeremy
 
 
 
 
 
 
 

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