php-general Digest 10 Sep 2007 06:35:51 -0000 Issue 5010
php-general Digest 10 Sep 2007 06:35:51 - Issue 5010 Topics (messages 261876 through 261891): Re: Buxa Coding Guidelines 261876 by: Per Jessen 261877 by: brian 261878 by: Jim Lucas 261879 by: brian 261891 by: Per Jessen Re: Can't execute PHP script 261880 by: Randy Patterson accessing one object's attribute from another 261881 by: Larry Brown 261882 by: Robert Degen 261884 by: Chris 261885 by: Larry Brown Re: Php script for mail in a xhtml page 261883 by: Chris Re: 403 Forbiden 261886 by: Jesús de Diego Alarcón 261887 by: Chris 261889 by: Jesús de Diego Alarcón display_errors = stderr Questions 261888 by: imacat Help with php and this part of the code...? 261890 by: dekemcaffee Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- brian wrote: Per Jessen wrote: magoo wrote: In their oppinion stuff like the short PHP init ? or inline echo ?= $var ? is forbidden. Do you people code that strict? Yep. If you're using XHTML you have no other option. If you're parsing XHTML that is choking on any instances of % then you've got a problem with your script. I'm not parsing it, apache does that. An XHTML document will start with: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head /Per Jessen, Zürich ---End Message--- ---BeginMessage--- Per Jessen wrote: brian wrote: Per Jessen wrote: magoo wrote: In their oppinion stuff like the short PHP init ? or inline echo ?= $var ? is forbidden. Do you people code that strict? Yep. If you're using XHTML you have no other option. If you're parsing XHTML that is choking on any instances of % then you've got a problem with your script. I'm not parsing it, apache does that. Semantics An XHTML document will start with: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN xhtml11.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head Uh-huh ... but then that's not a PHP script, is it? To be more specific, something on the server that is meant to parse XHTML should not be encountering PHP syntax. If it does, then it is either wrongly attempting to parse a PHP script instead of XHTML, or your PHP script has syntax errors. IOW, if you've got some PHP scripts that *output* XHTML, PHP shouldn't be leaving behind its own opening and closing tags. If it is (as i said earlier) you've got a problem with your script. Or, perhaps what you mean is that the ?xml tag might be interpreted by PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's the case, simply don't leave it bare in the script. Have PHP print it. brian ---End Message--- ---BeginMessage--- brian wrote: Or, perhaps what you mean is that the ?xml tag might be interpreted by PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's the case, simply don't leave it bare in the script. Have PHP print it. brian Or, even better, turn off short_open_tag Then PHP will not try and parse ?xml -- Jim Lucas Perseverance is not a long race; it is many short races one after the other Walter Elliot Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare ---End Message--- ---BeginMessage--- Jim Lucas wrote: brian wrote: Or, perhaps what you mean is that the ?xml tag might be interpreted by PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's the case, simply don't leave it bare in the script. Have PHP print it. brian Or, even better, turn off short_open_tag Then PHP will not try and parse ?xml Well, that's circular logic, no? Per: i obviously did misinterpret you. I thought you meant that SOME_XHTML_PARSER would choke on PHP tags. If so, perhaps my response will make sense to you now. But my point is still valid; one can just print out the ?xml with PHP. Being *one* line--and always in the same place--in every script, i don't see this as a very big deal at all. I do agree that developing with short_open_tags = on is a Bad Idea if the app will not be under one's control. IMO, the fact that the PHP engine barfs on ?xml with short_open_tags on is a bug that ought to have been fixed years ago. A space should be mandatory after the ?. Better yet, PHP should do away with ? ? altogether but allow ?= ?, which is *very* helpful (to those of us who choose to use it). brian ---End Message--- ---BeginMessage--- brian wrote: Jim Lucas wrote: Or, even better, turn off
php-general Digest 10 Sep 2007 18:59:50 -0000 Issue 5011
php-general Digest 10 Sep 2007 18:59:50 - Issue 5011 Topics (messages 261892 through 261909): Re: 403 Forbiden 261892 by: Chris Segfaults with modphp5 (apache) with threads, and fastcgi question 261893 by: Felipe Alcacibar 261894 by: Chris 261907 by: Felipe Alcacibar 261908 by: Nathan Nobbe Public Announcement 261895 by: Sascha Braun - CEO . Braun Networks 261898 by: M. Sokolewicz 261901 by: Wolf 261904 by: Stut 261905 by: Robert Cummings 261909 by: tedd compile image and download 261896 by: RosaM72 How to get the child name from within the parent? 261897 by: Mathijs 261899 by: Robert.Degen.rwth-aachen.de 261900 by: Mathijs Re: Php script for mail in a xhtml page 261902 by: brian Re: html2png 261903 by: Al PHP make test error report question 261906 by: aaron.pelsoft.com Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Jesús de Diego Alarcón wrote: Hello I've noticed the problem is not well described: 1º There are some times the correct XML appears. However, these times, the call in Firebug comes with (403) and highlihted in red color. Does your host have any rate-limiting? Maybe you're hitting the server too much and you're being seen as a denial-of-service attack and being denied access. About permisions, visor directory has 755 also like php. provincias.php has 777 permisions. Try what I suggested - access other files in the same folders. That will tell us whether it's a file specific issue, a folder specific issue or something else. -- Postgresql php tutorials http://www.designmagick.com/ ---End Message--- ---BeginMessage--- Hi, I got serous problems with modphp5 in a apache, both are compiled with treads, apache was worker-mpm and php was interpreter level threads, i got lots of segmentation faults in threads. someone can helps me? At the end of the list, info about configure parameters for apache and php5 I see a alternative, the best is fcgi, but i use lots of php_flag and php_admin_flag, how some way to use it on fcgi?? I got too much problems with this, maybe if i ran a server without threads may works it, but it is no funny. I hope a answer, thanks... Felipe OS: Gentoo Linux Arch: x86_64 Apache info: shrike counter # apache2 -V Server version: Apache/2.2.4 (Unix) Server built: Sep 7 2007 08:57:32 Server's Module Magic Number: 20051115:5 Server loaded: APR 1.2.8, APR-Util 1.2.8 Compiled using: APR 1.2.8, APR-Util 1.2.8 Architecture: 64-bit Server MPM: Worker threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with -D APACHE_MPM_DIR=server/mpm/worker -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT=/usr -D SUEXEC_BIN=/usr/sbin/suexec -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf php configure: Also have a phpinfo on http://www.chileweb.cl/phpinfo.php './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/u sr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '-- with-libdir=lib64' '--enable-maintainer-zts' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp' '--with-gettext' '--with-gmp' '--disable-hash' '--with-kerberos=/usr' '--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql' '--with-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--with-pgsql' '--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc' '--with-xsl' '--disable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--without-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr'
Re: [PHP] Buxa Coding Guidelines
brian wrote: Jim Lucas wrote: Or, even better, turn off short_open_tag Then PHP will not try and parse ?xml Exactly. Per: i obviously did misinterpret you. I thought you meant that SOME_XHTML_PARSER would choke on PHP tags. If so, perhaps my response will make sense to you now. But my point is still valid; one can just print out the ?xml with PHP. Being *one* line--and always in the same place--in every script, i don't see this as a very big deal at all. It's a little backward, isn't it? Certainly in comparison to just turning off short tags, which we agree is the Right Thing(r) to do anyway. I do agree that developing with short_open_tags = on is a Bad Idea if the app will not be under one's control. vtiger was one of those - at least in version 4, IIRC. Serious PITA. Better yet, PHP should do away with ? ? altogether but allow ?= ?, which is *very* helpful (to those of us who choose to use it). I think it's fine for PHP to leave some of these as user options, but the default should be to leave short_open_tag off (and have an otherwise sane set of defaults). /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: 403 Forbiden
Jesús de Diego Alarcón wrote: Hello I've noticed the problem is not well described: 1º There are some times the correct XML appears. However, these times, the call in Firebug comes with (403) and highlihted in red color. Does your host have any rate-limiting? Maybe you're hitting the server too much and you're being seen as a denial-of-service attack and being denied access. About permisions, visor directory has 755 also like php. provincias.php has 777 permisions. Try what I suggested - access other files in the same folders. That will tell us whether it's a file specific issue, a folder specific issue or something else. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Segfaults with modphp5 (apache) with threads, and fastcgi question
Hi, I got serous problems with modphp5 in a apache, both are compiled with treads, apache was worker-mpm and php was interpreter level threads, i got lots of segmentation faults in threads. someone can helps me? At the end of the list, info about configure parameters for apache and php5 I see a alternative, the best is fcgi, but i use lots of php_flag and php_admin_flag, how some way to use it on fcgi?? I got too much problems with this, maybe if i ran a server without threads may works it, but it is no funny. I hope a answer, thanks... Felipe OS: Gentoo Linux Arch: x86_64 Apache info: shrike counter # apache2 -V Server version: Apache/2.2.4 (Unix) Server built: Sep 7 2007 08:57:32 Server's Module Magic Number: 20051115:5 Server loaded: APR 1.2.8, APR-Util 1.2.8 Compiled using: APR 1.2.8, APR-Util 1.2.8 Architecture: 64-bit Server MPM: Worker threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with -D APACHE_MPM_DIR=server/mpm/worker -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT=/usr -D SUEXEC_BIN=/usr/sbin/suexec -D DEFAULT_SCOREBOARD=logs/apache_runtime_status -D DEFAULT_ERRORLOG=logs/error_log -D AP_TYPES_CONFIG_FILE=/etc/apache2/mime.types -D SERVER_CONFIG_FILE=/etc/apache2/httpd.conf php configure: Also have a phpinfo on http://www.chileweb.cl/phpinfo.php './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/u sr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '-- with-libdir=lib64' '--enable-maintainer-zts' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp' '--with-gettext' '--with-gmp' '--disable-hash' '--with-kerberos=/usr' '--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql' '--with-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--with-pgsql' '--without-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc' '--with-xsl' '--disable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--without-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-interbase=/usr' '--with-ldap' '--without-ldap-sasl' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-unixODBC=/usr' '--without-adabas' '--without-birdstep' '--without-dbmaker' '--without-empress' '--without-esoob' '--without-ibm-db2' '--without-iodbc' '--without-sapdb' '--without-solid' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Segfaults with modphp5 (apache) with threads, and fastcgi question
Felipe Alcacibar wrote: Hi, I got serous problems with modphp5 in a apache, both are compiled with treads, apache was worker-mpm and php was interpreter level threads, i got lots of segmentation faults in threads. someone can helps me? Firstly the configure line you sent us is wrong. It's for the cli version, not the cgi version. '--enable-cli' '--disable-cgi' Does it work with a different version of php? Try to cut down the code you're looking at (create a test-case) If really desperate, re-compile php with --enable-debug and create a backtrace (http://bugs.php.net/bugs-generating-backtrace.php) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Public Announcement
The Spectral Authoring System is able to keep round about 300.000 Document Kategories in one Application. 1.4 Million Screentexts are in use, while still providing fast access. The complete Application is Google Standard com- pliant, without use of mod_rewrite, allowing long directory pathes. Its containing the only forum software worldwide which is completely complying to the google stan- dard for websites, without leaving holes in its stucture. As well there is an ajax driven webmail frontend comparable to hotmail or yahoo mail included, which easely can get scaled to keep more than a million e-mail accounts, in a multidomain environment. The Blog Module is following the actual blogging standards, while remaining google compliant as well as its completely fulltext searchable even in an multiblog environment. The shop system is not containing query urls any- more, without use of mod_rewrite. It is the best ecommerce and shopping plattform worldwide. Its written in PHP5. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] compile image and download
Hello List, This will probably be a some what long post for that apologize. I don't really know much about PHP, usually If I want to do something I can Google up an example and make it work for my needs. With this one im totally stumped though. Here is what Im doing and need to do, I have a page where thousands of .png images are loaded into a div dynamically via links, these images all have a drag class applied to them and can be placed into a second div to create one big picture. Once the final image is created in the second div I need the ability to hit a save button which will compile all these random images into one complete picture and prompt the user to download the image to their computer (preferably in .jpg format) People have told me to check out imagecopy, imagecopymerge and imagemagik which I have. I read all the information provided on php.net and the imagemagik site. Probably is I totally dont understand how to accomplish what im trying to do with these functions. If someone could please give me an example of how to do this I would so much appreciate it. Thank you -- View this message in context: http://www.nabble.com/compile-image-and-download-tf4414579.html#a12592516 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get the child name from within the parent?
Hello there, Is there a way to get the child class name from within the parent method? If so, how? Thx in advance. Example: class MyParent { public static function start() { // Do something like this??? return get_child_name(); // returns 'MyChild' in this case } } class MyChild extends MyParent { public static childStart() { // Should return the child class name. echo parent::start(); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Public Announcement
1. Who are you? 2. What is this? 3. Why should I care? 4. Don't spam. Sascha Braun - CEO @ Braun Networks wrote: The Spectral Authoring System is able to keep round about 300.000 Document Kategories in one Application. 1.4 Million Screentexts are in use, while still providing fast access. The complete Application is Google Standard com- pliant, without use of mod_rewrite, allowing long directory pathes. Its containing the only forum software worldwide which is completely complying to the google stan- dard for websites, without leaving holes in its stucture. As well there is an ajax driven webmail frontend comparable to hotmail or yahoo mail included, which easely can get scaled to keep more than a million e-mail accounts, in a multidomain environment. The Blog Module is following the actual blogging standards, while remaining google compliant as well as its completely fulltext searchable even in an multiblog environment. The shop system is not containing query urls any- more, without use of mod_rewrite. It is the best ecommerce and shopping plattform worldwide. Its written in PHP5. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get the child name from within the parent?
- Ursprüngliche Nachricht - Von: Mathijs [EMAIL PROTECTED] Datum: Montag, September 10, 2007 3:19 pm Betreff: [PHP] How to get the child name from within the parent? An: php-general@lists.php.net Hello there, Is there a way to get the child class name from within the parent method? Yes. If so, how? 1) If you abandon static'ness, you can use 'get_class($this)' within parent class' func. 2) Fizzle around with some 'self' as pass over argument. 3) or else. But - I can't recognize any exigence. Could you describe *what* you wanna do so you must use this? Thx in advance. Example: class MyParent { public static function start() { // Do something like this??? return get_child_name(); // returns 'MyChild' in this case I don't know this function. I couldn't even find it at php doc. WHAT is that ? } } class MyChild extends MyParent { public static childStart() { public static function childStart() { // Should return the child class name. echo parent::start(); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So far. Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get the child name from within the parent?
[EMAIL PROTECTED] wrote: - Ursprüngliche Nachricht - Von: Mathijs [EMAIL PROTECTED] Datum: Montag, September 10, 2007 3:19 pm Betreff: [PHP] How to get the child name from within the parent? An: php-general@lists.php.net Hello there, Is there a way to get the child class name from within the parent method? Yes. If so, how? 1) If you abandon static'ness, you can use 'get_class($this)' within parent class' func. 2) Fizzle around with some 'self' as pass over argument. 3) or else. But - I can't recognize any exigence. Could you describe *what* you wanna do so you must use this? I need this because i want to make a default Flow-Control class. Other classes can extend from this flow class, and pass an array with the kind of flow they want. Some of these methods are in the child-class and there for i need its name. But i didn't checked non-static part yet. Going to try this. Thx. Thx in advance. Example: class MyParent { public static function start() { // Do something like this??? return get_child_name(); // returns 'MyChild' in this case I don't know this function. I couldn't even find it at php doc. WHAT is that ? } } class MyChild extends MyParent { public static childStart() { public static function childStart() { Oeps, forgot that. // Should return the child class name. echo parent::start(); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php So far. Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Public Announcement
It's such a good bit of software, the website to learn more about it is completely useless. Gotta love it... M. Sokolewicz [EMAIL PROTECTED] wrote: 1. Who are you? 2. What is this? 3. Why should I care? 4. Don't spam. Sascha Braun - CEO @ Braun Networks wrote: The Spectral Authoring System is able to keep round about 300.000 Document Kategories in one Application. 1.4 Million Screentexts are in use, while still providing fast access. The complete Application is Google Standard com- pliant, without use of mod_rewrite, allowing long directory pathes. Its containing the only forum software worldwide which is completely complying to the google stan- dard for websites, without leaving holes in its stucture. As well there is an ajax driven webmail frontend comparable to hotmail or yahoo mail included, which easely can get scaled to keep more than a million e-mail accounts, in a multidomain environment. The Blog Module is following the actual blogging standards, while remaining google compliant as well as its completely fulltext searchable even in an multiblog environment. The shop system is not containing query urls any- more, without use of mod_rewrite. It is the best ecommerce and shopping plattform worldwide. Its written in PHP5. -- 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] Php script for mail in a xhtml page
Chris wrote: brian wrote: - You can do without the echo by using, eg. ?= $message ? Yet later in another thread you complain about short_tags being an option.. can't have it both ways. Oh, is that so? Let's see what i wrote ... -- snip -- ... Better yet, PHP should do away with ? ? altogether but allow ?= ?, which is *very* helpful (to those of us who choose to use it). -- snip -- Leave it as ?php echo $message; ? it's more portable - it will work on every single php server and you won't have any issues moving your code around. -- snip -- I do agree that developing with short_open_tags = on is a Bad Idea if the app will not be under one's control. -- snip -- But thanks. I know you were really trying. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: html2png
Like I said ... or Imagemagick command line using exec(). It's been a stable release for years. Kevin Waterson wrote: This one time, at band camp, Al [EMAIL PROTECTED] wrote: The Imagick php extension is at RC2 and like all beta ware, should not be considered for a production environment. Imagick PHP extension, easiest, or Imagemagick command line using exec(). Imagick to read a pdf and output it as a jpeg: header('Content-type: image/jpeg'); $obj = new Imagick('x.pdf'); $obj-SetImageFormat('jpeg'); echo $obj; Your want to use montage, resizing and write the result to a file, etc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Public Announcement
Things to do before spamming a public English mailing list... 1) Make sure your email actually says what the product is 2) Make sure you have a relevant subject line 3) Make sure it's in English 4) Run it through a spelling checker, preferably an English one 5) Stop and think whether the people you're spamming are really gonna care! 6) This one is really important. Make sure you include a URL to the product's website. Oh, and make sure that website actually works, especially when it says it's powered by your product! Some additional questions and notes that you may find useful... * What the heck are Kategories? Maybe you mean categories? * What the heck are Screentexts? * As far as I know Google have never published any standards regarding URLs. Do you have a reference? * Claiming that your product is the only one in the whole wide world to do something is very dangerous. Would you bet the farm on it? Because what with the numerous highly litigious patent owners out there you could well be! * blogging standards?? Another reference needed please. * The shop system is not containing query urls anymore, without use of mod_rewrite. What the heck does that mean? You had SQL in your URLs? * It's the best is it? On what do you base that claim? -Stut -- http://stut.net/ Sascha Braun - CEO @ Braun Networks wrote: The Spectral Authoring System is able to keep round about 300.000 Document Kategories in one Application. 1.4 Million Screentexts are in use, while still providing fast access. The complete Application is Google Standard com- pliant, without use of mod_rewrite, allowing long directory pathes. Its containing the only forum software worldwide which is completely complying to the google stan- dard for websites, without leaving holes in its stucture. As well there is an ajax driven webmail frontend comparable to hotmail or yahoo mail included, which easely can get scaled to keep more than a million e-mail accounts, in a multidomain environment. The Blog Module is following the actual blogging standards, while remaining google compliant as well as its completely fulltext searchable even in an multiblog environment. The shop system is not containing query urls any- more, without use of mod_rewrite. It is the best ecommerce and shopping plattform worldwide. Its written in PHP5. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Public Announcement
On Mon, 2007-09-10 at 16:39 +0100, Stut wrote: Things to do before spamming a public English mailing list... 6) This one is really important. Make sure you include a URL to the product's website. Oh, and make sure that website actually works, especially when it says it's powered by your product! I think either the English content version doesn't work, was completely forgotten about, or was never done. The German content is there though. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP make test error report question
Hello, first of all I want to make sure I am emailing the correct location/list. I have recently installed php-5-2-3 and built it from source. First time user and very green. I used: ./configure --prefix=/opt/php-4.4.7 --with-apxs2=/opt/apache/bin/apxs --enable-mbstring ?with-imap=/opt/imaptemp/imap-2006k-src as my configure command. I then completed it with make and make install, and then make test. It passed the test but returned a number of failures as well. I chose to send the report to whomever at PHP at the end of the make test, but I would like to know if there was anything critical in the test summary. Can you confirm where I need to send this request to and obtain some help? Thanks in advance for anybodies help and direction, Aaron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Segfaults with modphp5 (apache) with threads, and fastcgiquestion
Chris escribió: Firstly the configure line you sent us is wrong. It's for the cli version, not the cgi version. '--enable-cli' '--disable-cgi' i am using a apache modphp, and also enabled the cli interface, i am not using cgi yet, i want to use fastcgi, but i made a cuestion before. i am want a take a look for debug-backtrace. Thanks. Felipe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Segfaults with modphp5 (apache) with threads, and fastcgiquestion
you might also want to hop on the #gentoo-php channel on irc.freenode.net -nathan On 9/10/07, Felipe Alcacibar [EMAIL PROTECTED] wrote: Chris escribió: Firstly the configure line you sent us is wrong. It's for the cli version, not the cgi version. '--enable-cli' '--disable-cgi' i am using a apache modphp, and also enabled the cli interface, i am not using cgi yet, i want to use fastcgi, but i made a cuestion before. i am want a take a look for debug-backtrace. Thanks. Felipe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Public Announcement
At 4:39 PM +0100 9/10/07, Stut wrote: Things to do before spamming a public English mailing list... -snip- -Stut -Stut: my opinion Your time is far too valuable to be wasted on this. /my opinion Cheers, 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] Public Announcement
tedd wrote: At 4:39 PM +0100 9/10/07, Stut wrote: Things to do before spamming a public English mailing list... -snip- -Stut -Stut: my opinion Your time is far too valuable to be wasted on this. /my opinion Unless you want to pay me to do something else I'll be happy spending my spare time being sarcastic - it's what I do! ;) -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: 403 Forbiden
Hello all I can call other php files like: http://www.my3dgis.es/visor/php/municipios.php without problem (The response is OK so no Provincia parameter is providen ). Indeed, the php file always work if i simply type : http://www.my3dgis.es/visor/php/provincias.php in a navigator. The problem seems to arise if i use a call from the same domain , so the call is done against the php/provincias.php file. And... i think there is no rate-limiting ... The problem began as soon as i uploaded the application... Thank you anyway Jesús de Diego 2007/9/10, Chris [EMAIL PROTECTED]: Jesús de Diego Alarcón wrote: Hello I've noticed the problem is not well described: 1º There are some times the correct XML appears. However, these times, the call in Firebug comes with (403) and highlihted in red color. Does your host have any rate-limiting? Maybe you're hitting the server too much and you're being seen as a denial-of-service attack and being denied access. About permisions, visor directory has 755 also like php. provincias.php has 777 permisions. Try what I suggested - access other files in the same folders. That will tell us whether it's a file specific issue, a folder specific issue or something else. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP] Public Announcement
hi stut, thank you for your advices. - Screentexts are texts shown as link texts or descriptions in forms and other page elements which remain static in one language area. The screentexts are getting replaced by they' re coresponding translations as the user selects a different language. - The Google standard, of websites describes, that Query URL's like ?param1=XYZparam2=123 or as in $_SERVER['QUERY_STRING'] are not human readable, which makes them not acceptable as valid content links. But as I am pretty familar with search engine optimisation, my system is creating metatags for every page, h1 tags are used for headlines, h2 tags for subheads and so on. If you are a professional in search engine optimisation, you will not find any weakness in my application anymore. Its happending absolutely automatically the authors don't have to do anything, for make it happen. Stopword lists like in my- sql are removing useless keywords and so on. - Yes, my system is the only application framework worldwide with its capabilities. I added a neural networking functionality which makes it possible to autodecide which contents are inte- resting for the viewers on a page. Fx: If a user is allergic, no products containing large amounts of the alergen are shown in the shop anymore. As well it is possi- ble to create psychological profiles from the users of the system during the runtime of the application. I have read a paper from the department of defence, from year 2004. I first read it in the early beginning of this year. I figured out, that my application framework is the perfect psynet application for performing psychological operations over the internet. I guess I developed one of the biggest weapon systems available now a days. - As a blogging standard I would describe websites which contain a linklist to the left or the right of the blogs content as well as a calender and a search field. I guess this makes a blog. - The shop system is widely using ajax for performing fast shopping actions, its possible to use videos or audiofiles as product descip- tion media, as well as soon you change product parameters these me- dias are getting replaced by different color media or size images as what ever you could think of. And as well my system is using XLinks, which means, you add a link to a document, you are able to select the target document from one of the content modules, automatically the headline of the target document is used as link description and as well the link is shown as a nonquery url, like: http://www.domain.com/en/magazin/something-new/while-i-wrote-it-here.html Done without mod_rewrite. I hope I answered all your questions. Best Regards, Sascha Am Montag, den 10.09.2007, 16:39 +0100 schrieb Stut: Things to do before spamming a public English mailing list... 1) Make sure your email actually says what the product is 2) Make sure you have a relevant subject line 3) Make sure it's in English 4) Run it through a spelling checker, preferably an English one 5) Stop and think whether the people you're spamming are really gonna care! 6) This one is really important. Make sure you include a URL to the product's website. Oh, and make sure that website actually works, especially when it says it's powered by your product! Some additional questions and notes that you may find useful... * What the heck are Kategories? Maybe you mean categories? * What the heck are Screentexts? * As far as I know Google have never published any standards regarding URLs. Do you have a reference? * Claiming that your product is the only one in the whole wide world to do something is very dangerous. Would you bet the farm on it? Because what with the numerous highly litigious patent owners out there you could well be! * blogging standards?? Another reference needed please. * The shop system is not containing query urls anymore, without use of mod_rewrite. What the heck does that mean? You had SQL in your URLs? * It's the best is it? On what do you base that claim? -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Buxa Coding Guidelines : This is how we do
Just wanted to see what you think of the strictness of Buxa, according to their PHP guidelines: http://www.buxaprojects.com/en/php_coding_guidelines.htm In their oppinion stuff like the short PHP init ? or inline echo ?= $var ? is forbidden. Do you people code that strict? I like some of their ideas, but I disagree about short tags. I always use ?php ? and ?= ? but never ? ? I like the _idea_ of an organized naming convention, etc, but I think theirs is a bit overkill for example: Buxa_Db Buxa_Db_Table Buxa_Controller Mapping to directories is silly like that. \includes\classes\db.class.php \includes\classes\table.class.php \includes\classes\controller.class.php We do a lot with Ruby here for the backend, and PHP for the front. So we adhere loosely to the Rails/ActiveRecord way of things like: end_user.class.php Which directly corresponds to a SQL table of end_users (note the plural). Within there we have $id, $_stamp, and $created_on which are popular in rails Active Record. We have a base.class.php containing the above, and everything else extends from it. We also are in love with the PHP __call, __set, __get methods to save thousands of lines of redundant (useless) code. We try to stick with lowercase filenames. define's are all capitals, so are class constants. I dislike their use of the _ char for protected things. We use ' and properly... (use ' most of the time as no pre-processing required) Uppercase SQL statements I agree. I've been meaning to write a tool that will go through and fix any lowercase ones, but it's not so trivial ;-p For long SQL, we just carriage return, none of that . appending crap. We always try to LIMIT 1 where possible. We do the multiple line array thing. Makes it easy to read. In both formats they show. We use PHPXRef as our documentor, so we follow those basic @ tags. We don't pass by reference, as there's no need anymore AFAIK. PHP handles all that intelligently. Big fans of the ()?: operator. Only use { } when there are more than one statement to enclose. Our pages tend to be in the KLOC range, so pruning out unnessesary white space/lines helps a lot. Big fan of the switch statement over multiple if/elseif/else We tend to do the first { on the next line, rather than the same line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: 403 Forbiden
On 9/10/07, Jesús de Diego Alarcón [EMAIL PROTECTED] wrote: Daniel Here is the provincias.php code: ?php header('Content-Type: application/xml'); //error_reporting(E_ALL); $request = ' https://ovc.catastro.meh.es/ovcservweb/OVCSWLocalizacionRC/OVCCallejero.asmx/ConsultaProvincia'; $xml = file_get_contents($request); echo $xml; ? However, i'm not calling the PHP from another php but for the ExtJS ComboBox : http://extjs.com/deploy/ext/docs/output/Ext.form.ComboBox.html#properties http://extjs.com/deploy/ext/examples/form/combos.html In my case, you can see the Javascript code at: http://www.my3dgis.es/visor/scripts/catastro.js [snip] Jesus, On line 52 of visor/scripts/catastro.js, try changing the method from post to get. If necessary, make those changes in php/provincias.php. See if that changes anything for you. If it doesn't, what have your web logs told you so far? -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Public Announcement
On 9/10/07, Sascha Braun - CEO @ Braun Networks [EMAIL PROTECTED] wrote: - The Google standard, of websites describes, that Query URL's like ?param1=XYZparam2=123 or as in $_SERVER['QUERY_STRING'] are not human readable, which makes them not acceptable as valid content links. Those are indeed SEO friendly, but it by no means is The Google standard - Yes, my system is the only application framework worldwide with its capabilities. That's a fairly big claim, you've compared other application frameworks? Everything you've been talking about, btw has hinted towards it being a CMS, not a framework. I hope I answered all your questions. I think the biggest question is why post an announcement without linking to that which you are announcing. In addition, seeing a working site (unlike braun-networks.com) using it would probably be a good idea before drumming up interest. Also you mention not using mod_rewrite. If you're using Apache and mod_php, are you using Error Documents? Auto-generating html pages (or yuck - php pages) ? Methodology is worth more to the technical than concepts or bragging rights. Regards, Gavin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] profiling newb
all, i am just getting my feet wet w/ profiling. its nice to see i can invoke a page from the browser then see an analysis in kcachegrind using xdebug to generate the data. however, im curious about 'finding the weak spots in an application'. say for instance i arrive at a new location as a consultant or w/e; point is assume a totally foreign codebase that needs to be optimized. theoretically 'profiling' would be a way to analyze the application and determine where the slow points are, which methods are getting called repeatedly and so forth. then those areas could be analyzed for potential gains. it seems to me though, that since generating a series of cache files is a manual process and the analysis a manual process it would take a long time just to profile an application. so someone familiar with said application could point out the slow spots much more quickly than a person using a profiling tool. is there a tool that can analyze a large number of cache files and give some sort of comprehensive report? it seems very natural to have cache files get generated in a pre-production site for analysis. if they could be sent through something that generated a comprehensive report that would really reduce profiling time rather than having to look through them one at a time. or am i missing something because im new to profiling ? thanks, -nathan
[PHP] upd sockets
Hey, i have got a problem and cannot find answer. I have got an process which sends real time data per udp. i can catch this packets and write to a site with php and sockets. CODE ?php define('LISTEN_IP','0.0.0.0'); define('LISTEN_PORT',52700); define('PACKET_SIZE',1024); include(common.inc); if ( $socket = @stream_socket_server('udp://'.LISTEN_IP.':'.LISTEN_PORT, $errno, $errstr, STREAM_SERVER_BIND) ) { ? html head titlephp-test/title script language=JavaScript function alarma() { alert(ARLAMA: ?php echo getAPaket() ?); } /script /head body h2Welcome to me/h2 plisten to port 52776/p ?php echo 'used socket '.$socket; $packet = ''; $ilauf = 0; while ($ilauf 10) { //$buff = stream_socket_recvfrom($socket, PACKET_SIZE, 0, $remote_ip); $buff = stream_socket_recvfrom($socket, PACKET_SIZE, STREAM_OOB); $packet .= $buff.'brbr'; $ilauf++; echo 'current paketnummer is:'.$ilauf.'br'; echo 'current paket content:'.$buff.'brbr'; } fclose($socket);echo getAPaket(); } EDOC In this example i read ONLY 10 packets BUT i want to read the data continuous AND write the last received packet into a table. Now, i write the data among each other. need a good idea! Ajax? js? i thing, that the biggest prob. is that php is server sided a php cleint sided... Any IDEA??? Please answer here AND write an email to me. Because i ve only an modem ;-( wanscha @ web.de THX dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] profiling newb
Nathan Nobbe wrote: all, i am just getting my feet wet w/ profiling. its nice to see i can invoke a page from the browser then see an analysis in kcachegrind using xdebug to generate the data. however, im curious about 'finding the weak spots in an application'. say for instance i arrive at a new location as a consultant or w/e; point is assume a totally foreign codebase that needs to be optimized. theoretically 'profiling' would be a way to analyze the application and determine where the slow points are, which methods are getting called repeatedly and so forth. then those areas could be analyzed for potential gains. it seems to me though, that since generating a series of cache files is a manual process and the analysis a manual process it would take a long time just to profile an application. so someone familiar with said application could point out the slow spots much more quickly than a person using a profiling tool. is there a tool that can analyze a large number of cache files and give some sort of comprehensive report? it seems very natural to have cache files get generated in a pre-production site for analysis. if they could be sent through something that generated a comprehensive report that would really reduce profiling time rather than having to look through them one at a time. While code optimization/checking is definitely something that needs attention, personally I'd look at the database side of things first. If you're using a database wrapper of some sort, see if there are any logging options (ideally one that logs both the query the time it took to run). Missing indexes or bad queries will slow things down a lot quicker than changing a foreach loop to a while loop. Alternatively make sure your database has logging enabled and look at that instead (hopefully in a limited environment so you don't have 50 people hitting different apps all at the same time). I'm not sure if xdebug can take that sort of stuff into account when it generates the times. After that, definitely look at the code. Write a script to summarize the xdebug output files and generate a report (I'd do it in perl myself but YMMV). -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php