RE: [PHP] how old is this version of PHP?
Godaddy enables you to upgrade to PHP 5.3 in the cPanel settings. Date: Mon, 19 Aug 2013 01:07:17 -0500 From: la...@garfieldtech.com To: php-general@lists.php.net Subject: Re: [PHP] how old is this version of PHP? 5.2.9 was released in February of 2009. 5.2 is completely retired and out of support. 5.3 is on security-only life-support. 5.4 is the legacy stable release. Yes, 5.2.9 IS that old. :-) Really, get a host that has made it into this decade. (GoDaddy apparently doesn't meet that qualification.) You're doing clients a disservice by allowing them to run such an ancient and unsupported version. --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mongo usage
Could the comma after the last element in your array be causing the problem? Date: Sat, 6 Jul 2013 14:42:07 -0400 From: bluethu...@gmail.com To: php-general@lists.php.net Subject: [PHP] mongo usage Hey all, I'm trying to pick up some basic use of MongoDB using PHP. I seem to have hit an early obstacle that I'd like your opinion on. I try to pass an array to the mongo insert function, but for some reason the function does not recognize the array I'm passing. Even though I can perform a var_dump() on the array and see the contents. Here's the output I'm seeing (with error): Mongo Test Page array(6) { [first_name]= string(5) Peter [last_name]= string(6) Parker [address]= string(16) 175 Fifth Avenue [city]= string(8) New York [state]= string(2) NY [zip]= string(5) 10010 } *Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php* on line *36* *Fatal error*: Call to a member function insert() on a non-object in * /var/www/mongomaven/index.php* on line *36* * * And here's the code: html head titleMongo Test/title /head body Mongo Test Page ?php $connection = new Mongo(); $db = $connection-jfdb; $collection = $db-addresses; //$adresses = $connection-jfdb-adresses; $address = array( 'first_name' = 'Peter', 'last_name' = 'Parker', 'address' = '175 Fifth Avenue', 'city' = 'New York', 'state' = 'NY', 'zip' = '10010',); var_dump($address); echo 'br /'; $addresses-insert($address); ? /body /html I'd appreciate any advice you might have. Thanks, Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
Re: RES: [PHP] Re: problem with my login script
My problem was solved no need to argue. I don't see why use a while loop with a count variable when it produces the same result as a foreach loop. As for using a break in the loop, I could add it but the loop is gonna stop anyway as soon as it hits the end of the array. I also didn't see the point in using the explode() function as long as I remove the (in my opinion) useless index numbers from the text file containing the username. The following code works as I expect it to: ?php session_start(); $users = file(../inc/users.inc.php); if(!empty($_POST['username']) !empty($_POST['password'])){ if(filter_var($_POST['username'], FILTER_VALIDATE_EMAIL)){ foreach($users as $row){ $row = trim($row); if($_POST['username'] == $row){ $_SESSION['logged_in'] = 1; $_SESSION['username'] = $row; } } if($_SESSION['logged_in'] != 1){ $error = 2; } }else{ $error = 4; } }else{ $error = 3; } if($error){ header(Location:); }else{ header(Location:); } ? users.inc.php: m...@email1.com m...@email2.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pcntl_fork, catching STDOUT of child?
Hello, PHP noob here. I've been working on writing a script (command-line) that forks a number of children to do various tasks. I've been using pcntl_waitpid inside a loop to wait for the children to exit, act on the results, and fork another copy of the child. Where I seem to be running into trouble is in managing communication between child and parent, so that the parent has an indication of result inside the child. In the past, I've done this in Perl using something along the lines of: open(FILEHANDLE,-|); In Perl, this has the effect of forking the process and attaching the STDOUT of the child to FILEHANDLE on the parent. Thus, when the child exits, I read FILEHANDLE to get the output from the child. Is there a similar way of achieving a similar result in PHP? Am I crazy? So far, I have tried to communicate between the processes using sockets (socket_create_pair). However, this seems to be a dead-end, I get a connection reset by peer when I try to socket_read() from the parent. I assume this is because the socket is closed by the exit of the child. Any insight or criticism is appreciated. -- Thomas Johnson ClaimLynx, Inc. 952-593-5969%20x2302
[PHP] PHP Download Of Application Question?
Gentle People: I am looking for a way to download a C based application binary, from an Apache / PHP server, via a client side Web Browser, and execute it seamlessly on the client side PC without storing it permanently on the client side hard disk drive. Temporary storage would be ok. I know this can be done because I have observed it operation in various applications. This concept allows a authorized customer to have the use of an application via the web without being able to keep or share the application binary. I am open to other approaches beyond Apache and PHP. So any ideas out there? Thanks for the help Thomas Dineen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Cairo-0.2.0 Build Bug
Gentle People: When I try to build the PHP/Cairo Extension (version cairo-0.2.0) with the following command: pecl install channel://pecl.php.net/cairo-0.2.0 on Solaris 10 Intel, I get the following errors: /tmp/pear/temp/Cairo/cairo_surface.c, line 706: undefined symbol: CAIRO_SURFACE_TYPE_WIN32_PRINTING /tmp/pear/temp/Cairo/cairo_surface.c, line 707: undefined symbol: CAIRO_SURFACE_TYPE_QUARTZ_IMAGE cc: acomp failed for /tmp/pear/temp/Cairo/cairo_surface.c make: *** [cairo_surface.lo] Error 1 ERROR: `make' failed Note that all the build work seems to occur in the directory: /tmp/pear/temp/Cairo which is empty when examined after the script errors off. Thus preventing further study! Note also that I downloaded the cairo-0.2.0 tar distribution and it did NOT include configure or make files thus preventing manual builds. Please help Thomas Dineen - The entire transcript is shown below: root@Sun# pecl install channel://pecl.php.net/cairo-0.2.0 downloading Cairo-0.2.0.tgz ... Starting to download Cairo-0.2.0.tgz (164,022 bytes) done: 164,022 bytes 20 source files, building WARNING: php_bin /usr/local/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 configure.in:3: warning: prefer named diversions configure.in:3: warning: prefer named diversions Please provide the prefix of Cairo installation [autodetect] : /usr building in /var/tmp/pear-build-tdineen/Cairo-0.2.0 running: /tmp/pear/temp/Cairo/configure --with-cairo=/usr checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep checking for egrep... /usr/sfw/bin/ggrep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... no checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... yes checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... yes checking build system type... i386-pc-solaris2.10 checking host system type... i386-pc-solaris2.10 checking target system type... i386-pc-solaris2.10 checking for PHP prefix... /usr/local/php checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626 checking for PHP installed headers prefix... /usr/local/php/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... no checking for nawk... nawk checking if nawk is broken... no checking for Cairo graphics library support... yes, shared checking PHP version... ok checking for pkg-config... found checking for cairo... found 1.4.10 checking for Freetype... found 9.8.3 checking for non-GNU ld... /usr/ucb/ld checking if the linker (/usr/ucb/ld) is GNU ld... no checking for /usr/ucb/ld option to reload object files... -r checking for BSD-compatible nm... /usr/local/bin/nm -B checking whether ln -s works... yes checking how to recognize dependent libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 786240 checking command to parse /usr/local/bin/nm -B output from cc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking for cc option to produce PIC... -KPIC checking if cc PIC flag -KPIC works... yes checking if cc static flag -Bstatic works... yes checking if cc supports -c -o file.o... yes checking whether the cc linker (/usr/ucb/ld) supports shared libraries... yes checking dynamic linker characteristics... solaris2.10 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared
[PHP] A Question On Web Graphics
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
[PHP] Handling exit in eval
Is there any way to emulate an exit in eval without exiting the calling script. ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; eval($s); echo Never comes here; ? I would like to do something like this: ?php $s = 'echo Shows; exit; echo Doesn\'t show; '; function MakeItStop() { // Do something to make the eval stop // without halting the script } $s = str_replace('exit;', 'MakeItStop();', $s); eval($s); echo Never comes here; ? A simple return would fix it IF the return isn't located within a function. Any good suggestions? Thanks in advanced Thomas Björk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Solr Extension - Changing the wt-Parameter from xml to json
Hi I'm using the Solr extension (http://php.net/manual/en/book.solr.php) to create a search site for a company. I am trying figure out a way of changing the wt-parameter from xml to json. I have searched already but with no success so far. Further information to help with my question: - http://wiki.apache.org/solr/CoreQueryParameters#wt - Example 5 on http://www.php.net/manual/en/solr.examples.php shows the wt-parameter set to xml. Thanks in advance! tj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] goto - My comments
On Sat, Dec 18, 2010 at 11:44 PM, Robert Cummings rob...@interjinn.com wrote: On 10-12-19 12:17 AM, Ethan Rosenberg wrote: Dear List - Thanks to all for your EXCELLENT comments. I definitly agree that goto is a command to be avoided at all costs. Closed-minded drivel (or you're buttering up the popular opinion crowd). A better approach is that goto should be used with caution. As for doing your homework for you... ummm no thanks. You should take the time to do the exercise so you gain the benefit of experience. I would have thought school would have been out on account of Christmas and all. In any event, here's my rewrite: switch (true) { case isset($_POST['Site']) trim($_POST['Site']) != '': $sql1 = $sql1 . site = '$ste'; break; case isset($_POST['MedRec']) trim($_POST['MedRe']) != '': $sql1 = $sql1 . MedRec = '$req'; break; // ... default: if(isset($_Request['Sex']) trim($_POST['Sex']) != '' ) { if ($_REQUEST[Sex] == 0) $sex = 'Male'; else $sex = 'Female'; $sql1 = $sql1 . = '$sex'; $sexdone = 1; } if(isset($_POST['Hx']) trim($_POST['Hx']) != '') { $sql1 = $sql1 . Hx = '$hx'; $done = 1; } } You could also do an if / else if / else if / ... / else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] add function to solr extension
Hi, Can i have some help to create a class to add a function to solr extension ? I want to make a function which send me back the number of results of a query... (field NumFound of array return of SolrResponse::getResponse()) Here is the link to the extension : http://www.php.net/manual/fr/book.solr.php I didn't know how to do. Create or extend a class ? Which one ? How ? Can i have some help to get started please. Thanks by advance. Regards Thomas
Re: [PHP] How to upload via SFTP with allow_url_open disabled?
You might have better luck with phpseclib's Net_SFTP, which uses fsockopen: http://phpseclib.sourceforge.net/documentation/net.html#net_sftp_example Good luck! On Thu, Jul 29, 2010 at 12:13 PM, Scott Teresi scot...@teresi.us wrote: I'm attempting to send a file over SFTP in PHP, but all the examples I find online do something like this: $stream = @fopen(ssh2.sftp://xx;, 'w'); @fwrite($stream, $data_to_send) This requires allow_url_fopen to be enabled on the server, to get a stream for the remote file. I maintain the server but would like to keep allow_url_fopen disabled. If I do that, how can I send a file over SFTP? Thanks for any help people can provide!! Scott Teresi -- 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] How to achieve mixed authentication/anonymous access
Hi, i have a problem with Authentification. I currently doubt that it is possible at all. Perhaps someone can enlighten me how to achive the goal or confirm that it is not reachable. The scenario is to achieve a mixed authentication/anonymous access similar as described for Subversion (see http://svnbook.red-bean.com/nightly/de/svn-book.html#svn.serverconfig.httpd.authz.perdir.ex-3). Therefore the .htaccess looks something like that: Order allow,deny Allow from all AuthType Basic AuthName Realm AuthUserFile /some/path/.htusers require valid-user Satisfy any Additionally a PHP script is inside the same folder. When you now browse to the URL of the PHP script, you can access it without any credentials requested. At some point the PHP script decides that authentification is required (e.g. when passing a param like ?access-secret=1). Therefore it sends the following two headers: WWW-Authenticate: Basic realm=Realm HTTP/1.x 401 Unauthorized Then you are asked to insert your username/password for the basic auth. But now comes the problem: How can the PHP script determine if you have provided valid credentials? The server variables PHP_AUTH_USER and PHP_AUTH_PW are populated independent of the result of the authentification defined in Apache. I do explicitly not want to check the credentials in PHP - think of the many different auth-methods which could be configured with Apache. Nor can the anonymous and authenticated parts be split in separate folders. Is this goal even possible or is the only way to not allow anonymous access (but for replacement a dummy user like guest with no password) or implement the auth in PHP? Any feedback is highly appreciated. Thank you Dirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Howto send command over ssh using sockets
phpseclib does SSH without PECL extension and only with fsockopen: http://phpseclib.sourceforge.net/ On Sun Apr 4 21:09:54 2010, Hans_Åhlin wrote: Instead of ssh, you could use telnet to connect to the Cisco router (which incidentally runs on port 23, but is likely to be disabled on the cisco router, unless you have a pre-SSH capable IOS running on it (like my old cisco crap :( ) ), because i strongly doubt you have written or are willing to write your own encryption libraries for this project, you might also want to read IETF RFC 854 [http://tools.ietf.org/html/rfc854] about the telnet protocol, as you are writing your own client, and not using a pre-made one, judging from your script. Or if you do not like the idea of sending clear-text passwords to the router, you might want to learn about proc_open() (or popen()) and use the native ssh utility that most likely is present on the server, taking great care to READ THE MANUAL for the ssh command, because you most likely do _not_ want it to spit out ANSI-escapes to you script. Kind regards from Johan Lidström Örnsköldsvik, Sweden irc://irc.freenode.net/Dr_Kao frozendude+php...@gmail.com P.S. currently borrowing a friends account. 2010/4/5 Radek Krejča radek.kre...@starnet.cz: Hello, I am trying send command to remote host over ssh with sockets. But I need to set up username/password. I am trying to modify this script (from www.php.net - function fsockopen), but I dont know, where set username/password because I got this message: Bad protocol version identification 'password' from ip Library ssh2 is not currentu userfull for me, because I am not admin of server. Thank you Radek ?php / * Author: Richard Lajaunie * Mail : richard.lajau...@cote-azur.cci.fr * * subject : this script retreive all mac-addresses on all ports * of a Cisco 3548 Switch by a telnet connection * * base on the script by: xbensemhoun at t-systems dot fr on the same page **/ if ( array_key_exists(1, $argv) ){ $cfgServer = $argv[1]; }else{ echo ex: 'php test.php 10.0.0.0' \n; exit; } $cfgPort = 23; //port, 22 if SSH $cfgTimeOut = 10; $usenet = fsockopen($cfgServer, $cfgPort, $errno, $errstr), $cfgTimeOut); if(!$usenet){ echo Connexion failed\n; exit(); }else{ echo Connected\n; fputs ($usenet, password\r\n); fputs ($usenet, en\r\n); fputs ($usenet, password\r\n); fputs ($usenet, sh mac-address-table\r\n); fputs ($usenet, ); // this space bar is this for long output // this skip non essential text $j = 0; while ($j16){ fgets($usenet, 128); $j++; } stream_set_timeout($usenet, 2); // set the timeout for the fgets $j = 0; while (!feof($usenet)){ $ret = fgets($usenet, 128); $ret = str_replace(\r, '', $ret); $ret = str_replace(\n, , $ret); if (ereg(FastEthernet, $ret)){ echo $ret \n; } if (ereg('--More--', $ret) ){ fputs ($usenet, ); // for following page } $info = stream_get_meta_data($usenet); if ($info['timed_out']) { $j++; } if ($j 2){ fputs ($usenet, lo); break; } } } echo End.\r\n; ? -- 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] mysqli_connect problem
I am a newbie. The following script works but the second one (below) loads the variables from an html form and then fails. The connection commands in the second sript are identical as the first script was copied from the first. Only the variable values have been changed. #!/usr/bin/php # ?php $first_name = 'Harry'; $last_name = 'Potter'; $when_it_happened = 'This morning'; $how_long = '6 ms'; $how_many = 'millions'; $alien_description = 'angels'; $what_they_did = 'danced on the head of a pin'; $fang_spotted = 'No'; $other = 'There were bright flashing lights'; $email = 'ha...@aol.com'; $dbc = mysqli_connect('localhost', 'tom', 'fog^horn9', 'aliendatabase') or die('Error connecting to MySQL server'); $query = INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, . how_many, alien_description, what_they_did, fang_spotted, other, email) . VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', . '$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email'); $result = mysqli_query($dbc,$query) or die('Error Querying the database'); mysqli_close($dbc); ? The following program successfully loads the variables from an html form and then fails. ?php $first_name = $_POST['firstname']; $last_name = $_POST['lastname']; $when_it_happened = $_POST['whenithappened']; $how_long =$_POST['howlong']; $how_many = $_POST['howmany']; $alien_description = $_POST['aliendescription']; $what_they_did = $_POST['whattheydid']; $fang_spotted = $_POST['fangspotted']; $other = $_POST['other']; $email = $_POST['email']; echo 'got to here, '; echo $last_name\n\n; $dbc = mysqli_connect('localhost', 'tom', 'fog^horn9', 'aliendatabase') or die('Error connecting to MySQL server'); $query = INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, . how_many, alien_description, what_they_did, fang_spotted, other, email) . VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', . '$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email'); $result = mysqli_query($dbc,$query) or die('Error Querying the database'); mysqli_close($dbc); ? The echo entries confirm the variables a have been loaded from an html form. The program just stops after the echo entries - no die message, nothing in /var/log/mysql.err or mysql.log. My system is Debian Squeeze, 64 bit. I have php5 version 5.3.1-5, php5-mysql version 5.3.1-5, mysql-client-5 and mysql-server-5 version 5.1.41-3 installed. Any suggestions? Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysqli_connect problem
I am a newbie. The following script works but the second one (below) loads the variables from an html form and then fails. The connection command in the second sript are identical as the first script was copied from the first. Only the variable values have been changed. #!/usr/bin/php # ?php $first_name = 'Harry'; $last_name = 'Potter'; $when_it_happened = 'This morning'; $how_long = '6 ms'; $how_many = 'millions'; $alien_description = 'angels'; $what_they_did = 'danced on the head of a pin'; $fang_spotted = 'No'; $other = 'There were bright flashing lights'; $email = 'ha...@aol.com'; $dbc = mysqli_connect('localhost', 'tom', 'fog^horn9', 'aliendatabase') or die('Error connecting to MySQL server'); $query = INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, . how_many, alien_description, what_they_did, fang_spotted, other, email) . VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', . '$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email'); $result = mysqli_query($dbc,$query) or die('Error Querying the database'); mysqli_close($dbc); ? The following program successfully loads the variables from an html form and then fails. ?php $first_name = $_POST['firstname']; $last_name = $_POST['lastname']; $when_it_happened = $_POST['whenithappened']; $how_long =$_POST['howlong']; $how_many = $_POST['howmany']; $alien_description = $_POST['aliendescription']; $what_they_did = $_POST['whattheydid']; $fang_spotted = $_POST['fangspotted']; $other = $_POST['other']; $email = $_POST['email']; echo 'got to here, '; echo $last_name\n\n; $dbc = mysqli_connect('localhost', 'tom', 'fog^horn9', 'aliendatabase') or die('Error connecting to MySQL server'); $query = INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, . how_many, alien_description, what_they_did, fang_spotted, other, email) . VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', . '$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email'); $result = mysqli_query($dbc,$query) or die('Error Querying the database'); mysqli_close($dbc); ? The echo entries confirm the variables a have been loaded from an html form. The program just stops after the echo entries - no die message, nothing in /var/log/mysql.err or mysql.log. I believe the problem is a permissions problem. I had to make the first script executable so of course I also made the second executable but this did not help. My system is Debian Squeeze, 64 bit. I found I had to install php5-mysql to use the mysqli_connect command. Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling PHP-GTK with PHP-5.3.1 with VC9
Hello, I tried to compile PHP-GTK 2.0.1 with PHP 5.3.1 on Windows. The first errors I was able to fix. The patch file with my fixes you find as an attachment to this mail. But now I get following error and I don't know why. VC9 doesn't find the SG-definition, but SAPI.h is included in php_gtk+.c. So what's going wrong there? ### C:\php-sdk\php53\vc9\x86\php- gtk_buildnmake Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release cl : Command line warning D9036 : use 'EHsc' instead of 'GX' php_gtk+.c c:\php-sdk\php53\vc9\x86\php-5.3.1\zend\zend_execute.h(231) : warning C4018: '' : signed/unsigned mismatch ext\gtk+\php_gtk+.c(82) : warning C4013: 'SG' undefined; assuming extern returning int ext\gtk+\php_gtk+.c(82) : error C2065: 'request_info' : undeclared identifier ext\gtk+\php_gtk+.c(82) : error C2224: left of '.path_translated' must have struct/union type ext\gtk+\php_gtk+.c(83) : error C2065: 'request_info' : undeclared identifier ext\gtk+\php_gtk+.c(83) : error C2224: left of '.path_translated' must have struct/union type ext\gtk+\php_gtk+.c(83) : error C2198: 'g_strdup' : too few arguments for call NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin \cl.EXE' : return code '0x2' Stop. C:\php-sdk\php53\vc9\x86\php-gtk_build ### Do you have a hint what I can do? Thanks and best regards, Thomas -- Mit freundlichen Grüßen, Thomas Worm ** Thomas Worm Handel Dienstleistung Postfach 2207 D-90009 Nürnberg Hausanschrift: Hintere Cramergasse 3 D-90478 Nürnberg ** Telefon: +49 1803 030505000 Telefax: +49 1803 030505050 Allgemeiner Kontakt: i...@thomas-worm.de Buchhaltung: buchhalt...@thomas-worm.de ** Geschäftsführer: Thomas Worm thomas.w...@thomas-worm.de Kontoverbindung: Inhaber: Thomas Worm H. u. D. Kontonummer: 38 56 38 Bankleitzahl: 760 606 18 Kreditinstitut: Volksbank-Raiffeisenbank Nürnberg eG Steuernummer: 240-290-21429 USt-ID: DE250745940 ISBN-Verlagsnummer: 3-86749 ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Compiling PHP-GTK with PHP-5.3.1
Hello, problem is solved. After some fixing of configure.js for MS VS.NET 2008 and fixing confutils.js it works. Thankts to Elizabeth M Smith for the help! My fixes have been postet to the php-gtk-dev mailinglist for beeing published in svn. Best Regards, Thomas -- Mit freundlichen Grüßen, Thomas Worm ** Thomas Worm Handel Dienstleistung Postfach 2207 D-90009 Nürnberg Hausanschrift: Hintere Cramergasse 3 D-90478 Nürnberg ** Telefon: +49 1803 030505000 Telefax: +49 1803 030505050 Allgemeiner Kontakt: i...@thomas-worm.de Buchhaltung: buchhalt...@thomas-worm.de ** Geschäftsführer: Thomas Worm thomas.w...@thomas-worm.de Kontoverbindung: Inhaber: Thomas Worm H. u. D. Kontonummer: 38 56 38 Bankleitzahl: 760 606 18 Kreditinstitut: Volksbank-Raiffeisenbank Nürnberg eG Steuernummer: 240-290-21429 USt-ID: DE250745940 ISBN-Verlagsnummer: 3-86749 **
[PHP] php move_uploaded_file() filesize problem
Hi I have a problem with uploading files that are bigger than the Master Value allow me to, which is 32 MB. I've set the max_upload_filesize and max_post_size in a .htaccess file and the phpinfo() reports the new local value (128 MB) according to the .htaccess, but the script fails silently with no errors every time I try to upload a file greater than 32 MB. Have any of you had the same problem? Thanks! Thomas Gabrielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php move_uploaded_file() filesize problem
Ryan Cavicchioni ryan...@confabulator.net wrote in message news:20090824205810.gc32...@mail.confabulator.net... On Mon, Aug 24, 2009 at 09:54:03PM +0200, Thomas Gabrielsen wrote: Hi I have a problem with uploading files that are bigger than the Master Value allow me to, which is 32 MB. I've set the max_upload_filesize and max_post_size in a .htaccess file and the phpinfo() reports the new local value (128 MB) according to the .htaccess, but the script fails silently with no errors every time I try to upload a file greater than 32 MB. Have any of you had the same problem? I stumbled across this blog post: http://www.gen-x-design.com/archives/uploading-large-files-with-php/ He suggests also looking at the script timeout and the 'max_input_time' ini setting. Regards, --Ryan Cavicchioni Hi Ryan, and thanks for your reply: I've allready set that, but I forgot to mention it in the first post. This is what my .htaccess looks like: php_value upload_max_filesize 64M php_value max_execution_time 800 php_value post_max_size 64M php_value max_input_time 100 php_value memory_limit 120M I'm very sure that it has something to do with the upload_max_filesize because I generated two files, one just a little greater than 32MB, and one just a little bit smaller. The latter file is uploaded fine, but the bigger one is not. Thanks! Thomas Gabrielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's the difference in the following code?
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote: I'm reading Essential PHP Security by Chris Shiflett. on the very beginning, page 5 6, if I got it correct, he said this is not good: $search = isset($_GET['search']) ? $_GET['search'] : ''; and this is good: $search = ''; if (isset($_GET['search'])) { $search = $_GET['search']; } what's the difference? I really can't see? The difference between the examples are still nothing, it do the same. But I never use the short version of if, because when I look after some month in some projects I have a better overview when there is a long if , its much easier to extend. sorry for my bad english greetz Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Associative array issues with loading values after initialization
The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return $country_list; } I know how to write this in perl but for some reason, when I write it in PHP it doesn't work. In perl it would be (roughly): function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); my %country_list; while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return \%country_list; } What am I doing wrong here? Thanks in advance, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative array issues with loading values after initialization
I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { $k = key($nex); if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print(option value='.$k.'.$select..$nex[$k]./option); } } Thomas Bolioli wrote: The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return $country_list; } I know how to write this in perl but for some reason, when I write it in PHP it doesn't work. In perl it would be (roughly): function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); my %country_list; while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return \%country_list; } What am I doing wrong here? Thanks in advance, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative array issues with loading values after initialization
This came straight out of the docs and it doesn't even work. It throws PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on the line 'one' = 1, What is wrong with how I am trying to do this loop?? Thanks, Tom $a = array( 'one' = 1, 'two' = 2, 'three' = 3, 'seventeen' = 17 ); foreach ($a as $k = $v) { echo \$a[$k] = $v.\n; } Thomas Bolioli wrote: I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { $k = key($nex); if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print(option value='.$k.'.$select..$nex[$k]./option); } } Thomas Bolioli wrote: The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return $country_list; } I know how to write this in perl but for some reason, when I write it in PHP it doesn't work. In perl it would be (roughly): function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); my %country_list; while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return \%country_list; } What am I doing wrong here? Thanks in advance, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative array issues with loading values after initialization
I hav ebeen able to track down that this is the part not working. It throws a parse error: PHP Parse error: syntax error, unexpected T_VARIABLE on the line where the foreach loop starts. function dropbox_from_list($list, $selected_index){ foreach ($list as $k = $v) { if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print option value='$k'$select$v/option; } } b wrote: Thomas Bolioli wrote: I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { I'd use foreach() here and avoid next(). At least, reset the array first. And maybe pass the array by reference: function dropbox_from_list($list, $selected_index) { foreach($list as $k = $v) { $k = key($nex); if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print(option value='.$k.'.$select..$nex[$k]./option); } } Maybe you should also add what it is that's not working. Thomas Bolioli wrote: The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); Are you starting with an empty key value so that you'll have an empty option in your select list? Why not just print an empty one? while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return $country_list; } Start with the obvious: what does $country_list contain when it's returned? Again, some details about what you're getting would go a long way toward getting some advice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative array issues with loading values after initialization
I found the issue. The whitespace in between $list as $k = $V was all not truly whitespace. Gotta love BBEdit... Thomas Bolioli wrote: I hav ebeen able to track down that this is the part not working. It throws a parse error: PHP Parse error: syntax error, unexpected T_VARIABLE on the line where the foreach loop starts. function dropbox_from_list($list, $selected_index){ foreach ($list as $k = $v) { if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print option value='$k'$select$v/option; } } b wrote: Thomas Bolioli wrote: I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { I'd use foreach() here and avoid next(). At least, reset the array first. And maybe pass the array by reference: function dropbox_from_list($list, $selected_index) { foreach($list as $k = $v) { $k = key($nex); if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; } else { $select = ''; } print(option value='.$k.'.$select..$nex[$k]./option); } } Maybe you should also add what it is that's not working. Thomas Bolioli wrote: The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); Are you starting with an empty key value so that you'll have an empty option in your select list? Why not just print an empty one? while ($row = mysql_fetch_assoc($result)){ $country_list[$row['pk_countryID']] = $row['country_name']; } return $country_list; } Start with the obvious: what does $country_list contain when it's returned? Again, some details about what you're getting would go a long way toward getting some advice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] quick php for perl coder question
I want to return an array from a function. I have this: return array($found, $username, $email, $nickname); as my code. I have a bug in the code and I am not sure where yet. Should the above statement with this: array($vars); $vars = function($type, $abc, $xyz); $found = $vars[0]; $username = $vars[1]; $email = $vars[2]; $nickname = $vars[3]; on the other end work? If so, then the bug is somewhere else. Thanks in advance, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why my mails are not received by Hotmail users?
Hi. I created this script to send emails: --- $mailFromEmail = [EMAIL PROTECTED]; $mailFromName = MYDOMAIN; $mailTo = [EMAIL PROTECTED]; $mailHeaders = From: $mailFromName $mailFromEmail\n . Content-Type: text/plain; . charset=UTF-8; format=flowed\n . MIME-Version: 1.0\n . Content-Transfer-Encoding: 8bit\n; $mailSubject = Hi! . date('h:i:s A'); $mailMessage = Hi,\n\nHow are you?\n . date('l dS \of F Y h:i:s A') . \n; mail($mailTo, $mailSubject, $mailMessage, $mailHeaders); --- In addition, I've set an SPF policy on my DNS server, and I added this line to my 'php.ini' file: --- sendmail_path = /usr/sbin/sendmail -t -i -f [EMAIL PROTECTED] --- (I've got 'safe_mode=on' on my server) So Gmail users receive the messages correctly: --- Delivered-To: [EMAIL PROTECTED] Received: by 10.100.121.18 with SMTP id t18cs105671anc; Fri, 4 Apr 2008 06:58:23 -0700 (PDT) Received: by 10.114.56.1 with SMTP id e1mr1995521waa.52.1207317502773; Fri, 04 Apr 2008 06:58:22 -0700 (PDT) Return-Path: [EMAIL PROTECTED] Received: from v2v-3.net ([52.147.120.136]) by mx.google.com with ESMTP id q18si8099195pog.7.2008.04.04.06.58.22; Fri, 04 Apr 2008 06:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of [EMAIL PROTECTED] designates 52.147.120.136 as permitted sender) client-ip=52.147.120.136; Authentication-Results: mx.google.com; spf=pass (google.com: domain of [EMAIL PROTECTED] designates 52.147.120.136 as permitted sender) [EMAIL PROTECTED] Received: (qmail 21817 invoked by uid 48); 4 Apr 2008 06:58:22 -0700 --- Note the Return-Path line and the Received-SPF line. If I change '[EMAIL PROTECTED]' with '[EMAIL PROTECTED]', they don't receive my emails. What am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to log APC Cache errors?
Hi. I'm using APC 3.0.17 with PHP 5.2.5 on Linux. I'm suffering some white page of death APC errors, and I'm trying to investigate the reasons. But: 1) I don't find any APC support forum. 2) I don't find any APC error log. I'm browsing Apache error log (with PHP 'E_ALL' activate) and don't see any line about it. Any suggestion is welcome. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_mail()
How do I structure the $additionalHeaders string so that it is useful? Is there a specific order the headers have to be in? How do I delimit multiple headers? I want the from and mailed-by fields to be modified by this variable when mailed from the PHP script. I am getting the server name of my host instead of the domain name of my site. Minor thing because most people probably dont look at headers, but I want it to be professional looking in case someone does. Thank you, Thomas Le Choose a job you love, and you'll never have to work a day in your life. - Confucius
[PHP] question regarding type hinting parameters of php functions
Hi, i have tried a current snapshot of PHP 5.3 and have a question regarding type hinting. For example when using the function array_slice(array $array, int $offset, int $length) with a non-integer length parameter, what is the desired behavior? When calling array_slice($array, 0, (float)2); the resulting array is EMPTY. When using the right type array_slice($array, 0, (int)2); it works as expected. Shouldn't there be a notice/warning than just a wrong return value? In my case there is neither a warning nor does it work as expected. (perhaps it do something wrong?) Of course i can use int's, but in my opinion either a warning should be given or the function should gracefully handle the wrong typed parameter. Thank you for any feedback, Dirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Configure mail to use Gmail smtp
ZF rocks ;) debussy007 schrieb: I succeeded using the Zend Framework. debussy007 wrote: Hello, I have read here : http://www.geekzone.co.nz/tonyhughes/599 that I can use Gmail as a free SMTP server. Is it possible to change the php.ini in order to have this running ? I need to specify in some way the following : Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication) Use Authentication: Yes Use STARTTLS: Yes (some clients call this SSL) Port: 465 or 587 Account Name: your Gmail username (including '@gmail.com') Email Address: your original isp address ([EMAIL PROTECTED]) Password: your Gmail password I can see in the php.ini that I can specify the port, smtp server and the from. But how do I do for he other parameters ? Thank you !! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: split in to multiple pages (I think)
Why don't post an example of your news file too? Joker7 schrieb: Hi, I'm using the code below to display news articles-which works great apart from. I can control the number of articles,but I would like to add a link to the bottom of the page to the un-displayed articles ( nexted 5 articles and so on) any pointers would be most welcome as most know my PHP skills are not the best :). Cheers Chris ? $max_latest = 5; $filename = articlesum.php; #- open article if(file_exists($filename)){ $fh = fopen($filename, r); $old_news = fread($fh, filesize($filename)); fclose($fh); } #- get article $articles = explode(!--ARTICLE--, $old_news); $i=0; foreach ( $articles as $article ){ if(count($articles)$i){ if($max_latest = $i++){ print $article; } } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Graphs
[EMAIL PROTECTED] wrote: I would like to add some graphing capability to an app of mine. What package is recommended? I don't need anything too fancy, just some bar graphs, pie charts, etc. Thank you in advance. I use the PEAR module Image_Graph Officially it's still in alpha, but works like a charm. -- Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mime with php4.4.4 does not work anymore
I have been serving my community with Invision Power Board (IPB) v1.3.1 Final. Things are working well with PHP 4.3.8 and Apache 1.3.29. Yesterday I just upgraded to PHP4.4.4 and I have problems with Excel and Word attachments with IPB. Whenever I click on those attachments, I will get all sorts of funny characters all over my browser screen. However, image attachments are correctly displayed inline. I added --with-mime-magic=/usr/local/apache/conf/magic to configure but nothing change. If I were to roll back to PHP 4.3.8, IPB works perfectly. What have I missed. Please advise. TIA. -- roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing an object using session var
Try that: --script1--- ?php include(TestClass.php); session_start(); $obj = new TestClass(); $obj-setName('MyName'); $obj-display();// outputs 'MyName' $str_object = serialize($obj); //-- You need to serialize an object ( see php.net manual ) in order to make an object working via session $_SESSION['obj'] = $str_object: //-- save serialized string in the session,note: Use $_SESSION instead of session_register(); header(Location: http://localhost/~lr/webProj/photoAlbum2/sessionReceiveObj.php;); // re-direct to script2 ---script 2 ?php include(TestClass.php); session_start(); $newObj = unserialize($_SESSION['obj']); //-- convert string back into object $newObj-display(); // MyName on Wednesday 29 November 2006 16:18, list arama wrote: Why am I not able to access the obj name field in script 2? thanks in advance, --script1--- ?php include(TestClass.php); session_start(); session_register('obj'); ob_start(); $obj = new TestClass(); $obj-setName('MyName'); $obj-display();// outputs 'MyName' header(Location: http://localhost/~lr/webProj/photoAlbum2/sessionReceiveObj.php;); // re-direct to script2 ob_flush(); ? ---script 2 ?php include(TestClass.php); session_start(); $newObj = $HTTP_SESSION_VARS['obj']; $newObj-display(); // no output, meaning no data? $newObj-setName('Michael'); $newObj-display(); // outputs 'Michael' using obj methods ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do you do the ? mark after a filename
Thank you for that, it was a big help. Can I also call function that way? Again thank you for your help. Thomas Tom Chubb wrote: On 12/11/06, Thomas Bonham [EMAIL PROTECTED] wrote: Hi All, I keep seeing the ? mark after many file names index.php?id=234. So what I would like to know is how do you make them. I have heard that they can make a programs life sampler when doing somethings with a database. Thank you, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You can retrieve variables from the URL using the GET method. This is similar to using the POST method with data from forms. A typical url with something like www.domain.com/index.php?id=35format=html would provide the page with two variables, id format. It's the equivalent of putting the following in the page. $id = 35; $format = 'html'; This is popular with simple CMS/Templating systems where you use a standard page and the id variable loads the relevant article text. Hope that helps. Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do you do the ? mark after a filename
Hi All, I keep seeing the ? mark after many file names index.php?id=234. So what I would like to know is how do you make them. I have heard that they can make a programs life sampler when doing somethings with a database. Thank you, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Read Through PHP Files
You cannnot just open those files. That things that you see are not 'rubish' or whatever. Those files are in a binary format. You need to understand the .doc format and the .pdf format. You can get this infromation by using google and search for 'Binary word format' and so on. Then you have to parse the file with the HEX codes etc and so on. This is pretty complex and I'm sure you dont wanna do that :D. Maybe there is allready a libary also in PHP that does it for you. But in generaly, you have to think in a different way. If you dont unserstand what binary formats are and how to parse them, its pretty hard and its better if you dont try it :) on Friday 10 November 2006 11:55, Kevin wrote: Hi, I am using the function fopen to open a word document, loading the contents into a variable and then using a substr_count to count the number of times a certain string is found, this is allowing me to search through the file and say how many times the word appears, I can even use str_replace to highlight certain words. However Microsoft word seems to put a lot of rubbish in the header and footer, I am wondering is it possible to filter this rubbish out to get the exact document. I also tried using fopen to open a PDF file, but as PDF is handled differently it came up completely different with no words at all, just full of rubbish. Is there anyway I can get this information using a simple fopen? I am basically trying to create a search engine which can read within files similar to google. The only problem I would have after I have done all this is actually weighting the search results, however I would probably have to create the results first and then finally go through the results to try to weight them. Does anyone else have any experience in this or could help me out with any of the problems I am having? Thanks Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Frameworks
I personal prefer Frameworks. I tried some of them. But in my opinion, those are not made to create application fater, no. With Frameworks, you can maintaine your application better. You have a global place where everything can be changed on one file. Ofc, its also possible that this improves the Application development, which is ofc good, but the main thing is you can maintain it easy. A good example is your comment regarding loading lot of staff into memory.. In my company we also have a bigger framework, with a lot of includes and so on. But it is still damn, fast. If you include now 100 or 1000 files, you allmost dont see it as PHP proccesses them very fast. And if you have to change for example now a filename that is required by other fiels, that a Framework is your friend as you dont have to go to each file and change the filename, no, you only have to change it on one place, result in: easy maintaining. Ofc, this is only one example, but there exists other things too where a framework can improve your work and save you time in changing things . on Thursday 02 November 2006 16:37, [EMAIL PROTECTED] wrote: I know this subject has been covered in the past, but my question is why use them? I'm hoping to not create a religious war... I see that frameworks would probably help you develop some things faster, but most of the time they don't do the things the way I would want them to work. If I did use one, it almost seems like I would use it to get through something until I had time to do things the way I wanted/needed to do them. There's a lot of talk about frameworks lately, and especially the Zend Framework, so I'd like to look into what it's all about. I think I might be missing out the framework issue, so I'd like to hear other people's opinions. I do like the mail, pdf, and a few other parts of the Zend Framework. I also like that it's more like a set of tools than a monolithic beast that would take a lot of memory just to load up into your application. Your thoughts? Thanks, Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comment management
Maybe you mean a bug tracker? checkout http://flyspray.rocks.cc/ on Monday 23 October 2006 17:12, tedd wrote: Hi: I posted this on the web-design list, but didn't receive any leads. I want to continue what I've been doing, which is to offer various code solutions for people via my web site, but I would like to add a feature where people can comment on the code. Such as if they found it useful, or found an error, or general comment -- you know, you've seen this before. Also, I want the code to be secure and allow me to edit users comments. Does anyone have any recommendations or can point me to a simple content manager for such a purpose? I know I could write it myself, but I would rather not reinvent the wheel, if possible. Thanks. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] add functions to a class
This will not work. $this-bla(); This is a PHP Syntax and tries to get the Class method, PHP dont look for a variable name at all! It seams me strange also, that you try this, you should create the method for the class itself, or extend it. But this shoul work: class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; return call_user_func($this-writeFoo, 'arg1, arg2'); } } on Wednesday 20 September 2006 15:07, Kelsang Tsenle wrote: Hi all, I tried to add functions to a class, but it doesn't seem to work. Here's an example: ? class Test { function Test () { $funcName = 'writeFoo'; $$funcName = create_function ('', 'echo (foo.\n);'); $writeFoo (); $writeFoo2 = $writeFoo; $writeFoo2 (); $this-writeFoo = $writeFoo; $this-writeFoo (); } } $test = new Test (); ? This outputs: foo. foo. PHP Fatal error: Call to undefined method Test::writeFoo() in /test.php on line 11 Both $writeFoo () and $writeFoo2 () are executed, so it principally works, but once used in the object, it doesn't work anymore. Any idea how that is supposed to work? Gratefully, Tsenle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
PHP is written in C. If you want to write a extension, you have to writte it in C. I dont think its possible, except you tranbslate the PHP C code to Pascal and start from scratch there :) So- no, not possible on Thursday 21 September 2006 11:22, Bronislav Klucka wrote: Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Extension in free pascal - OT
Well, depends. If you wanna create build-in extensions ( as far as i know those works a bit faster ), you have to use C. In case you wanna make a dynamic extension it can work 'Theoretically'. But you need to load the PHP shared headers also so the compiler understand the DLLs as far as i know, and you dont have them in Pascal. It is also a really BAD idea to writte it in a different language then it is orginaly written in my opinion. on Thursday 21 September 2006 11:32, Bronislav Klucka wrote: Extensions are basically dll/so files. There is generally no problem to take dll file written in C and use it in program written in FPS and vice versa (it's all about rewriting function's headers). So my question is, if this is possible generally, can it be done for PHP? Thomas Munz wrote: PHP is written in C. If you want to write a extension, you have to writte it in C. I dont think its possible, except you tranbslate the PHP C code to Pascal and start from scratch there :) So- no, not possible on Thursday 21 September 2006 11:22, Bronislav Klucka wrote: Of course I want to write extension for PHP :) but I want to write it in FPC... Brona Thomas Munz wrote: Pascal?? this is a PHP list, you are on the wrong place! on Thursday 21 September 2006 11:12, Bronislav Klucka wrote: Hi, does anybody know how to write extension in FreePascal? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class question
Use 'extends' syntax for sub classes class A { var $some_var; var $class_B; function A(){ $this-class_B = new B(); $this-some_var=2; } } class B extends A { var $class_C; function B(){ $this-A(); $this-class_C = new C(); // $this-some_var= some_var_from_class_A; -- $this-some_var contains the value allready } } class C extends A { function C(){ $this-A(); // $this-some_var= some_var_from_class_A; -- $this-some_var contains the value allready } } on Friday 15 September 2006 11:01, Roger Helgesen wrote: I have 3 classes, CLASS A,B and C class A { var $some_var; var $class_B; function A(){ $this-class_B = new B(); $this-some_var=2; } } class B { var $some_var; var $class_C; function B(){ $this-class_C = new C(); $this-some_var= some_var_from_class_A; } } class C { var $some_var; function C(){ $this-some_var= some_var_from_class_A; } } How can class B and C get the value of $some_var_class_A without using $this-class_B = new B($some_var); roger helgesen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
maybe you should resubscribe :) on Tuesday 22 August 2006 16:31, [EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks, David [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] AES client side
What do you need exaclty? Do you wanna encrypt the datas, that will be transfered to the client Or do you wanna encrypt the source code, that will be displayed on the client? For reason 1 you can use SSL connection to encrypt the transfered datas. For reason 2: forget it. The Browser needs to know the source code, so he can display it :) Except you use JS to tell the browser the correct HTML code :) But as you said JS is slow, so not possible as far as i know :) on Monday 31 July 2006 13:59, Andrew Senyshyn wrote: Hi all, I need to implement AES decryption algorythm on client side (in browser). I tried javascript but it is too slow. Does anybody have others ideas how to decrypt data transfered by from server to client in browser? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP function to add objectClass
I have an already working LDAP server. One of my user's ldif looks like: ... ... sn: Roger Thomas givenName: Roger Thomas objectClass: top objectClass: person objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: qmailUser objectClass: hordePerson o: example.com ou: people ... ... I have around 9000 user records. And I would like to add a new objectClass (radiusprofile) to each user record like: ... ... objectClass: qmailUser objectClass: hordePerson objectClass: radiusprofile ... ... Question: which LDAP function do I need to use to achive this ? --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What is you IP ?
I want to filter IP addresses. I noticed that my script catches IP addresses that looks like they came from the internal LAN, ie 192.x.x.x and 10.x.x.x My script catched those IPs by $_SERVER['REMOTE_ADDR']. Am I not being able to catch IPs from transparent proxies that a user's ISP might use? Would $_SERVER['HTTP_X_FORWARDED_FOR'] be better ? Reasons ? Please advise. -- Roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stop process when user close window browser
By default, PHP will also stop execution when the browser is closed. See: http://de.php.net/manual/en/features.connection-handling.php on Friday 30 June 2006 09:06, weetat wrote: Hi all, I am using PHP 4.3.2 and MYSQL database. I think this question has been asked many times, however not solutions. The problem is that I have a php script which connect to db and update data to db which took length of time to be completed. However sometimes user accidentally close the window browser or kill the window browser. The php which a server script language will not know that the window browser has been closed , so the program execution is keep running . This will choke the memory in the server and thus choke the web page. So ,are there ways to stop program from executing when user close the browser window. Thanks - weetat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bug in php 5.1.4
There must be a special code in your script that causes it like this bug: http://bugs.php.net/bug.php?id=37926 on Friday 30 June 2006 11:39, Alain Roger wrote: Hi, I' ve discovered a bug in PHP 5.1.4. This version of PHP create a new session everytime you refresh the same php page or that you switch from 1 page to another page. I downgraded it to PHP 5.1.2 and it works correctly. It could be interesting to fix this bug. if you want moredetail, contact me. Alain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stop process when user close window browser
What kind of connection you use ( persistent ?) and which PHP and MySQL version? Normaly, PHP exit after the browser gets closed, but sended SQL to MySQL get finished executed. on Friday 30 June 2006 11:54, weetat wrote: Hi Thomas, Yes. I read the manual regarding the connection handling. However ,in my php program , the execution did not stop , because i have logger which log sql statement INSERT statement when inserted data to database is ok . When i close the browser , the sql execution still running, statement is logged. Any idea how to stop it ? Because it cause my web page to be slow. Thanks. Thomas Munz wrote: By default, PHP will also stop execution when the browser is closed. See: http://de.php.net/manual/en/features.connection-handling.php on Friday 30 June 2006 09:06, weetat wrote: Hi all, I am using PHP 4.3.2 and MYSQL database. I think this question has been asked many times, however not solutions. The problem is that I have a php script which connect to db and update data to db which took length of time to be completed. However sometimes user accidentally close the window browser or kill the window browser. The php which a server script language will not know that the window browser has been closed , so the program execution is keep running . This will choke the memory in the server and thus choke the web page. So ,are there ways to stop program from executing when user close the browser window. Thanks - weetat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Control GET data ( not php related )
Thats not PHP related. Its normal HTML/JS 2 Ways: 1) Make form to use 1 field:; form method=GET action=file.php input name=name type=text / /form 2) Use JS to manipulate the target url dynamicaly on Wednesday 07 June 2006 21:20, Steffen Mazanek wrote: Hello, I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? Thank you for helping a php newbie. Steffen Mazanek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, eclipse, dbg, oh my
Eclipse - 3.1.2 Linux - 2.6.16-1.2111_FC4 PHP - 5.1.2, I built it. DBG - 2.13.1, I tried the binary, then built it on my own Apache - 2.0.55, I built it. PHP is running as a module but I've configured Eclipse to use the standard PHP5 executable instead. I wonder if anyone has gotten Eclipse debugging of PHP to work under Linux and if so what was used - dbg or some other tool? I've read pretty much of the available documentation, and tried most of the contained suggestions but nothing has worked yet. A lot of the suggestions are also geared towards windows users running Eclipse on that platform. Everything seems to be firing up but I get no presentation in the debugger screen except for the console which indicates my program ran and all the breakpoints were ignored. Any ideas? Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Metric Conversion Library
Before I write my own, is there a php math library that will perform US to metric conversions and the like? Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ajax (xmlHttpRequest) and session_start() problem.
session_write_close(); Ex: session_start(); $asdf = $_SESSION; //-- get all datas session_write_close(); //-- close session on Wednesday 17 May 2006 16:36, Mathijs wrote: Robert Cummings wrote: On Wed, 2006-05-17 at 10:11, Mathijs wrote: I Have an very strange problem. When i execute an very simple Ajax request to an PHP script wich just print one line and i put an sleep(20) infront of it, it works perfectly when i refresh the page. BUT.. When i put session_start() at the top, i can't refresh the page anymore. It won't refresh untill the server responed. When i remove the session_start(), i can refresh anytime i want. Is this a know problem? Does someone knows an solution? PHP sessions use locking to avoid race conditions. So you sleep for 20 seconds keeps the lock for just as long, this has the effect of blocking all other scripts for the same session. To avoid this, grab the session data you need, and close the session as fast as possible. Additionally, it's probably a very bad idea to keep the web server waiting for 20 seconds for no good reason. Why not have your javascript do the waiting? Cheers, Rob. This whas just an test example i talked about. irl, i have an script that does an search on the server for texts in files. This search goes through an ajax request. The page that is requested uses $_SESSION. Therefore i need session_start(). This search can take a while, and if i want to refresh the page, because i want to have an other search or whatever, i just can't. This because, for some reason, when session_start() gets called, it locks the refreshing capeabileties of the browser. Also, you say to close the session, mabye a stupid question, but how If you need more info, just ask :).. Thx for the quick reply :). Kind Regards, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions - session_start()
put ob_start(); on the first line of your page on Monday 15 May 2006 15:53, Jonas Rosling wrote: Hi, I've been building a site with PHP 5 on my develop machine. I've been woring alot with session handling. For example I've been using session_start() now and then depending on where the user/vistor are or are doing. But now I've moved the site to a host server with PHP 4.3.8 and now I keep getting error messages all the time where I use session_start(). The error message looks like this: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/index.php:9) in /var/www/html/index.php on line 82 But I found out that if I put the tag in the absolute top of every page it seems to work. But then I need to do alot of changes on all the pages. Does anyone know if there's any workaround for this? Thanks in advance // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP Authentication
Hello, I'm trying to do a ldap authentication page. I can get there username and I don't know how to get the password from ldap. It didn't show up in the the search for the command line. So how do I get the password of the users? Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Book/Site for internernal PHP5 Core Developing
hi list! Does someone know a good Book/website for Develop own C-Extensions for PHP5? http://us2.php.net/manual/en/zend.php This site are just basic things, but i wanna do more things. Someone may help me? thx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with Oracle
Only the main US Server. Try: http://us2.php.net/ on Wednesday 19 April 2006 15:13, Brad Bonkoski wrote: Assuming the PHP web page is available, anyone else having problems connecting to php.net? -B Jay Blanchard wrote: [snip] is there a ready script that handle entering user name and password for authentication by extracting the Data from Oracle10g DB without showing the URL in the address bar...I am thinking of using a popup window Spec. [/snip] Please RTFM at http://www.php.net/oracle and have a look at oci_connect -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - PHP Webhost Dedicated Server
www.ixwebhosting.com www.hostexcellence.com on Tuesday 11 April 2006 15:18, Suhas wrote: Hello, Any suggestions for Dedicated PHP Webhost. The current service provider is ok but Customer service is unsatisfactory. Very bad experience. Thanks for your help in advance, SP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] open / check SSL activation
if request come from port 443, SSL = Active you can get the port from $_SERVER[SERVER_PORT] on Wednesday 05 April 2006 15:12, Alain Roger wrote: Hi, I would like to ebsure that my user has SSL activated. for that i would like to do something like that : 1. after lo-in button click, application will check if SSL is already activated. 1.a if no, php code should activate SSL 1.b if yes, php code should control login and password entered. 2. how from PHP code, can i test if SSL is activated and if need activate SSL ? thanks a lot, Alain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] redirect using php
Function that will work also, when JS is not activate and headers are allready send :) : ?php function chrome_redirect($url) { // redirect the page if (headers_sent()) { // perform JS redirect echo 'script type=text/javascript language=javascript !-- document.location.href=\'' . $url . '\'; // -- /script noscript meta http-equiv=refresh content=0; url='$url' / /noscript'; } else { // no headers sent... much nicer header redirect header('location: ' . $url); die(); } } ? on Wednesday 05 April 2006 15:30, Dan Parry wrote: If it helps here's the code I use to redirect ?php function chrome_redirect($url) { // redirect the page if (headers_sent()) { // perform JS redirect echo 'script type=text/javascript language=javascript!-- document.location.href=\'' . $url . '\'; // --/script'; } else { // no headers sent... much nicer header redirect header('location: ' . $url); die(); } } ? HTH Dan - Dan Parry Senior Developer Virtua Webtech Ltd http://www.virtuawebtech.co.uk -Original Message- From: Mark Kelly [mailto:[EMAIL PROTECTED] Sent: 05 April 2006 14:19 To: php-general@lists.php.net Subject: Re: [PHP] redirect using php On Wednesday 05 April 2006 13:55, Chris Shiflett wrote: Mark Kelly wrote: You can also use something like: echo meta http-equiv=\Refresh\ content=\0;url=$from_page\; There's no need to use a meta tag to mimic HTTP headers. PHP provides the header() function. I have been using that method when I got part-way through some processing that produces output, and hit something that requires a redirect. As I understand it headers are no use to me here. I'm very much a beginner, so if this is the wrong way to do this, I'd appreciate pointers. Thanks for the reply, either way. Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 1.1454 (20060321) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] require_once hell
Forgot the ?php tag in the second class? on Wednesday 29 March 2006 12:48, Adrian Bruce wrote: Hi this may be a stupid moment but i cant find an help on google so.i am including two classes in my code using the require_once(path to file) method. this works fine for the first class but when including the second it simply outputs the contents on to the page. I feel I must be missing something stupid so i have not included any example code, any general ideas? Thanks in advance Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date addition problem
Cause 9th month have 30 days but 10th month have 31 days. You don't check the amount of day there... :) on Wednesday 29 March 2006 14:51, Adrian Bruce wrote: Hi I am having an unusual problem when trying to calculate dates in advance from a start date. the code below shows a loop where by on each run an increasing number of weeks is added to the start date, this works as expected up untill the 8th time where for some reason it produces 01-11-05 instead of 02-11-05. I am at a loss as to why this would happen when it works perfectly for all the other dates. where am i going wrong? [snip] ?php echoh1 date test/h1; $start = 05-09-07; $start = explode('-',$start); $startmk = mktime(0,0,0,$start[1],$start[2],$start[0]); $startdate = date('d-m-y',$startmk); for($i=0;$i10;$i++){ $nextdate = date('d-m-y',$startmk + ($i*604800)); echoh1$i: $startdate -- -- --$nextdate/h1; } ? OUTPUT: 0: 07-09-05 -- -- --07-09-05 1: 07-09-05 -- -- --14-09-05 2: 07-09-05 -- -- --21-09-05 3: 07-09-05 -- -- --28-09-05 4: 07-09-05 -- -- --05-10-05 5: 07-09-05 -- -- --12-10-05 6: 07-09-05 -- -- --19-10-05 7: 07-09-05 -- -- --26-10-05 8: 07-09-05 -- -- --01-11-05 9: 07-09-05 -- -- --08-11-05 [/snip] Thanks a lot Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] object oriented syntax in php
echo $ping_result[_raw_data][5]; Hi there, I do have problems with object oriented syntax as this is not familar to me. There is following output: object(net_ping_result)(11) { [_icmp_sequence]= array(1) { [61.117):]= string(1) 7 } [_target_ip]= string(9) y2.php.ne [_bytes_per_request]= string(2) 64 [_bytes_total]= int(192) [_ttl]= string(6) _seq=2 [_raw_data]= array(7) { [0]= string(72) PING php.net (66.163.161.117) from 192.168.1.114 : 56(84) bytes of data. [1]= string(72) 64 bytes from y2.php.net (66.163.161.117): icmp_seq=1 ttl=47 time=211 ms [2]= string(72) 64 bytes from y2.php.net (66.163.161.117): icmp_seq=2 ttl=47 time=206 ms [3]= string(0) [4]= string(31) --- php.net ping statistics --- [5]= string(55) 2 packets transmitted, 2 received, 0% loss, time 1008ms [6]= string(55) rtt min/avg/max/mdev = 206.299/209.139/211.979/2.840 ms } [_sysname]= string(5) linux [_round_trip]= array(3) { [min]= string(7) 209.139 [avg]= string(7) 211.979 [max]= string(5) 2.840 } [_transmitted]= string(1) 2 [_received]= string(1) 2 [_loss]= int(0) } Now I would like to retrieve my needed info out of it. How do I do this? (sounds a bit silly this question, sorry :-) I tried: $ping_result = $ping-ping('php.net'); echo $ping_result[net_ping_result][_raw_data][5]; But this and other tries did not work. My goal is to find out wheter a specified site is reachable. Can anybody give me a hint on this one? Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] call a php script in a php script
I personaly use proc_open() to run PHP Scripts. on Tuesday 28 March 2006 12:14, nicolas figaro wrote: Hi, I'd like to run a php script in another php script. (the first is lauched from the command line). Is there a way to do it better than system (/path/to/php script_included.php options). ? the goal is to run several scripts with several options. the result of the included script should be a returning code with a message. (but it hasn't been fixed yet). Thanks a lot. Nicolas Figaro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Links
I'm trying to find out how make following happen Example: http://www.example.com/test.php?id=20 What makes this happen and how do I make it. Thanks Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fwd: Re: WG: Bitte weiterleiten
-- Weitergeleitete Nachricht -- Subject: Fwd: Re: WG: Bitte weiterleiten Date: Freitag, 24. März 2006 15:29 From: Thomas Munz [EMAIL PROTECTED] To: [EMAIL PROTECTED] -- Weitergeleitete Nachricht -- Subject: Re: WG: Bitte weiterleiten Date: Freitag, 24. März 2006 15:27 From: Thomas Munz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Am Freitag, 24. März 2006 14:09 schrieben Sie: _ Von: Peter Seyerl [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 24. März 2006 08:50 An: [EMAIL PROTECTED] Betreff: WG: Bitte weiterleiten -Ursprüngliche Nachricht- Von: patrikk [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 24. März 2006 08:39 An: Weber Stefan; Schatzi; Peda; Mani; Ludwig Buchinger; Kleiss; Florian Lettner; Fabiii; Atzmüller Manuel; Astrid; Aisti Betreff: WG: Bitte weiterleiten -Ursprüngliche Nachricht- Von: Peter Seyerl [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 24. März 2006 08:33 An: [EMAIL PROTECTED] Betreff: WG: Bitte weiterleiten -Ursprüngliche Nachricht- Von: Rainer Königseder [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 24. März 2006 08:03 An: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Princess of Asia; [EMAIL PROTECTED]; Petra Punzenberger; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Armin Holenia; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Fw: Bitte weiterleiten - Original Message - From: KÖNIGSECKER Matthias mailto:[EMAIL PROTECTED] To: KÖNIGSECKER Matthias mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 8:08 PM Subject: WG: Bitte weiterleiten _ Von: Joachim Scherb [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 23. März 2006 15:51 An: Susanne Oberhuber; Elke Krist; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Johannes Leitner; Ralf Kemetmüller; Harald Herber; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Mandi-Sonja Freudenthaler-Affenzeller; [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: WG: Bitte weiterleiten Mit freundlichen Grüßen Joachim Scherb Pappas Automobilvertriebs GmbH Ein Unternehmen der Pappas Gruppe 4030 Linz, Mayrhoferstrasse 36, Austria T: +43-732-3849-119, F: +43-732-3849-118 [EMAIL PROTECTED] - Weitergeleitet von Joachim Scherb/LNZ/Pappas am 23.03.2006 15:48 - Fölser Michael [EMAIL PROTECTED] 23.03.2006 14:40 An Haiderer Günter [EMAIL PROTECTED], Knoll Klaus [EMAIL PROTECTED], [EMAIL PROTECTED], Joachim Scherb [EMAIL PROTECTED], [EMAIL PROTECTED], michaela gahleitner [EMAIL PROTECTED], Claudia Fölser [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Kopie Thema WG: WG: Bitte weiterleiten _ Von: Thomas Fölser [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 23. März 2006 14:41 An: Markus Maier; Alois Aufreiter; Fölser Michael; Claudia Fölser; Gabriele Alberndorfer; Seiberl Andreas (RCA); Markus Fölser Betreff: WG: WG: Bitte weiterleiten - Nachricht von Gerald HAYBOECK [EMAIL PROTECTED] auf Thu, 23 Mar 2006 14:11:08 +0100 - An: [EMAIL PROTECTED],Thomas Fölser [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED], g [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] m x.at,[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED], g [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] w est.at,[EMAIL PROTECTED],[EMAIL PROTECTED], h [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],klemens . [EMAIL PROTECTED],[EMAIL PROTECTED] Thema: WG: Bitte weiterleiten - Weitergeleitet von Gerald HAYBOECK/34277/RBGO/AT am 23.03.2006 14:10 - Erlinger Reinhold [EMAIL PROTECTED] An: Vondra Christopher [EMAIL PROTECTED], xperts.com [EMAIL PROTECTED
Re: [PHP] Fwd: Re: WG: Bitte weiterleiten
Sorry! Was mistakly commited, should go to the list in my address book but not here! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Looking for PHP SSO-engine
Are there are PHP projects that focuses on Single Signon/Signoff like Pubcookie, CAS, Cosign etc? Please advise. TIA. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DB calls vs Session solution
Hi there, Quick question on performance: I have got some expensive sql queries (doing lots of LEFT JOINS) that result in anything between 10 to 1 results. I need to do paging on those. So far I have used a LIMIT solution which will not do anymore because you don't get the whole total. Now, the idea is to store the results (or the sql query string?) in the session to avoid too many db calls (on paging). The question now is: is the serializing/unserializing more expensive than another db call? Thanks, T SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HN CAPTCHA at http://www.phpclasses.org
I am currently testing HN CAPTCHA and noticed that the range of alphabets that were produced ranges from A..F only. My PHP skill is quite limited to change that to A..Z so if ppl here have any experience with that class, appreciate your thoughts. TIA. HN CAPTCHA: http://www.phpclasses.org/browse/package/1569.html --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
Quoting J_K9 [EMAIL PROTECTED]: How about sending us the code so that we can have a look? If not we have to register there... Cheers, J_K9 OK. Attached. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- hn_captcha-2004-04-20.tar.gz Description: GNU Zip compressed data -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
Quoting Curt Zirzow [EMAIL PROTECTED]: On Thu, Feb 16, 2006 at 09:44:33AM +0800, Roger Thomas wrote: I am currently testing HN CAPTCHA and noticed that the range of alphabets that were produced ranges from A..F only. My PHP skill is quite limited to change that to A..Z so if ppl here have any experience with that class, appreciate your thoughts. TIA. HN CAPTCHA: http://www.phpclasses.org/browse/package/1569.html I'd say contact the author about this. Curt. I did. Waited for a week. No response. Hence this list :( --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
Quoting Kim Christensen [EMAIL PROTECTED]: To solve your problem, replace the generate_private() function in hn_captcha.class.php - starting at row 756 - with this code: function generate_private($public=) { $letters = 1234567890abcdefghijklmnopqrstuvwxyz; $maxsize = strlen($letters)-1; for($i=0;$i6;$i++){ $rstring .= $letters{mt_rand(0, $maxsize)}; } return $rstring; } This should yield a 6 char random string containing digits 0-9 and letters a-z. Good luck! -- Kim Christensen [EMAIL PROTECTED] Thank you Kim. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Where is Zend
I have had difficulty going to zend.com to download Zend Optimizer for php-4.4.2 since last week. Anybody that have a copy of Zend Optimizer, I would appreciate if you could provide me with a link to your server that I can download a copy. TIA. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where is Zend
Quoting Chris [EMAIL PROTECTED]: Roger Thomas wrote: I have had difficulty going to zend.com to download Zend Optimizer for php-4.4.2 since last week. Have you contacted zend and told them you were having a problem ? I'm sure they have an easy to fill in contact form on their site. I can't even access the site. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml to array
Brian V Bonini wrote: On Fri, 2006-02-03 at 16:23, Richard Lynch wrote: I've got my money on the XML spec REQUIRING an alphabetic start to tagnames, and subsequent characters can be alphanumeric... In other words, it doesn't work because 0 is not a valid XML tag. Yeah, that was my instinct too... Just could not find anything to confirm it after a quick browse through the spec. Though can you find anything in the spec via a quick browse.. ;-) However, after a closer look I still can't find (at least in plain English) anything that says this is NOT OK. Though the parser does return '[xml_error] = not well-formed (invalid token)'. Good stuff -Brian Just a quick shot it the dark... http://www.w3.org/TR/REC-xml/#NT-Name Go up about a half page to this: [Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string xml, or with any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification From quick read maybe if you wrap the numbers in quotes that might work? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Build - test.php not working
Richard Lynch wrote: On Mon, January 30, 2006 8:08 pm, Tod Thomas wrote: I just built phpV5.1.2 with the same options I used to build php4: ./configure --prefix=/opt/php5 --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql --disable-cgi --with-zlib After make install I had libphp5.so in the ./apache/modules directory as expected. I commented out my LoadModule directive for php4 and uncommented out the directive for php5. I copied php.ini-dist to /opt/php5/lib/php.ini and restarted apache. I expected the test.php page that displays the date, time and the output of phpinfo() to work. Instead it just prints out all of the text, never interpreting the code. When I switch it back to php4 everything works fine. Neither the access or error logs display any problems. ldd of libphp5.so shows everthing as resolved. The apache user owns that lib as well as liphp4.so so no problems there. httpd -t says everthing is syntactically correct. I've really changed nothing other than the library and its name in httpd.conf. What else could I be doing wrong? Is there something I can try to debug and get it to tell me what's up? I think your add-handler would only work for PHP as CGI... #LoadModule php4_modulemodules/libphp4.so LoadModule php5_modulemodules/libphp5.so AddHandler php-script .php These are the only php directives I have in my httpd.conf. The only change I've made is to comment out the php4 and add the php5 directive. The AddHandler never changed. I also had not compiled php4 with cgi capabilities, the same as I did with php5 above. I've heard from a trusted source that they had a lot of problems with php5, including mysql 4* not working with it and ended up reverting back the php4* series. I'm considering that now but I thought that since 5 has been out for a while; and since its oop capabilities have been improved, I would like to stick with it. I'll continue to look into it... Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Build - test.php not working - Solved
Tod Thomas wrote: I just built phpV5.1.2 with the same options I used to build php4: ./configure --prefix=/opt/php5 --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql --disable-cgi --with-zlib After make install I had libphp5.so in the ./apache/modules directory as expected. I commented out my LoadModule directive for php4 and uncommented out the directive for php5. I copied php.ini-dist to /opt/php5/lib/php.ini and restarted apache. I expected the test.php page that displays the date, time and the output of phpinfo() to work. Instead it just prints out all of the text, never interpreting the code. When I switch it back to php4 everything works fine. Neither the access or error logs display any problems. ldd of libphp5.so shows everthing as resolved. The apache user owns that lib as well as liphp4.so so no problems there. httpd -t says everthing is syntactically correct. I've really changed nothing other than the library and its name in httpd.conf. What else could I be doing wrong? Is there something I can try to debug and get it to tell me what's up? Thanks. LoadModule php4_modulemodules/libphp4.so - for php4 LoadModule php5_modulemodules/libphp5.so - for php5 . . . AddHandler php-script php- for php4 AddHandler php5-script php - for php5 grrr Thanks for everyone's comments. Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Build - test.php not working
Richard Correia wrote: can you try httpd -v, which all dynamic modules are listed? Sorry I took so long. -v just displays the version. This provides what you asked for I think: /httpd -e debug [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module access_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module actions_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module alias_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module asis_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module auth_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module autoindex_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module cgi_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module dir_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module env_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module imap_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module include_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module log_config_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module mime_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module negotiation_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module setenvif_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module userdir_module [Tue Jan 31 18:11:38 2006] [debug] mod_so.c(248): loaded module php5_module So its loading. I wonder if its something in my php.ini? I'm going to look. Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5 Backwards Compatability
Is their a list of portability problems to be aware of when switching from v4 to v5? Maybe a table that compares the two? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Build - test.php not working
I just built phpV5.1.2 with the same options I used to build php4: ./configure --prefix=/opt/php5 --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql --disable-cgi --with-zlib After make install I had libphp5.so in the ./apache/modules directory as expected. I commented out my LoadModule directive for php4 and uncommented out the directive for php5. I copied php.ini-dist to /opt/php5/lib/php.ini and restarted apache. I expected the test.php page that displays the date, time and the output of phpinfo() to work. Instead it just prints out all of the text, never interpreting the code. When I switch it back to php4 everything works fine. Neither the access or error logs display any problems. ldd of libphp5.so shows everthing as resolved. The apache user owns that lib as well as liphp4.so so no problems there. httpd -t says everthing is syntactically correct. I've really changed nothing other than the library and its name in httpd.conf. What else could I be doing wrong? Is there something I can try to debug and get it to tell me what's up? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Build - test.php not working
Richard Correia wrote: I think your webserver is not treating .php as script file. AddType application/x-httpd-php .php http://www.weberdev.com/Manuals/PHP/install.windows.apache2.html The above instructions are for windows, but you will get the idea. Thanks, Rich I thought about doing that but I already had an AddHandler directive that took care of php. I expect if that was the problem it would have presented itself when I first installed php4. But I tried it and got the same result. Thanks - Tod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP / Apache + Error 500
Hi there! I am sitting with something of a mystery and was wondering if there is someone out that might have dealt with this before: I have developed a site that runs well and fine on my machine (XP/Apache2/PHP5/MySQL5). I am using PEAR::HTML_Template_Flexy as well as Cache_Lite. The site has been put up on the live server and works (mostly) fine there too, with the exception of Internal Server errors 500, ever so often. It's pretty random and can happen to any of the scripts (they all run through a single index.php script that instantiates objects that then spit out the resulting html). I had a look at the Apache log file I got from the SP ... no clue. All I know is that they use Apache 1.x/PHP5/Linux/MySQL(v4?). They say that it is not their server but my scripts, however, if that was the case I would get these errors on my machine too. Also, the randomness of this also indicates that it can't really be my php scripts, otherwise it would happen all the time. Does anybody have any suggestion as to how I can solve this issue? I know this is pretty vague information, but it's all I have (hence the confusion). Thanks, Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP / Apache + Error 500
Hi Jochem, PHP5.0.4, on both systems. I suspect that either of the PEAE modules cause some server id10t error (if indeed the issue is on my side). Thomas -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: 25 January 2006 03:00 PM To: Thomas Cc: php-general@lists.php.net Subject: Re: [PHP] PHP / Apache + Error 500 Thomas wrote: Hi there! I am sitting with something of a mystery and was wondering if there is someone out that might have dealt with this before: I have developed a site that runs well and fine on my machine (XP/Apache2/PHP5/MySQL5). I am using PEAR::HTML_Template_Flexy as well as php5.WHAT? Cache_Lite. it's not completely impossible that HTML_Template_Flexy or Cache_Lite run on either php5.1 and above OR on php5.0.4 and below but not both. The site has been put up on the live server and works (mostly) fine there too, with the exception of Internal Server errors 500, ever so often. It's pretty random and can happen to any of the scripts (they all run through a single index.php script that instantiates objects that then spit out the resulting html). I had a look at the Apache log file I got from the SP ... no clue. All I know is that they use Apache 1.x/PHP5/Linux/MySQL(v4?). php5.WHAT? I would suggest getting both systems to run the same version of the software packages you mention. it might cut out a few unknowns. They say that it is not their server but my scripts, however, if that was the case I would get these errors on my machine too. Also, the randomness of this also indicates that it can't really be my php scripts, otherwise it would happen all the time. Does anybody have any suggestion as to how I can solve this issue? I know this is pretty vague information, but it's all I have (hence the confusion). Thanks, Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Announcement: PHP-Qt
Hi, The second release of PHP-Qt is now available. PHP-Qt provides an object-oriented interface to the Qt4 Framework and allows to write Qt applications in the PHP language. PHP-Qt is alpha software and still in a prototype stage, but the first 6 tutorials from Qt documentation are working. I have ported these tutorials to PHP-Qt, and they are available in the tarball. For more information, visit http://php-qt.berlios.de/ . -- Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] help me plz
Hey Suresh, You could use AJAX to populate your dropwdown boxes without reloading your browser. I used something like that in a project just now. Essentially, you will call a php script that would select your second box's data according to the value of the first. You can also do this with javascript (if you do not need 'fresh' data) Thomas -Original Message- From: Robert Graham [mailto:[EMAIL PROTECTED] Sent: 19 January 2006 09:34 AM To: suresh kumar Cc: php-general@lists.php.net Subject: Re: [PHP] help me plz suresh kumar wrote: hi, i am using 2 combo box one for country another one for city.when i select country name from combo box their corresponding city names has to be changed in their corresponding combo box.i dont know how 2 implement this.pz give me some idea.its urgent. A.suresh Send instant messages to your online friends http://in.messenger.yahoo.com Hi Suresh Have a look at QuickForm ( PEAR Module), and make use of the HierSelect option. Have a look at the following page for more info: http://www.thelinuxconsultancy.co.uk/quickform.php Regards Robert -- 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] Email Form
Hello All, I don't remember how to do email with php. I have all of it done, except for I can't get it to show the senders email address. All I get it from [EMAIL PROTECTED] If some one has a example that they can post that would be great. Thank You Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Migration from MySQL to MS-SQL Server
Hi Behzad, It's not as easy as simply replacing the names. I went through a cycle like that myself. It is right to check your sql statements first (because 10 to 10 they will differ at some point). Be also mindful that with mssql you don't have an _insert_id() function, you would have create that first yourself, making a separate db call. Another option is to use odbc_ instead of mssql. That way you are somewhat independent of your db server (but it is more of a mission to convert). Greatest pain I had was the connection to SQL Servers. We switched to odb_ functions for that reason (but then again, we might have been stupid :-)_ If you are rewriting the project, why don't you implement a DB abstract layer, like PEAR:DB or adodb_lite? Will take you a while but will make your code look so much better. Cheers Thomas -Original Message- From: AmirBehzad Eslami [mailto:[EMAIL PROTECTED] Sent: 09 December 2005 12:56 PM To: php-general@lists.php.net Subject: [PHP] Migration from MySQL to MS-SQL Server Hi List, I want to re-implement a PHP-driven package named ATutor (http://atutor.ca) to work with MS-SQL Server. Currently, it works with MySQL. Unfortunately, authors of ATutor have not defined a class for database connectivity. In other words, they call each mysql functions directly in their code. It seems that I must change every line of code to make ATutor work with MS-SQL Server. 1) Is it suffice to replace every mysql_FUNCTION with mssql__FUNCTION in the code? I realized that most of MSSQL functions are very similar to MySQL functions, but their prefixes are different. (I should kindly thank the PHP Development Team for this) 2) I have not worked with MS-SQL Server before. Is there anything else which I should keep in mind? Thank you in advance, Behzad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] template systems
Hi, Templating systems are really a matter of taste. You have a few options, depending also on the paradigm you want to use (Model2, MVC ... maybe read up on that as that is good general knowledge). Also, please check the archives as this question has already been discussed at length ;-) Anyway, I will give my 5c worth, when I say that I have gotten to like HTML_Template_Flexy (a pear package) quite a lot. This paradigm forces you to do almost all of your logic stuff on the php side, whilst nicely separating html and php code (you can really end up with some pretty straight forward html pages, with a little Flexy code - cool things is also that you can use Flexy code inline (as in p flexy:if=/p) makes for neat code!) Another plus for Flexy is that it is not bloated like Smarty. Fair enough, Smarty is pretty cool, but it just gives you too many ropes to hang yourself with. Not sure how easy integration with Quickform is ... should not be a problem as most things happen on the code side anyway. Hope that helps. -Original Message- From: Eternity Records Webmaster [mailto:[EMAIL PROTECTED] Sent: 05 December 2005 11:00 AM To: php-general@lists.php.net Subject: [PHP] template systems Hi... I was wondering if there are any template systems out there that are fairly easy to use (that don't require hours and hours reading books) and that are fairly good as well? I need one also that works with pear packages since I use html_quickform a lot. I considered checking out smarty but wasnt for sure if that one would be the best. -- 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] Send postcard link
On server-1 I have my photogallery working. On another box, server-2, I have my postcard script also working great. Users can send postcards using ready inhouse designs or upload their own (max 100K). Both have been serving our community for the past 2 years or so. Current requirement: When I browsed my photogallery, I would like to have a button that says 'Send this picture as postcard'. Behind the scenes, how do I send that picture to server-2 postcard script? Please advise. -- Roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] serializing result sets or what?
Hi, Having spent a little time on Google (and reading unrelated articles ...) I would like post my question here again (as advice on the list is always very valuable indeed!): Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then caching it (with Cache_Lite - maybe there will be a future inclusion of such a caching scheme into the php core or pecl?). I was not sure about performance though (no time for benchmarking this). The issue is that as this system grows we get 2 - 3 db calls on the server (which is too much in my opinion), but will serializing be cheaper or simply the lesser of two evils? Thanks already (as top posting is a sin) for your replies ... T SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] serializing result sets, or what?
Hi, Having spent a little time on Google (and reading unrelated articles ...) I would like post my question here again (as advice on the list is always very valuable indeed!): Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then caching it (with Cache_Lite - maybe there will be a future inclusion of such a caching scheme into the php core or pecl?). I was not sure about performance though (no time for benchmarking this). The issue is that as this system grows we get 2 - 3 db calls on the server (which is too much in my opinion), but will serializing be cheaper or simply the lesser of two evils? Thanks already (as top posting is a sin) for your replies ... T SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] serializing result sets or what?
Thanks, that looks good. But what do I do if OS is WinDoze? The install of the pecl only gives a .so *feeling sorry not everything runs on xp* ... I will take the time to benchmark the serializing vs db calls ... is there a good benchmark tool out there (without having to use microtime inside the scripts)? Thanks T -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: 28 September 2005 11:41 AM To: php-general@lists.php.net Subject: Re: [PHP] serializing result sets or what? Thomas wrote: Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then caching it (with Cache_Lite - maybe there will be a future inclusion of such a caching scheme into the php core or pecl?). I was not sure about performance though (no time for benchmarking this). The issue is that as this system grows we get 2 - 3 db calls on the server (which is too much in my opinion), but will serializing be cheaper or simply the lesser of two evils? A very similar question was asked recently on this list. You might like to consider caching whatever you create from those result sets rather than the result sets themselves, but APC [1] is worth looking at as I believe it can cache (some?) PHP vars without serialisation, using apc_store() and apc_fetch(). The only way to know whether such a scheme would help in your specific situation is to benchmark. Go on, it won't take long! [1] http://php.net/apc -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- 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] Web Service Php - Currency Conversion
I have used nusoap and a xmethods service. You can get the ziped files here: http://www.thomash.co.za/uploads/forex/forex.nusoap.zip Hope that helps BTW: also had issues with the PEAR package. T -Original Message- From: Sylvain Gourvil [mailto:[EMAIL PROTECTED] Sent: 28 September 2005 12:57 PM To: php-general@lists.php.net Subject: Re: [PHP] Web Service Php - Currency Conversion Jasper Bryant-Greene wrote: Sylvain Gourvil wrote: I am looking of a webservice whiwh could permit to convert euro price in dollar and uk pounds on my php website ! http://pear.php.net/package/Services_ExchangeRates Thanks for that but there is a bug in installation. It seems to be great. If someone has something else, I'll be pleased Have a good day ! -- 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] __FILE__ and __LINE__ of calling scripts?
Hi, I want to find out if it is possible to get the file name and the line number of a calling script (__FILE__, __LINE_) from a calling class automatically. Let me explain: I have a db class which gets called in other classes. Now, when an sql error occurs I would like to find out which file and on which line it was. E.g.: [snip] class DB { function doQuery( $inq ) { ... if( !this_result ) { $this-drawError(**want the __FILE_ and __LINE__ of the calling script here** ..); ... } } } class Caller { function sql_doQuery() { $SQL-doQuery('SELECT me FROM WHERE id=0'); } } [/snip] The drawError function outputs the error report to the browser and halts the script (developer debug). Currently I get the __FILE__ and __LINE__ of the DB class, i.e. where the query error happened (as in doQuery()). Instead I would like to get something like caller.fileName, caller.lineNumber (pseudo code). Is that at all possible without having to pass the file name and the line number into the query function manually? Thanks Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] __FILE__ and __LINE__ of calling scripts?
Hi, I know I should not top post, but here it goes anyway: just wanted to say thanks and let others know that it is SOLVED. Cool thing this function! Gotta love PHP (thank heavens I don't need to use jsp right now ...) T -Original Message- From: Mikey [mailto:[EMAIL PROTECTED] Sent: 27 September 2005 03:20 PM To: php-general@lists.php.net Subject: Re: [PHP] __FILE__ and __LINE__ of calling scripts? Thomas wrote: Hi, I want to find out if it is possible to get the file name and the line number of a calling script (__FILE__, __LINE_) from a calling class automatically. Let me explain: I have a db class which gets called in other classes. Now, when an sql error occurs I would like to find out which file and on which line it was. E.g.: [snip] class DB { function doQuery( $inq ) { ... if( !this_result ) { $this-drawError(**want the __FILE_ and __LINE__ of thecalling script here** ..); ... } } } class Caller { function sql_doQuery() { $SQL-doQuery('SELECT me FROM WHERE id=0'); } } [/snip] The drawError function outputs the error report to the browser and halts the script (developer debug). Currently I get the __FILE__ and __LINE__ of the DB class, i.e. where the query error happened (as in doQuery()). Instead I would like to get something like caller.fileName, caller.lineNumber (pseudo code). Is that at all possible without having to pass the file name and the line number into the query function manually? Thanks Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen, 0043 Tel: +27 12 362 3486 Fax: +27 12 362 3493 Mobile: +27 82 442 9228 Email: [EMAIL PROTECTED] Web: www.spiraleye.co.za Have you tried looking up debug_backtrace() in the manual? HTH, Mikey -- 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