[PHP-DB] PHP 5.1.2 with embedded-mysqli
Hi, I am trying to use php with libmysqld. I manage to compile php on windows 2000 with cygwin because I am used to deal with Unix systems. I have compiled php using --with-mysqli --enable-embedded-mysqli --with-xsl options (cgi version). Then I have tried the php examples in php-src/ext/mysqli/tests/ on a innodb DB that works. With a binary version of php 5.1.2 (doesn't include libmysqld) I can access to the DB without problems using this script (table test on database test is innoDB) : ?php $link = mysqli_connect(127.0.0.1, root, , test, 3306); if (mysqli_connect_errno()) { printf(Echec de la connexion : %s\n, mysqli_connect_error()); exit(); } $result = mysqli_query($link, SELECT * FROM test); while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) { printf (ID: %s Name: %s br /, $row[0], $row[1]); } ? But when I try with my own php with mysqli embedded (on the same DB and mysqld is down) with this script (just tring to connect) : ?php if (!extension_loaded('mysqli')){ die('skip mysqli extension not available'); } $driver = new mysqli_driver(); if (!$driver-embedded) { echo 'Mysqli embedded disabled'; } else { $path = /cygdrive/c/Program Files/EasyPHP1-8/mysql/data; $host = $user = $passwd = NULL; $args = array( --datadir=$path, --innodb_data_home_dir=$path, --innodb_data_file_path=ibdata1:100M:autoextend, --innodb_force_recovery=4, --innodb_log_group_home_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/, --innodb_log_files_in_group=2, --innodb_log_archive=1, --innodb_log_arch_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/, --innodb_lock_wait_timeout=10, --log-error=$path/testrun.log ); $driver-embedded_server_start(TRUE, $args, NULL); var_dump($driver); $driver-embedded_server_end(); } ? I'm getting a seg fault : $ php test_embedded.php 060405 10:35:26 [Warning] Setting lower_case_table_names=2 because file system for /cygdrive/c/Program Files/EasyPHP1-8/mysql/data/ is case insensitive Segmentation fault (core dumped) On the log file (testrun.log) I get this error : InnoDB: Fatal error: cannot read from file. OS error number 17. InnoDB: Error: tried to read 16384 bytes at offset 0 0. InnoDB: Was only able to read -1. I've checked the permissions, everyone has the rights to write/read/execute all the files (on windows/cygwin) Both php (compiled and binary version) have the same innodb options... So what's going on ? Is my own php miss configured ? Thank you very much. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP 5.1.2 with embedded mysqli on windows
Hi, I am trying to use php with libmysqld. I manage to compile php on windows 2000 with cygwin because I am used to deal with Unix systems. I have compiled php using --with-mysqli --enable-embedded-mysqli --with-xsl options (cgi version). Then I have tried the php examples in php-src/ext/mysqli/tests/ on a innodb DB that works. With a binary version of php 5.1.2 (doesn't include libmysqld) I can access to the DB without problems using this script (table test on database test is innoDB) : ?php $link = mysqli_connect(127.0.0.1, root, , test, 3306); if (mysqli_connect_errno()) { printf(Echec de la connexion : %s\n, mysqli_connect_error()); exit(); } $result = mysqli_query($link, SELECT * FROM test); while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) { printf (ID: %s Name: %s br /, $row[0], $row[1]); } ? But when I try with my own php with mysqli embedded (on the same DB and mysqld is down) with this script (just tring to connect) : ?php if (!extension_loaded('mysqli')){ die('skip mysqli extension not available'); } $driver = new mysqli_driver(); if (!$driver-embedded) { echo 'Mysqli embedded disabled'; } else { $path = /cygdrive/c/Program Files/EasyPHP1-8/mysql/data; $host = $user = $passwd = NULL; $args = array( --datadir=$path, --innodb_data_home_dir=$path, --innodb_data_file_path=ibdata1:100M:autoextend, --innodb_force_recovery=4, --innodb_log_group_home_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/, --innodb_log_files_in_group=2, --innodb_log_archive=1, --innodb_log_arch_dir=/cygdrive/c/Program Files/EasyPHP1-8/mysql/logs/, --innodb_lock_wait_timeout=10, --log-error=$path/testrun.log ); $driver-embedded_server_start(TRUE, $args, NULL); var_dump($driver); $driver-embedded_server_end(); } ? I'm getting a seg fault : $ php test_embedded.php 060405 10:35:26 [Warning] Setting lower_case_table_names=2 because file system for /cygdrive/c/Program Files/EasyPHP1-8/mysql/data/ is case insensitive Segmentation fault (core dumped) On the log file (testrun.log) I get this error : InnoDB: Fatal error: cannot read from file. OS error number 17. InnoDB: Error: tried to read 16384 bytes at offset 0 0. InnoDB: Was only able to read -1. I've checked the permissions, everyone has the rights to write/read/execute all the files (on windows/cygwin) Both php (compiled and binary version) have the same innodb options... So what's going on ? Is my own php miss configured ? Thank you very much. -- Jean-Philippe Braun http://patapon.info [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Messenger Question!
http://www.tech-recipes.com/internet_tips1157.html Should help you out I hope Wasn't awfully difficult to source either Method: Step one: Enter google.com.au in internet browsing client of choice Step two: use msn messenger add contact html hyperlink code? as search query Was first result, could have even gone: I'm Feeling Lucky on that one ;-) good luck! ---oOo--- Allowing users to execute CGI scripts in any directory should only be considered if: ... a.. You have no users, and nobody ever visits your server. ... Extracted Quote: Security Tips - Apache HTTP Server ---oOo--- --oOo---oOo-- Julien Bonastre [The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494 [EMAIL PROTECTED] www.the-spectrum.org --oOo---oOo-- - Original Message - From: Chris [EMAIL PROTECTED] To: JeRRy [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Wednesday, April 05, 2006 9:54 AM Subject: Re: [PHP-DB] Messenger Question! JeRRy wrote: Not exactly a DB question but the storing will be done in a DB and using PHP. Anyways with the growing demand of IM's I want to add to my site easy access for people contact me. I could add my Yahoo! username for Yahoo! Messenger and MSN Messenger email address but I want to make it easier for people to add me, most people won't bother doing it the long way. So want I want to do is store my id's to a DB than run a query to fetch the id required than output a hyperlink to the user to add me. When they click the hyperlink it will automatically detect if they have got that Messenger system on their system and if logged in I will be added to the list. If not logged in or have the Messenger than it will display a error. Is there a way to DETECT if they have Yahoo! or MSN Messengter installed? You could through activex or possibly a java applet, but not with php or javascript. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.1.384 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.384 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Messenger Question!
On 4/5/06, Julien Bonastre [EMAIL PROTECTED] wrote: http://www.tech-recipes.com/internet_tips1157.html Should help you out I hope Wasn't awfully difficult to source either Method: Step one: Enter google.com.au in internet browsing client of choice Step two: use msn messenger add contact html hyperlink code? as search query Was first result, could have even gone: I'm Feeling Lucky on that one ;-) Missed that part... That won't tell you what a person has installed on their computer, but I guess you could put both msn yahoo links on your site and the person can click the right one... -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Messenger Question!
- Original Message - From: chris smith [EMAIL PROTECTED] To: Julien Bonastre [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Wednesday, April 05, 2006 9:54 PM Subject: Re: [PHP-DB] Messenger Question! On 4/5/06, Julien Bonastre [EMAIL PROTECTED] wrote: http://www.tech-recipes.com/internet_tips1157.html ... Missed that part... That won't tell you what a person has installed on their computer, but I guess you could put both msn yahoo links on your site and the person can click the right one... -- Yes thats what I do, as was mentioned actually detecting their client is much more of a process, involving actual interaction with client browser software/modules, therefore requiring so many conditions to be met, correct browser type/version, security controls set to allowable level, messenging client in question is actually running and installed as expected by your script, and then of course actually writing this script to check for it. All sounds like too much for as far as I am concerned, if a user can't choose between two or three possible supported messenger clients than they shouldn't have access to a digital instrument such as computer. I hate illiterate computer consumers [yes, not users, consumers, they only become users once they realise you don't NEED a mouse to operate a computer NOR do you refer to the case of a computer as a modem) Anyway, rant aside... toodles! -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.384 / Virus Database: 268.3.5/301 - Release Date: 4/04/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Messenger Question!
Thanks for your response :) Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Not exactly a DB question but the storing will be done in a DB and using PHP. Anyways with the growing demand of IM's I want to add to my site easy access for people contact me. I could add my Yahoo! username for Yahoo! Messenger and MSN Messenger email address but I want to make it easier for people to add me, most people won't bother doing it the long way. So want I want to do is store my id's to a DB than run a query to fetch the id required than output a hyperlink to the user to add me. When they click the hyperlink it will automatically detect if they have got that Messenger system on their system and if logged in I will be added to the list. If not logged in or have the Messenger than it will display a error. Is there a way to DETECT if they have Yahoo! or MSN Messengter installed? You could through activex or possibly a java applet, but not with php or javascript. -- Postgresql php tutorials http://www.designmagick.com/