Re: [PHP] php-cli-shebang
why not using php.exe instead of php-cgi.exe as a parser ? On Wed, Jun 8, 2011 at 7:42 AM, Lists li...@euca.us wrote: Lists wrote: Windows Server 2003 PHP fastcgi 5.2 O.K. '-q' is quiet mode (no header info), which works better when not using the -f flag when calling the script (it appears). anyway, I solved my issues with a work around, so no worries. Donovan -- dbrooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Powered By Francis™. Welcome to my website: http://www.francistm.com Rewrite to francis...@gmail.com please.
Re: [PHP] Help needed with php.ini
I remember that there's 2 php.ini in Fedora, one is for SAPI like apache or other CGIServer, and another is for CLI. Can you confirm that you edited a right config file? On Mon, Jun 6, 2011 at 4:55 AM, Camilo Sperberg unrea...@gmail.com wrote: On 05-06-2011, at 10:31, Adam Tong adam.to...@gmail.com wrote: Hi, I can't set correctly the error display and reporting properties. I don't know what i'm doing wrong. Here is the section that i modified in php.ini: - display_errors = On ; Default Value: On ; Development Value: On ; Production Value: Off display_startup_errors = On ; Default Value: Off ; Development Value: On ; Production Value: Off error_reporting = E_ALL | E_STRICT ; Default Value: E_ALL ~E_NOTICE ; Development Value: E_ALL | E_STRICT ; Production Value: E_ALL ~E_DEPRECATED And here is the output of phpinfo(): - display_errorsOffOff display_startup_errorsOffOff doc_rootno valueno value docref_extno valueno value docref_rootno valueno value enable_dlOffOff error_append_stringno valueno value error_logno valueno value error_prepend_stringno valueno value error_reporting22527 22527 - I'm using a default installation (using yum) of php on Fedora14. This is my development environment, and want to see all the errors on standard output. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Have you modified the example values instead of the ones mid-way php.ini? If so, scroll down to check. The latest settings should override the previous one. Have you restarted apache with service httpd restart or /etc/init.d/httpd restart? (or apachectl restart) In your php script or htaccess file, do you override those values? Sent from my iPhone 5 Beta [Confidential use only] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Powered By Francis™. Welcome to my website: http://www.francistm.com Rewrite to francis...@gmail.com please.
[PHP] a shortcut to set variable
eh, I just want to get a shortcut like $id = isset($_GET['id']) ? $_GET['id'] : 0; BTW, I'm using PHP5.3+, thanks bros. -- Powered By Francis™. Welcome to my website: http://www.francistm.com Rewrite to francis...@gmail.com please.
[PHP] Re: SPL Countable count() not being called
Justin Francis wrote: I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Any ideas? In case anyone was wondering, I downloaded the latest cvs snapshot, and this bug has been fixed. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [SPAM] - [PHP] Nested IFs Problem - Bayesian Filter detected spam
Albert Padley wrote: I have the following nested ifs: if ($row['date'] '2005-10-02') { if ($row['time'] '12:00') { if ($row['field'] == 'P5' ) { echo td class=\tabletextbluebg\Success; } } } else { echo td class=\tabletextred\Failed; } /td Whenever the 3 if statements are true, I always get the correct Success to echo. However, if any or all of the if statements are false, I never get Failed to echo. Once the first if statement is evaluated as true, the else statement will never be executed -- regardless of the outcome of the two nested ifs. I am not sure what you are trying to accomplish here, but perhaps all three of your if conditions should be combined into one if condition ANDed () together? Or maybe the if...elseif...else structure is what you need. Hope this helps. Justin I know it's something simple, but I just can't see it at the moment. TIA Albert Padley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SPL Countable count() not being called
I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SPL Countable count() not being called
Stut wrote: Justin Francis wrote: I have not been able to get count() to be called when I pass my Countable class to the count function. I am using PHP 5.1 Release Candidate 1. I am not sure if it is a bug, so I am posting here to see if anyone can help. -- class Collection implements Countable { public function count() { return 200; } } $c = new Collection(); echo(count($c)); This code prints 1 out with no errors, when it should print out 200. Should it not be $c-count() ? -Stut No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. - Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [SPAM] - RE: [PHP] SPL Countable count() not being called - Bayesian Filter detected spam
Jay Blanchard wrote: [snip] No. By implementing the Countable interface, and implementing the count() method, the global count($c) function is supposed to call $c-count(). This is so the object can be treated like a countable array in the same manner. [/snip] I was asleep earlierif $c is not an array 1 will be returned. $c is one number (200), not an array. This would be true if the class does not implement the Countable interface. It does, however, and so 1 should not be returned, but instead, whatever number is returned from the count() method of the Collection class. See the SPL documentation at www.php.net/spl for more on how this is supposed to work. - Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorry forgot to include the code for my last message - Mike Francis
Hi David, Thanks for your help. I've taken out the @ character, and added the error-trapping code to my file. The results: When I run the file, nothing untoward is reported, and I end up with a blank screen in IE / Moxilla Firebird / Opera. There are no errors reported. In the Apache error log, there are no error or movement messages reported for this operation. In the Apache Access Log the following is reported: 127.0.0.1 - - [12/Dec/2004:13:23:19 +] GET / HTTP/1.1 200 1494 127.0.0.1 - - [12/Dec/2004:13:23:20 +] GET /apache_pb.gif HTTP/1.1 304 - 127.0.0.1 - - [12/Dec/2004:13:23:32 +] GET /mysqlconnectcomplete.php HTTP/1.1 200 - I have the usual permissions on the database server which is accessible via the command prompt with no problem. I have the MyODBC driver installed and configured just in case PHP is looking for it for some strange reason. I've pasted the code below this message: Used Code:- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleOur List of Jokes/title meta http-equiv=content-type content=text/html; charset=iso-8859-1 / /head body ?php // Connect to the database server $dbcnx = mysql_connect('localhost', 'root', 'MyPassWord'); if (!$dbcnx) { echo 'pUnable to connect to the ' . 'database server at this time./p' ); echo mysql_error(); exit(); } // Select the jokes database if ([EMAIL PROTECTED]('ijdb')) { echo mysql_error(); exit('pUnable to locate the joke ' . 'database at this time./p'); } ? pHere are all the jokes in our database:/p blockquote ?php // Request the text of all the jokes $result = mysql_query('SELECT joketext FROM joke'); if (!$result) { exit('pError performing query: ' . mysql_error() . '/p'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo 'p' . $row['joketext'] . '/p'; } ? /blockquote /body /html - Original Message - From: David Robley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 12, 2004 5:25 AM Subject: [PHP] Re: Sorry forgot to include the code for my last message - Mike Francis On Sun, 12 Dec 2004 07:03, Mike Francis wrote: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleOur List of Jokes/title meta http-equiv=content-type content=text/html; charset=iso-8859-1 / /head body ?php // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'MyPassword'); if (!$dbcnx) { echo 'pUnable to connect to the ' . 'database server at this time./p' ); Note that using the @ in front of the connect suppresses any error messsages that may be returned from the connect; I would get rid of that. Then add here: echo mysql_error(); exit(); } // Select the jokes database if ([EMAIL PROTECTED]('ijdb')) { And use mysql_error() here too. exit('pUnable to locate the joke ' . 'database at this time./p'); } ? mysql_error() will return a useful error message. -- David Robley Backups? We doan *NEED* no steenking baX%^~,VbKx NO CARRIER -- 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] Sorry forgot to include the code for my last message - Mike Francis
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleOur List of Jokes/title meta http-equiv=content-type content=text/html; charset=iso-8859-1 / /head body ?php // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'MyPassword'); if (!$dbcnx) { echo 'pUnable to connect to the ' . 'database server at this time./p' ); exit(); } // Select the jokes database if ([EMAIL PROTECTED]('ijdb')) { exit('pUnable to locate the joke ' . 'database at this time./p'); } ? pHere are all the jokes in our database:/p blockquote ?php // Request the text of all the jokes $result = @mysql_query('SELECT joketext FROM joke'); if (!$result) { exit('pError performing query: ' . mysql_error() . '/p'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo 'p' . $row['joketext'] . '/p'; } ? /blockquote /body /html
[PHP] MySQL Connection problem
Hi, I have Apache 2, PHP 5 and MySQL 4.1 installed on an XP pro box. I have created a new database 'ijdb' with a single table 'joke' and have entered data into two of the three fields in the table. I can access the database / tables / data from a command prompt. However, when I try to connect through WAMP I either receive a 'Unable to connect to the database server at this time.' error message - which is my default error message, or, I receive a blank window in IE / Mozilla / Opera etc and no error messages. I have tried removing the @ from the file and this has no effect - interesting?! The error logs do not reveal anything that indicates a missing table / field. I wonder if anyone has any ideas ? Cheers, Mike
RE: [PHP] PHP4 mysqli with mysql 4.1.7?
What happens in your application if you just do: mysql_query(SET CHARACTER SET utf8, $connection) or die(mysql_error()); right after you connect to the database? Thank you, by adding mysql_query(SET CHARACTER SET utf8, $connection), it works now. However, I am still confused on some issue: 1. Is it possible to set the PHP mysql client to use utf8 as default? In this way, I do not need to modify all of my applications. 2. Why mysqli + 4.1.x is recommended? Francis Mak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache - MySQL connection via PHP
Hi, I am having a problem connecting to a MySQL database via PHP. I have Apache 2.0.52, PHP 5.0.2 and MySQL 4.1 installed and working OK individually. I have copied phpmysql.dll and mysqli.dll at different times to Windows/System32. I have set up a successful MyODBC connection with the database - so it exists. I can access MySQL from the command prompt, and from a web interface with no problem. However, when I run the following code I get a Unable to connect to the database server at this time. error message. If some kind soul could point me in the right direction I would be very grateful!! This is the code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleOur List of Jokes/title meta http-equiv=content-type content=text/html; charset=iso-8859-1 / /head body ?php // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'thisismypassword'); if (!$dbcnx) { exit('pUnable to connect to the ' . 'database server at this time./p'); } // Select the jokes database if ([EMAIL PROTECTED]('ijdb')) { exit('pUnable to locate the joke ' . 'database at this time./p'); } ? pHere are all the jokes in our database:/p blockquote ?php // Request the text of all the jokes $result = @mysql_query('SELECT joketext FROM joke'); if (!$result) { exit('pError performing query: ' . mysql_error() . '/p'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo 'p' . $row['joketext'] . '/p'; } ? /blockquote /body /html
[PHP] PHP4 mysqli with mysql 4.1.7?
Hi, This message is a bit long, but I hope somebody could help me on this issue, thank you . I am using mysql 4.1.0(default-character-set=utf8) with PHP 4.3.3. All tables are using utf8 charset. I can insert, select and display the utf8 character without any problem using PHP, I used the normal mysql_query operation, NOT mysqli. Yes, msqyl_query works well in 4.1.0. Now, I upgraded to 4.1.7(default-character-set=utf8). I use mysql client and I can see all data in 4.1.7 are utf8. However, PHP shows all as ???. SHOW VARIABLES LIKE '%charset%' character_set_server utf8 character_set_system utf8 character_set_database utf8 character_set_client utf8 character_set_connection utf8 character_set_results utf8 collation_connection utf8_general_ci collation_database utf8_general_ci collation_server utf8_general_ci I struggled for a few days and finally discovered a message in mysql-lists by Marek Lewczuk(UTF-8 problem, 24/5/2004), he has the follwing in his PHP script: mysqli_query($c, SET CHARACTER SET utf8;); mysqli_query($c, SELECT * FROM db); I have never used mysqli before, and I found it is only avaliable in PHP5. I have several questions to ask: 1. Can I compile PHP4 with mysqli extention? Is there any tricks to do this? 2. Why mysql 4.1 + mysqli is recommended? But not the normal mysql extention? 3. If I upgrade to mysql 4.1.7 + PHP5, I need to rewrite all of my application to use mysqli instead of mysql? Any advise on this issue? 4. I see that we must use mysqli_query($c, SET CHARACTER SET utf8;); before any query, can I compile the mysqli extention to use utf8 as default? 5. In http://www.php.net/manual/en/ref.mysql.php I see a note: If you need charsets other than latin (default), you have to install external (not bundled) libmysql with compiled charset support. So, it means it is possible to use mysql_query to with utf8? 6. Any reason why I can use mysql_query with 4.1.0 without any problem? I know there are many questions, but I hope somebody could help me. And I believes there are lots of people having the same upgrade issue. if utf8 + 4.1.7 + mysqli_query is a must instead of 4.1.7 + mysql_query, I am sure that there will be lots of problem come up as most PHP applications are using mysql_query only. THANK YOU VERY MUCH!!! Francis Mak
[PHP] Do You Need addslashes() When Using Bind Variables
Hi, I'm using the Oracle database though I think this question is generic to all databases. If you're using bind variables and preparing the SQL statements ahead of time, do you still need to call addslashes() before binding the strings to the bind variables? Thanks in advance. Francis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache 2.0.51 and php 5.0.2 static compile
I'm sorry to ask a question that I'm sure exists in the documents, but I have yet to see it? How does one compile php 5.0.2. statically into your apache 2.0.51 binary, everything, I've seen thus far shows how to create a php shared module? Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie: Validate Required Form Fields
Hello All, I have a newbie question related to validating required Form fields. Suppose we have a two-step user registration process with scripts register1.php and register2.php, each page containing a set of required and non-required fields. In register1.php, when user submits the form, it calls register2.php as the action. In register2.php, I want to validate the Form values submitted by the user in register1.php and if any of the required fields is missing a value, I want to re-dispaly the register1.php page with the appropriate error message. What is the most appropriate way to handle this? Once the validation fails in register2.php, can I call register1.php with parameters? If so, how? Or do I use session variables to capture the error information? How do I redirect to register1.php from within the code execution of register2.php? Thanks in advance for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installing Php5 over Existing Php4.3.6
No, I do not want to keep the old distribution. What is the proper way to uninstall the existing installation? Do I just do a 'make distclean'? Would that clean up all the libraries and the program files of the existing installation? Thanks again. Francis Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Francis Chang wrote: Hi, I would like to install Php5 over an existing Php4.3.6 installation on Linux. What is the proper procedure? Do I need to uninstall the previous version first, if so, how? Can I install Php5 into the same location as the previous installation or should I install it into a different PREFIX directory? Any tip would be much appreciated. Francis There isn't one *proper* way to do it. Do you want them both running at the same time? I wouldn't suggest that unless you need it, but that can be done. Sure, if you want to uninstall the old installation and then put php5 in you can do that, but I'd suggest creating a test server first to make sure all your scripts will run like you expect. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installing Php5 over Existing Php4.3.6
Hi, I would like to install Php5 over an existing Php4.3.6 installation on Linux. What is the proper procedure? Do I need to uninstall the previous version first, if so, how? Can I install Php5 into the same location as the previous installation or should I install it into a different PREFIX directory? Any tip would be much appreciated. Francis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Mod_PLSQL
I am having trouble making HTMLDB (Mod_PLSQL) and PHP work together. I installed PHP and did the make and make install but if I LoadModule php4_module, only the basic php works (not the OCI) and mod_plsql stops working. Here are the lines that I added in http.conf : LoadModule php4_modulelibexec/libphp4.so AddModule mod_php4.c # # This next section will add a handler for .php files, put it with other IfModule lines. # IfModule mod_php4.c AddType application/x-httpd-php4 .php AddType application/x-httpd-php4-source .phps /IfModule Any suggestions would be welcome. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Segmentation fault(11) using oci8 Oracle 10g
When I try to use oci8 on redhat8 Oracle 10.1 I get the following error on make PHP : /u01/app/oracle/product/10.1.0/lib/libclntsh.so: warning: remap_file_pages is not implemented and will always fail and Segmentation fault(11) in the apache log. Any ideas why ? Thanks Francis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] zlib compatibility
Hi, What I am trying to do: - in VB, compress a string - save it as a file - use php to open it, then gzuncompress it I am using a vb wrapper in: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=42297ln gWId=1 I am sure that the above program works, since it can uncompress the file. Acutally this program is only an interface using the zlib I used the above demo, compressed a string then saved it as a file. When I tried to use php to gzuncompress it, I got data error. What is the problem? aren't they both using the zlib? I also tried gzinflate, still the same 'gzinflate(): data error in...' below is the php code: $handle = fopen(/tmp/tmpCompress.txt, r); $contents = fread($handle, filesize(/tmp/tmpCompress.txt)); fclose($handle); echo(gzuncompress ($contents)); I also tried to use binary read in php(i.e. rb), but still got stucked in gzuncompress. just another question, what is the difference between gzuncompress and gzdeflate ?? Thank you very much!! Francis Mak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing of querystrings
Hi, I am new to php and trying to learn it for some university work. The problem I am having is this: I have read on a webmonkey tutorial that when you call a php file and name-value querystrings are automatically created into variables in your script. I have a example url : http://localhost/output2.php?id=1 Which I hoped would make a variable, $id, and set the value to 1. However it doesnt work, the variable is not created. Any help would be greatly appreciated. I have Appache 2.0.48, MySQL 4.0.17, and PHP 4.3.4 Many Thanks Ryan Francis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Congratulations Yoiu are a Winner
SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. ALFONSTRAAT B56, 1002 BS AMSTERDAM, THE NETHERLANDS. TO THE MANAGER FROM: THE DESK OF THE PROMOTIONS MANAGER, INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, REF: OYL /26510460037/02 BATCH: 24/00319/IPD ATTENTION: RE/ AWARD NOTIFICATION; FINAL NOTICE We are pleased to inform you of the announcement today, 31st October 2003 of winners of the SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003 Your company,is attached to ticket number 023-0148-790-459, with serial number 5073-11 drew the lucky numbers 43-11-44-37-10-43, and consequently won the lottery in the 3rd category. You have therefore been approved for a lump sum pay out of US$5,500.000.00 in cash credited to file REF NO. OYL/25041238013/02. This is from total prize money of US$80,400,000.00 shared among the seventeen international winners in this category. All participants were selected through a computer ballot system drawn form 25,000 names from Australia, New Zealand, America, Europe, North America and Asia as part of International Promotions Program, which is conducted annually. CONGRATULATIONS! Your fund is now deposited with a Security company insured in your name. Due to the mix up of some numbers and names, we ask that you keep this award strictly from public notice until your claim has been processed and your money remitted to your account. This is part of our security protocol to avoid double claiming or unscrupulous acts by participants of this program. We hope with a part of you prize, you will participate in our end of year high stakes US$1.3 billion International Lottery. To begin your claim, please contact your claim agent; Mr Francis weeny at this email address below. [EMAIL PROTECTED] For due processing and remittance of your prize money to a designated account of your choice. Remember, all prize money must be claimed not later than 10th November 2003. After this date, all funds will be returned as unclaimed. NOTE: In order to avoid unnecessary delays and complications, please remember to quote your reference and batch numbers in every one of your orrespondences with your agent. Furthermore, should there be any change of your address, do inform your claims agent as soon as possible. Congratulations again from all our staff and thank you for being part of our promotions program. Sincerely, Clark Wood THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. NB. Any breach of confidentiality on the part of the winners will result to disqualification. SORRY FOR THE LATE INFORMATION THANKS CLARK WOOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Congratulations You Win
SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. ALFONSTRAAT B56, 1002 BS AMSTERDAM, THE NETHERLANDS. TO THE MANAGER FROM: THE DESK OF THE PROMOTIONS MANAGER, INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, REF: OYL /26510460037/02 BATCH: 24/00319/IPD ATTENTION: RE/ AWARD NOTIFICATION; FINAL NOTICE We are pleased to inform you of the announcement today, 7th October2003 of winners of the SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003 Your company,is attached to ticket number 023-0148-790-459, with serial number 5073-11 drew the lucky numbers 43-11-44-37-10-43, and consequently won the lottery in the 3rd category. You have therefore been approved for a lump sum pay out of US$5,500.000.00 in cash credited to file REF NO. OYL/25041238013/02. This is from total prize money of US$80,400,000.00 shared among the seventeen international winners in this category. All participants were selected through a computer ballot system drawn form 25,000 names from Australia, New Zealand, America, Europe, North America and Asia as part of International Promotions Program, which is conducted annually. CONGRATULATIONS! Your fund is now deposited with a Security company insured in your name. Due to the mix up of some numbers and names, we ask that you keep this award strictly from public notice until your claim has been processed and your money remitted to your account. This is part of our security protocol to avoid double claiming or unscrupulous acts by participants of this program. We hope with a part of you prize, you will participate in our end of year high stakes US$1.3 billion International Lottery. To begin your claim, please contact your claim agent; Mr Francis weeny at this email address below. [EMAIL PROTECTED] For due processing and remittance of your prize money to a designated account of your choice. Remember, all prize money must be claimed not later than 17th October 2003. After this date, all funds will be returned as unclaimed. NOTE: In order to avoid unnecessary delays and complications, please remember to quote your reference and batch numbers in every one of your orrespondences with your agent. Furthermore, should there be any change of your address, do inform your claims agent as soon as possible. Congratulations again from all our staff and thank you for being part of our promotions program. Sincerely, Clark Wood THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. NB. Any breach of confidentiality on the part of the winners will result to disqualification. SORRY FOR THE LATE INFORMATION THANKS CLARK WOOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Congratulations You Win
SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. ALFONSTRAAT B56, 1002 BS AMSTERDAM, THE NETHERLANDS. TO THE MANAGER FROM: THE DESK OF THE PROMOTIONS MANAGER, INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, REF: OYL /26510460037/02 BATCH: 24/00319/IPD ATTENTION: RE/ AWARD NOTIFICATION; FINAL NOTICE We are pleased to inform you of the announcement today, 7th October2003 of winners of the SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003 Your company,is attached to ticket number 023-0148-790-459, with serial number 5073-11 drew the lucky numbers 43-11-44-37-10-43, and consequently won the lottery in the 3rd category. You have therefore been approved for a lump sum pay out of US$5,500.000.00 in cash credited to file REF NO. OYL/25041238013/02. This is from total prize money of US$80,400,000.00 shared among the seventeen international winners in this category. All participants were selected through a computer ballot system drawn form 25,000 names from Australia, New Zealand, America, Europe, North America and Asia as part of International Promotions Program, which is conducted annually. CONGRATULATIONS! Your fund is now deposited with a Security company insured in your name. Due to the mix up of some numbers and names, we ask that you keep this award strictly from public notice until your claim has been processed and your money remitted to your account. This is part of our security protocol to avoid double claiming or unscrupulous acts by participants of this program. We hope with a part of you prize, you will participate in our end of year high stakes US$1.3 billion International Lottery. To begin your claim, please contact your claim agent; Mr Francis weeny at this email address below. [EMAIL PROTECTED] For due processing and remittance of your prize money to a designated account of your choice. Remember, all prize money must be claimed not later than 17th October 2003. After this date, all funds will be returned as unclaimed. NOTE: In order to avoid unnecessary delays and complications, please remember to quote your reference and batch numbers in every one of your orrespondences with your agent. Furthermore, should there be any change of your address, do inform your claims agent as soon as possible. Congratulations again from all our staff and thank you for being part of our promotions program. Sincerely, Clark Wood THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. NB. Any breach of confidentiality on the part of the winners will result to disqualification. SORRY FOR THE LATE INFORMATION THANKS CLARK WOOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Argh! nulls un stuff..
i think that was one of the problems, some places the session var was set back as a string (0) and other as int (0). anyway thanks to all, panic over all working now :) Jason Young [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... My suggestion would be to checck for isset($_SESSION[temp]) and if ($_SESSION[temp] 0) with quotes .. PHP is very forgiving with data types, and I've found its much easier to keep track of what exactly is going on if I reference everything in a string format. -Jason Sam Masiello wrote: How about something like this: if ($_SESSION[temp] 0) ? Or if you want to be really sure: if ($_SESSION[temp] 0 $_SESSION[temp] != ) ORif you want to be sure the value is a number as well: if ($_SESSION[temp] 0 $_SESSION[temp] != is_numeric($_SESSION[temp]) HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Francis [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 9:23 AM To: [EMAIL PROTECTED] Subject: [PHP] Argh! nulls un stuff.. ok going mad all I need to do is check a variable and if it has a number in it then do something, so anything from 0 up, but it keeps thinking 0 is null and failing, anyway around this? or am I just being stupid as usual? $_SESSION[temp] = 0; $tempVar = 0; if($_SESSION[temp] !=){ echo != condition ; } if(isset($_SESSION[temp])){ echo isset condition ;} if(isset($tempVar)){ echo tempVar isset condition ;} if($tempVar !=){ echo tempVar != condition ;} if(!empty($tempVar)){ echo tempVar !empty condition ;} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Content-Disposition IE bug
ok i know this has popped up a couple of times before but i'm still having problems. What I need is the download popup to popup and ask the user if they wish to save or open the file they want to download. If you click open IE saves the file in your temp cache and then opens up the associated proggy and for some bizare reason adds [1] at the end of the filename and cant find the file in cache. At the moment i'm using the following: Header(Content-Type: application/octet-stream); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Header(Content-Description: File from DMS); fpassthru($fh); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Content-Disposition IE bug (ADDENDUM)
nope still dont work :( oh well back to bashing my head against a wall and talking to microsoft :) Aaron Gould [EMAIL PROTECTED] wrote in message 012c01c27447$69e831c0$3f63a8c0@pcagould">news:012c01c27447$69e831c0$3f63a8c0@pcagould... I just read the part about caching... Here's the download code that works perfectly for me. Note the first line that deals with caching. The last line also has the filename in quotes. That might make a difference. If you still get [1], try the %20 trick in my last post. header(Cache-control: private); header(Content-type: application/octet-stream); header(Content-length: $filesize); header(Content-Disposition: attachment; filename=\$filename\); -- Aaron Gould [EMAIL PROTECTED] Web Developer Parts Canada - Original Message - From: Francis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 5:45 AM Subject: [PHP] Content-Disposition IE bug ok i know this has popped up a couple of times before but i'm still having problems. What I need is the download popup to popup and ask the user if they wish to save or open the file they want to download. If you click open IE saves the file in your temp cache and then opens up the associated proggy and for some bizare reason adds [1] at the end of the filename and cant find the file in cache. At the moment i'm using the following: Header(Content-Type: application/octet-stream); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Header(Content-Description: File from DMS); fpassthru($fh); -- 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] Argh! nulls un stuff..
ok going mad all I need to do is check a variable and if it has a number in it then do something, so anything from 0 up, but it keeps thinking 0 is null and failing, anyway around this? or am I just being stupid as usual? $_SESSION[temp] = 0; $tempVar = 0; if($_SESSION[temp] !=){ echo != conditionbr; } if(isset($_SESSION[temp])){ echo isset conditionbr;} if(isset($tempVar)){ echo tempVar isset conditionbr;} if($tempVar !=){ echo tempVar != conditionbr;} if(!empty($tempVar)){ echo tempVar !empty conditionbr;} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHPDoc?
Is their any comparable tool/util whatever to automaticly create documentation from your PHP Code (like java's JavaDoc)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Am I just being stupid or something?
Ok whats going on here: echo Location: .$_SESSION[Project][location]; // above echo's Location: 0 if($_SESSION[Project][location] !=){ if (checkAccess(folder, $_SESSION[Project][location], create)){ newfile(); }else{ reportError(1, Access Denied); } }else{ fatelError(1, Session Location Error); } Ok $_SESSION[Project][location] is set to 0 but for some reason it always calls fatelError? even tho $_SESSION[Project][location] is set to 0 can anyone see anything wrong? is 0 treated as null or something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] NT2000 ARGH!
Ok PHP was working fine on this NT2000 box and now its totally smegged. Every PHP page gives the error: -2147467259 (0x80004005) Then IIS restarts itself, i've tried reinstalling with the latest version (4.2.2) of PHP, rebooted, no joy, then reinstalled IIS rebooted thenthen it constantly asked for a username and password (NT authentication box) for php files ONLY, if you typed in the admin password it seemed to work ok, rebooted again and now I get the above error message. Is 4.2.2 a stable release? not that it really matters as I was getting the same problems with 4.2.1 HELP! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: NT2000 ARGH!
ok change to cgi, seems to be alot more stable now. Francis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Ok PHP was working fine on this NT2000 box and now its totally smegged. Every PHP page gives the error: -2147467259 (0x80004005) Then IIS restarts itself, i've tried reinstalling with the latest version (4.2.2) of PHP, rebooted, no joy, then reinstalled IIS rebooted thenthen it constantly asked for a username and password (NT authentication box) for php files ONLY, if you typed in the admin password it seemed to work ok, rebooted again and now I get the above error message. Is 4.2.2 a stable release? not that it really matters as I was getting the same problems with 4.2.1 HELP! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] www.php.net/docs.php
whats the reason why www.php.net/docs.php has been down for days? why is it still saying this error? Warning: main(geoip.inc) - No such file or directory in /local/Web/sites/phpweb/include/prepend.inc on line 6 Fatal error: Failed opening required 'geoip.inc' (include_path='.:/local/Web/sites/phpweb/include') in /local/Web/sites/phpweb/include/prepend.inc on line 6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Doing an HTML POST using header()
I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Doing an HTML POST using header()
using NT? all I need it for is so the user can skip a registration step put its all coded using POST rather than GET, its gonna be quite simple but whats the syntax? there must be a way to do it... Pete James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Don't redirect, use curl to post your data to the new page. Francis wrote: I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Microsoft Bug come back to haunt?
Ok I posted a mail a couple of days ago about downloading files within PHP. Heres the code I'm using: Header(Content-Type: application/x-tar); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Anyway the problem is, that if you use IE6 click on the download it pops the box up, do you want to save or open it works ok if you click save put if you try open it doesnt open the file properly it adds [1] or [2] etc at the end of the filename. Now I know there was a bug with the attachment part of the Content-Disposition in IE5 but this was fixed with SP1. Is there any way of getting around this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Microsoft Bug come back to haunt?
But when you save the file it keeps the filename so in my example if: $filename = newfile.xls; then if you click the save button ie saves it as newfile.xls but if you click open excel or word etc trys to open it was newfile.xls[1] and just cant find the cached file. Philip Hallstrom [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've had luck making the url look something like... http://server/path/to/dl.php?filename=filename.tar or http://server/path/to/dl.php/filename.tar (works with apache) The latter seems to work better for me. On Wed, 26 Jun 2002, Francis wrote: Ok I posted a mail a couple of days ago about downloading files within PHP. Heres the code I'm using: Header(Content-Type: application/x-tar); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Anyway the problem is, that if you use IE6 click on the download it pops the box up, do you want to save or open it works ok if you click save put if you try open it doesnt open the file properly it adds [1] or [2] etc at the end of the filename. Now I know there was a bug with the attachment part of the Content-Disposition in IE5 but this was fixed with SP1. Is there any way of getting around this. -- 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] Downloading Files
I want to protect files from being downloaded and only allow people to download files which they have access too. I've done all the access control etc... but whats the best way for the user to download the file... Can you paste the file directly into the header? (get the file from the filesystem, mime encode it and put it in the header?) or copying the file to a web viewable temp dir to allow the user to download it? (dont really want to do this). Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Downloading Files
got it!! :) $filename = backup.tar; $download_file = /absolute/path/backup.tar; $fh = fopen($download_file, r); header(Content-Type: application/x-tar); header(Content-Disposition: attachment; filename=$filename); fpassthru($fh); exit(); Thanks a lot!! :) Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Either of these options will work fine. There was MASSIVE disscussions about this a few weeks back -- check for threads started by myself in the archives. Justin French on 26/06/02 12:35 AM, Francis ([EMAIL PROTECTED]) wrote: I want to protect files from being downloaded and only allow people to download files which they have access too. I've done all the access control etc... but whats the best way for the user to download the file... Can you paste the file directly into the header? (get the file from the filesystem, mime encode it and put it in the header?) or copying the file to a web viewable temp dir to allow the user to download it? (dont really want to do this). Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions
Newbie question I have installed PHP 4.1.2 on a Windows 2000 for test purposes. I have never used sessions before and am having difficulty with them. I am using session_start(); and get the following error. Warning: open(/tmp\sess_51d4849918d3ffe4d2cc70013d678f6b, O_RDWR) failed: No such file or directory (2) I have session support enabled, is there something else I need to do. -- Alex Francis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
You'r right of course, the directory didn't exist. Working alright now. -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. Stuart Dallas [EMAIL PROTECTED] wrote in message 3CD42BAD.28161.5486682@localhost">news:3CD42BAD.28161.5486682@localhost... On 4 May 2002 at 18:22, Alex Francis wrote: Warning: open(/tmp\sess_51d4849918d3ffe4d2cc70013d678f6b, O_RDWR) failed: No such file or directory (2) Does the directory it's trying to write to exist? Seeing as you've posted this question, I'll assume that you don't understand the error message. Out of curiosity, which bit of No such file or directory are you having trouble with? Sarcasm aside, it's trying to create a file named /tmp\sess_51d4849918d3ffe4d2cc70013d678f6b in the root of the current drive (usually C). In other words, does the directory c:\tmp exist? I would bet the farm that it doesn't. The solution? Either create the directory or change the session.save_path entry in your php.ini. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IE and Netscape
The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. Code: echo h6,$name, nbsp nbsp, E-mail:, nbsp,$email, nbsp nbsp,$date, nbsp nbsp, PostID:, nbsp,$id ,/h6; IE5:Debbie McNicol E-mail: [EMAIL PROTECTED] PostID: 180 Netscape: Debbie McNicol nbspE-mail:[EMAIL PROTECTED] nbspPostID:nbsp180 -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: IE and Netscape
Thank you - everything alright now. I guess this is what happens when you learn using wiziwig editors. -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. Alex Francis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The following code shows exactly what I want in IE5 but does not in Netscape. I have tried various combinations of slashes and quotes but can't get it to display properly. Can anyone show me the changes I need to make. Code: echo h6,$name, nbsp nbsp, E-mail:, nbsp,$email, nbsp nbsp,$date, nbsp nbsp, PostID:, nbsp,$id ,/h6; IE5:Debbie McNicol E-mail: [EMAIL PROTECTED] PostID: 180 Netscape: Debbie McNicol nbspE-mail:[EMAIL PROTECTED] nbspPostID:nbsp180 -- Alex Francis Cameron Design 35, Drumillan Hill Greenock PA16 0XD Tel 01475 798106 [EMAIL PROTECTED] http://www.camerondesign.co.uk This message is sent in confidence for the addressee only. It may contain legally privileged information. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I Resize an image?
I am new to php and wd appreciate any help! I have been through the manual, but have found no solution: 1.How do I resize an image retrieved from an interbase database before = displaying it on a page? ie If the image is 800 x 600 pixels and I want to resize the image to = 256 x 192 2.Do I have to install gd library? 3.How do I display the image from the interbase database?
[PHP] Recursive call of index.php/test=2
When we open this url : http://localhost/index.php/test=2 Yep index.php/test=2 not index.php?test=2 Apache open the page index.php one time for every broke link he find in the index.php page. Example : ?PHP // Simple PHP test page ? HTML TITLESimple PHP test page/TITLE BODY PSimple PHP test page/P IMG SRC=image1.gifbr IMG SRC=image2.gifbr IMG SRC=image3.gif /BODY /HTML ? // Keep a log /* Log table CREATE TABLE `simple_log` ( `sl_time` BIGINT UNSIGNED NOT NULL, `sl_url` VARCHAR(255) NOT NULL ) */ // Current time $now = time(); // Database configuration $host = 'localhost'; $username = ''; $password = ''; $database = ''; // Open a database connection $linkd = mysql_connect($host, $username, $password); mysql_select_db($database, $linkd); // Insert a log $sql = INSERT INTO simple_log (sl_time, sl_url) VALUES ('$now', '$REQUEST_URI'); mysql_query($sql, $linkd); // Close the database connection mysql_close($linkd); ? Images are broke because the path http://localhost/index.php/image1.gif does not exist. In this case, Apache open 4 times the page index.php. Here the listing of the log table : sl_timesl_url 1005924055 /index.php/test=2 1005924055 /index.php/image1.gif 1005924055 /index.php/image2.gif 1005924055 /index.php/image3.gif We have the same problem on 3 differents servers. Compilation script : './configure' '--with-mysql=/virtual/mysql' '--enable-bcmath' '--with-gd' '--with-dbase' '--with-curl' '--with-xml' '--with-pgsql=/virtual/postgres/' '--with-imap' '--with-apxs=/virtual/apachedev/bin/apxs' Apache version : 1.3.20 Php version : 4.0.6 and 4.2.0-dev Do you have any suggestion to block the recusive call? Thank you Francis Grignon [[EMAIL PROTECTED]] Analyse programmeur Groupe iWeb Technologies Inc. ICQ : #74395718 Tel : +1 514-286-4242 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XSLT module bugs (?)
The ® is because (well I think) of the utf-8 code, try utf8_decode() to decode it and to get it back. P.S. What is they command that you made for php 4.0.6 to parse your xml file, I'm not able to parse a xml file with sablotron since 4.0.6. Maxim Derkachev wrote: Hi all. Just met two bugs (?) in the xslt module. 1st. I replace HTML entities in the CDATA parts with their ascii equivalents ('lt;' - '', 'gt;' - '', etc.) After XSLT transformation, '' went back to 'lt;', while any other remain untouched. 2nd. After the transformation, #ascii code; are substituted with their char equivalents, prepended with  character. E.g. #174; ('registered' sign) become ® . Could someone advise? P.S. PHP4.0.6, Sablotron 0.6. -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XSLT module bugs (?)
Here what I use xslt_process($xslString, $xmlString, $this-result); and it give me this error Warning: Supplied argument is not a valid XSLT Processor resource in /home/httpd/html/xml/include/class.transform_xsl.php on line 74 Maxim Derkachev wrote: Hello Francis, Thursday, July 19, 2001, 5:43:37 PM, you wrote: FF The ® is because (well I think) of the utf-8 code, try utf8_decode() to FF decode it and to get it back. Not bugs, as I know now. xsl:output encoding='something' make the things work well. FF P.S. What is they command that you made for php 4.0.6 to parse your xml FF file, I'm not able to parse a xml file with sablotron since 4.0.6. xslt_process(). Works well since the first try. I don't process file, I compose xml in a string first. -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XSLT module bugs (?)
Hi again Maxim, when this problem started I found that in the xslt php cvs (because the manual on the php site doesn't seen to be accurate anymore) mixed xslt_process(resource processor, string xml, string xsl[, string result[, array arguments[, array parameters]]]) so xslt_process need a resource processor, so it has to have an error, because I don't pass any process. Are you sure that you're using 4.0.6? If so what was your configure option? Thanks again. Maxim Derkachev wrote: Hello Francis, Thursday, July 19, 2001, 6:05:55 PM, you wrote: FF Here what I use xslt_process($xslString, $xmlString, $this-result); FF and it give me this error FF Warning: Supplied argument is not a valid XSLT Processor resource in FF /home/httpd/html/xml/include/class.transform_xsl.php on line FF 74 Haven't seen such an error yet. -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Restoring a backup
mysql -u yourusername -p password myfile_db /home/ftpadmin/pub/myfile_db.backup Don wrote: Hi, I have a cron script that issues a: mysqldump --opt -p myfile_db /home/ftpadmin/pub/myfile_db.backup Now, I wish to do the opposite, that is, restore it into my database. After issuing a: mysql -p and entering the password, what command do I enter to restore my database from the backup file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] encryption
PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Question about hosting
Well for myself I will better like to have the 2 computer design, 1 for httpd and 1 for mysql, it's alway's better that way the few nano that you lose in transit are way better then a server that do both stuff. Now the problem (that eat a lot of time is php and mysql, doh!). So you have optimise that, is mysql will be mostly for read or write data what kind of %, if you need more read or more accurate read then write I suggest you to have a lot of heap table (in memory table, put them read only and get them to regenerate at every x times), copy of the mainly used data in your application, with a lot of ram that will speed-up the main thing. Then an other thing is to take big table and put them in smaller table, way faster for writing/reading (hum, I don't quite remember if mysql is row locking or table locking during write?). Then they other best stuff is to make your dynamic page (.php) and to make them static page (.html) this way you will get way faster viewing page, you don't have they overload of neither php, nor mysql processing. khttpd anyone? Anyway, you could do a lot of stuff, load-balacing, an other server for just your image, ... If you want more, you should go at http://www.slashdot.org/ and do a little search on that subjectthey had a few good article on that on the last few month, year,... Jay Paulson wrote: Hello everyone- I need some expert advice so I turn you to all! :) I'm am currently in the process of making 7 web sites using PHP and MySQL backend. I'm porjecting that all of these sites combined will get a million plus hits a month easy when it's all said and done. What I'm wanting to do is to put the database on it's own machine and put the sites on a different machine to reduce the cpu load. However, I'm not 100% sure this is the best option. I know there are a ton of variables to consider with this situation and I'm trying to figure out the best way to go so I don't have to redo it again. I'm thinking with the traffic these servers are going to incur if they are on one computer then I should probably have a dual CPU with a gig of ram or more and two hard drives.. Once CPU for serving up the pages and once CPU to run the db. Also, one HD for the db and one HD for the pages in trying to get the most performace out of one machine. Some of the dedicated options that people have thrown to me are in the range of a 450 CPU with 512 Ram and 30GB drive. I don't think that with so many pages being served that this system will handle it. Any suggestions? Thanks, jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs Perl question
I do love perl, even if I mostly code with PHP, but I use perl for stuff that run with a crontab (a script that run on every x date or hours), I know that you can do that with PHP now too, but Perl is a really great and funny language to learn, the best regular expression that I ever use (I still use the perl regular expresion in PHP), just for that you should learn they language. Once you know a language it's easy to change or learn an other one, the best thing should be learn what you need and get good on this one and if you need an other language then the stuff that you have learned will help you up to learn you new stuff. Book: Learning Perl from O'reilly, O'reilly have the better good, amazing book for Perl. Tom Malone wrote: I'm pretty new to programming - besides JavaScript, PHP is really the first language I've used. I'm just wondering, and I'm sure you all would know - should I learn Perl? Is it considered a necessity for a web developer to know Perl, or is it not a worthwhile endeavor, considering how easy PHP is to learn and use? Someone I know told me not to bother, but I just wanted a second opinion. (BTW - if you think it is worthwhile to learn Perl, what is a good book to begin with?) Thank you! Tom Malone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
The best editor is emacs, you can have one in windows too and it's free as beer ;) I use they php mode, it's not perfect but it do the job, I will need to learn lisp someday... doug wrote: Hiya everybody, I'm relatively new to PHP and I'm looking for a good text editor on win2k for creating/manipulating php pages. Notepad is great if your in a bind, and I've tried phpedit and activestate's Komodo and both seem to have problems (crashing etc...). Anybody got any suggestions? Free/small fee programs doesn't matter Thanks Doug Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
) ))) ) (defvar php-font-lock-keywords php-font-lock-keywords-3 Default expressions to highlight in PHP mode.) ;; font-lock-add-keywords is only defined in GNU Emacs (if (not (string-match XEmacs emacs-version)) (font-lock-add-keywords 'php-mode php-font-lock-keywords)) ;; Add char '#' as a start comment delimiter ;; we don't need to set up the end comment delimiter (modify-syntax-entry ?\# b) Alexander Skwar wrote: So sprach »Francis Fillion« am 2001-07-18 18.07.2001 um 18:11:35 -0400 : The best editor is emacs, you can have one in windows too and it's Actually I like vim better :) Emacs is just so HUGE :) I use they php mode, it's not perfect but it do the job, I will need to Does Emacs (Emacs? Hmm, what about XEmacs?) have a PHP mode? Last time I checked, it did not - although I used XEmacs back then. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 hour 17 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
Thanks, this mode look better, well it has better color coding then they old one, option in function are in bold pink... ;) Chris Lott wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Emacs on windows is great, and php-mode (there are a few. One that I have a link close to hand for is at: http://sourceforge.net/projects/php-mode/ ) is cool. I don't usually recommend it because it can be a pain to get setup optimally, but once it is you can do everything within it: edit documents, edit code and compile/test, use news, check mail, you name it. c -BEGIN PGP SIGNATURE- Version: PGP 7.0.3- signed for information authentication and security Comment: Key ID: 0x51046CFD iQA/AwUBO1YiENaLYehRBGz9EQJnqgCg2FVY0EoHWgat8b5BSycAdNa9kf8AoL80 yQtjZOcK+MYAC6VKrl+cFIbE =X7QV -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: PHP vs Perl Question
Well then, maybe you don't have/need to learn perl, perl is a pretty good language for system administration of any sort, if you were on Unix/Linux well yes of course but on WIndows. I think the better things for you is to learn PHP and know everythings about it. If you have to use time for php and perl, you will lose your time, begin with php and after that if you want to learn perl go for it. Tom Malone wrote: I haven't been to Barnes Noble yet, so I'm not sure if I will get the O'Reilly or the Wrox book yet, but supposing I went with O'Reilly, I wonder which would be better: Learning Perl 3rd Edition, or Learning Perl on Win32 Systems? I don't have much experience with Unix or Linux (minimal), but on the other hand, I use Windows ME, not NT. Also, I wonder if the Learning Perl on Win32 book might not me geared more towards NT administrators (I'm a web designer). Sorry this is so OT, but I really need to know and you people are the experts. Tom I'd go for it. Perl can be messy, but it is also quite powerful and doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability and use. But most of all, it is a fun language to play with... and if you do any system admin it is an indispensable tool. I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly, but only by a hair. Both are good. c -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] submitting free-form text to a database
If I remember the best things with M$ oriented database, is to to double it so ' should be '' and it should be ok. Anyway, that's what I do when I have to do stuff with those software. garman wrote: = Original Message From Duncan Hill [EMAIL PROTECTED] = On Mon, 16 Jul 2001, garman wrote: box where the user enters a description of the item he is selling. If the user's input contains an apostrophe (aka a single quote ') or even a double quote, the code gets confused. addslashes() RTM :) I was originally using regular expressions to achieve the same effect as addslashes(). But I switched to addslashes() anyway, and the problem persists. My guess is that MS Access uses a method other than slashes to escape quotes. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regular expression, parsing bad html in a xml document (strange)
I'm having problem with regular expression, not a good eek this week it seen like I alway's get a wall of problem. I know that it surely been ask a 1000 times, I look around, didn't find anythings, if you find somethings please point me out. So here what I want to do, I need to parse a xml document , but before to parse it I need to get rid of bad html that I don't want, but the document that I want require some stuff that I need too, so I don't want to get ride of all they HTML. So what I want to do, I already did a little bite of code that get out my good element and check for bad stuff, the only bad thing is that texttext-1 is a good stuff, but I need to change to lt; or it will do bad things with my xml parser. Here what I try $simple = XMLDATA ?xml version='1.0'? !DOCTYPE chapter SYSTEM /just/a/test.dtd [ !ENTITY plainEntity FOO entity !ENTITY systemEntity SYSTEM xmltest2.xml ] item text bad stuff texttext-1 text image title=Ceci est mon titre2 description=Ceci est ma description link=http://www.windplanet.com/; url=http://www.windplanet.com/images/news/988991159.gif; align=left width=235 height=131 size=13310/ text text image title=Ceci est mon titre description=Ceci est ma description link=http://www.windplanet.com/; url=http://www.windplanet.com/images/news/988991159.gif; align=left width=235 height=131 size=13310/ /item XMLDATA; //$simple = str_replace(\n\n, lt;br/ lt;br/ ,$simple); /* trouve moi tous les sauf suivant ceci ... */ $data = $simple; print $data; if(preg_match_all(/\(?:(?:\!|\/|\?|)(?:!xml|!DOCTYPE|!ENTITY|!image|!item|))/,$data,$cbadhtml)){ foreach( $cbadhtml as $key = $myarray){ foreach( $myarray as $key2 = $myarray2){ print pfont color='red'You can't use HTML here so . htmlentities($myarray2) . is not allowed/font/p\n; } } // what html? we exit //exit; } It find all the but doesnt' remove the one that I accept, so how can I find the bad and transform them to lt; ? Thank you and have a nice day. -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Regular expression, parsing bad html in a xml document (strange)
Lazy me, after a short break, alway's helping, I found out wthat it has to be: /\(?!\?xml|\!DOCTYPE|\!ENTITY|image|item|\/item)/ the ?! negate this text, I though that I could put it in every value like this (?!\?xml|?!\!ENTITY ... but no by putting in first he do it for all (k.i.s.s. Francis). Cu Francis Fillion wrote: I'm having problem with regular expression, not a good eek this week it seen like I alway's get a wall of problem. I know that it surely been ask a 1000 times, I look around, didn't find anythings, if you find somethings please point me out. So here what I want to do, I need to parse a xml document , but before to parse it I need to get rid of bad html that I don't want, but the document that I want require some stuff that I need too, so I don't want to get ride of all they HTML. So what I want to do, I already did a little bite of code that get out my good element and check for bad stuff, the only bad thing is that texttext-1 is a good stuff, but I need to change to lt; or it will do bad things with my xml parser. Here what I try $simple = XMLDATA ?xml version='1.0'? !DOCTYPE chapter SYSTEM /just/a/test.dtd [ !ENTITY plainEntity FOO entity !ENTITY systemEntity SYSTEM xmltest2.xml ] item text bad stuff texttext-1 text image title=Ceci est mon titre2 description=Ceci est ma description link=http://www.windplanet.com/; url=http://www.windplanet.com/images/news/988991159.gif; align=left width=235 height=131 size=13310/ text text image title=Ceci est mon titre description=Ceci est ma description link=http://www.windplanet.com/; url=http://www.windplanet.com/images/news/988991159.gif; align=left width=235 height=131 size=13310/ /item XMLDATA; //$simple = str_replace(\n\n, lt;br/ lt;br/ ,$simple); /* trouve moi tous les sauf suivant ceci ... */ $data = $simple; print $data; if(preg_match_all(/\(?:(?:\!|\/|\?|)(?:!xml|!DOCTYPE|!ENTITY|!image|!item|))/,$data,$cbadhtml)){ foreach( $cbadhtml as $key = $myarray){ foreach( $myarray as $key2 = $myarray2){ print pfont color='red'You can't use HTML here so . htmlentities($myarray2) . is not allowed/font/p\n; } } // what html? we exit //exit; } It find all the but doesnt' remove the one that I accept, so how can I find the bad and transform them to lt; ? Thank you and have a nice day. -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] newbie question
Try this : $st = ereg_replace (\+is, and_is, $st); you have to escape the + sign it mean other things then just literal André Weidemann wrote: The ereg_replace for some reason doesn't always work. I tried this: HTLM BODY ? $st = This +is a test; $st = ereg_replace (=+is, and_is, $st); echo $st; ? /BODY /HTML ..and got: REG_BADRPT in b/usr/local/httpd/htdocs/test.php/b on line 5 What is wrong and how can I do what I want to? Thanx a lot in advance, André. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] XSLT - sablot - 4.0.6
I have been looking around for this for all day, now I need your help. I just compiled php 4.0.6 with those extension: ./configure --enable-track-vars --with-gd=../gd-1.8.3 --with-swf=../php4-swf --with-mysql --enable-xslt --with-xslt-sablot=../Sablot-0.60 --with-apxs --enable-sablot-errors-descriptive Then by trying to use the stuff that I was working on before that, since the beginning of one of the first sablot extension, it doesn't work out, the function that I was using xslt_process seen to not work anymore, well not as I want. So I look around and find this from Sebastian Bergmann Coordinate with Sterling, but here you go: ext/sablotron is no longer beeing worked on and ext/xslt is the 'next generation' at http://marc.theaimsgroup.com/?l=php-devm=99454710008416w=2. Then I look in the CVS to see what I can find and I find README.XSLT-BACKENDS in /php4/ext/xslt/ I look at your stuff, well the README and find some help in this: $args = array(/_xml = $xml, /_xsl = $xsl); $xh = xslt_create(); $data = xslt_process($xh, arg:/_xml, arg:/_xsl, NULL, $args); xslt_free($xh); print( The results of the transformation were\n ); print( br\nhr\nbr ); print( $data ); print( br\nhr\nbr ); But it still doesn't work it get me my data, but it print out the xml document first and then my parse result, how come? First, what did I didn't understand? Second, how can I use sablotron as before with the new version, the backend stuff? Well OK, I can live with the change to have more then a XSLT parser, it's good for me, but how do I choose the one that I want, I didn't see any news about this (search around, deja, php site and zend, not much in mailing list except the stuff below), I guess I will have to subscribe to devel mailing list. And is this scary for me This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk. I though that with sablot, it was near production, but it didn't seen so now. Thanks you. -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Variable Next To Variable?
You could use an array: like input type=text name=C_Last_Name[1] Way better this way and you oculd do: $y=1; while($ycount($C_Last_Name)){ if(!$C_Last_Name[$y]){ error stuff; y++; } } Jeff Oien wrote: Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children) { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. Hope that makes sense. Thanks for any help. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PArsing xml document with php
I'm trying to parse a xml document in php and to get in an array, but it sometime give me really strange result. Like if I have: $simple= item test /item; $parser = xml_parser_create(); xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1); xml_parse_into_struct($parser,$simple,$vals,$index); xml_parser_free($parser); It will give me this in $index Array ( [ITEM] = Array ( [0] = 0 ) ) ### And this in $vals Array ( [0] = Array ( [tag] = ITEM [type] = cdata [level] = 1 [value] = *test ) ) What does the * means? Why is it there? Have any other's have experienced any problem with php and xml? Compiled with those option: ./configure --enable-track-vars --with-gd=../gd-1.8.3 --with-swf=../php4-swf --with-mysql --enable-xslt --with-xslt-sablot=../Sablot-0.60 --with-apxs --enable-sablot-errors-descriptive --with-xml --with-dom=/usr/include/libxml --with-zlib ON Apache 1.3.20, php 4.0.6 and redhat 6.2 -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Fatal error: Call to undefined function: mysql_pconnect() in ...
Did you try a ?php phpinfo(); ? to see if mysql is compiled in Matthew Loff wrote: Have you tried a non-persistant connection? Does that work? mysql_connect()? -Original Message- From: Tom Beidler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 3:12 PM To: php list Subject: [PHP] Fatal error: Call to undefined function: mysql_pconnect() in ... I'm working with an new ISP and I'm having trouble connecting to MySQL through PHP 4. Here's some server specifics; PHP Version 4.0.4pl1 Apache/1.3.14 DBA supportenabled Supported handlersgdbm db2 db3 I'm getting the following error; Fatal error: Call to undefined function: mysql_pconnect() in /home/... on line 5 Line 5 is; $connection = mysql_pconnect(localhost,myuserid,mypass) It's a new box so I'm assuming it's something in the configuration. I don't have access to the server so I'm trying to troubleshoot for the ISP. Any help would be greatly appreciated. Thanks, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How do I get PHP's User-Agent?
Just that: $HTTP_USER_AGENT Philip Hallstrom wrote: You could have PHP open a URL that contained the phpinfo(); function and then just look through that... -philip On Wed, 11 Jul 2001, Nathan wrote: I need to create an authentication hash based on the user agent, to connect to a server but I need PHP?s User Agent, which is usually something like PHP/4.0.X. Is there a variable or way to get this? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How do I get PHP's User-Agent?
Oops, I mean get php to open a page that get $HTTP_USER_AGENT and to send it back to you, or to show it to you. Nathan wrote: I need to create an authentication hash based on the user agent, to connect to a server but I need PHP?s User Agent, which is usually something like PHP/4.0.X. Is there a variable or way to get this? Thank you. -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Warning: mail() is not supported in this PHP build
Did you restart your web server? If he is not, it will be they old build that will show, because it will be they old server that will be running. Kyle wrote: Somebody mentioned that PHP checks to see if sendmail was installed when it was installing. Just I have another question, does anyone know where PHP puts everything when it installs? I keep recompiling PHP and Apache, and every time I run phpinfo() it still has the original build date. I tried deleting: /usr/local/lib/php /usr/local/include/php apache src/src/modules/php4/ - Kyle Kyle [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Warning: mail() is not supported in this PHP build in testmail.php on line 1 I don't remember disabling it when I compiled, and I can't find anything to specifically enable it when compiling. I'm running PHP 4.0.6. My sendmail_path is correct in my php.ini. I tried recompiling php4 and apache but it seems that it isn't overwriting the php modules. What files are used? I tried deleting the apache 1.3.20 src/src/modules/php4 folder. Any help would be greatly appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Francis Fillion, BAA SI Broadcasting live from his linux box. And the maintainer of http://www.windplanet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] newbie question
Hello! I am relatiovely new to PHP and I need help with the "fsockopen". Well I use this to check if the server is online or down. But that's not exactly what I wanted it to do. I have this "downloads page" and I am more into detecting if the "remote files" are available for download or not. Can fsockopen do this? If so, how could I do it? And if not, what's the solution I can use? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]