[PHP] Translation table not working
I cannot manage correct HTML encoding, here is the example from the manual: --- $trans = get_html_translation_table(HTML_ENTITIES); $str = Hallo Frau Krämer; $encoded = strtr($str, $trans); The $encoded variable will now contain: Hallo amp; lt;Fraugt; amp; Krauml;mer. --- If I do exactly the same, I get: Hallo amp; lt;Fraugt; amp; Krämer Ampersand and brackets are encoded, not the german umlaut. I tried some other chars too. Got nothing useable, some chars translated wrong. In fact just few special characters are encoded. Tested on MacOSX and Linux. Got different displays in the browser, but generally the same behavior - the translation does not work properly. If I list the translation table HTML_ENTITIES in the browser, source code shows me the correct encoding... Any tips? TIA, Peter -- 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] Re: mysql_db_name not working (solved)
For those who might run into the same problem in the future: If functions like mysql_db_name are not working and you get no mysqlerr, then most likely your PHP installation is messed up. Maybe you see the same behavior than we: phpinfo shows old and wrong stuff in the first section, i.e. an old servername or the wrong PHP version even if you installed a different one. phpinfo must never show wrong information! In our case PHP is static compiled with Apache, I guess the Apache installation was not clean either. This kind of error is easy to see if you install phpMyAdmin: you do not even get the index page. We finally connected to a running MySQL database on a production server, got the same result and could therefore isolate the problem - PHP or the combination Apache/PHP. We run Solaris 2.8 on a Netra T1 AC200 and we are not familiar to this system yet. And we did more than one installation on this machine, maybe one or more were not correct. Since a complete new install of Apache/PHP/MySQL on a other Sun (X1) worked, we knew what to do: Delete all previous installations of Apache and PHP. Make a fresh and empty /usr/local/ directory. delete all config files you might have in different locations. Unpack the downloads - all latest stable - only with gtar (important!) and compile only with gcc (important!). Now we are up and running, just the PHP library for dynamic image generation could not been installed - we are working on it. Richard Lynch, thank you for your help. Your guess that there are accidently different libraries involved, pointed us in the right direction. Peter Ostry -- 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] Creditcard checksum and identification
Has anyone a PHP Script for the checksum of Creditcards? And a Script which can identify card types based on their first numbers? (VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY) There where a lot of JavaScript pages on the web some years ago, but I have lost my local copies and the pages are vanished... TIA, Peter -- 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] mysql_db_name not working
The command mysql_db_name is not working in our installation. We get no error, but no database listing either if we use this command. - // This is the code which does NOT work: $dbs = mysql_list_dbs(); $num_dbs = mysql_numrows($dbs); for($i=0; $i$num_dbs; $i++) { $db = mysql_dbname($dbs, $i); echo db=.$db.br; } - // And this is adopted code from the manual which DOES work: $db_list = mysql_list_dbs($conn); while ($row = mysql_fetch_object($db_list)) { echo db=.$row-Database . br; } - I tried both: mysql_db_name, mysql_dbname. We need this function to use phpMyAdmin. Solaris 8, Apache 1.3.20, PHP 4.0.6, MySQL 3.23.40 Any ideas why this command does not work? TIA, Peter -- 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] mysql_db_name not working (followup)
The command mysql_db_name is not working in our installation. We get no error, but no database listing either if we use this command. - Now I know more: mysql_tablename is not working either - we tested both commands in a separate file. I wonder what else is not working... phpMyAdmin cannot be used, we get document contained no data and sometimes corrupted pages, code cut off where PHP variables should be inserted. There is a for-loop which displays the db's and tables. The variable $j for example is correctly inserted twice and at the third time it breaks the code and kills the loop. If we work around 'mysql_db_name' and 'mysql_tablename' by using 'mysql_fetch_rows' and remove all JavaScript code from the phpMyAdmin page 'left.php' then we get a correct view in the left frame. But if I click on a link, the game starts over in the other frame :( Solaris 8 on a Netra AC200. Apache is 1.3.20, PHP 4.0.6 static compiled into Apache. We installed the last MySQL for Solaris 8 (3.23.41) We tried old and new phpAdmin's, copying the older version from a running Linux server. Does Apache with static compiled PHP not work on Solaris 8? Since the pages behave really crazy, we think it has something to do with our PHP. Does someone have a similar installation - which versions? Or any help? TIA, Peter -- 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] Re: Solaris/Apache/PHP load problem (solved)
On Dienstag, August 7, 2001, at 12:04 Uhr, Peter Ostry wrote: bash-2.03# /usr/apache/bin/apachectl start Syntax error on line 244 of /etc/apache/httpd.conf: Cannot load /web/libexec/libphp4.so into server: ld.so.1: /usr/apache/bin/httpd: fatal: /web/libexec/libphp4.so: open failed: No such file or directory We solved the problem. Maybe this is of interest for someone: We found a lot of similar error reports in this and other lists. But in our case it looks Solaris-specific. Finally we did not use any predefined packages but compiled Apache, MySql and PHP from sources, all with the gcc compiler. Then Apache refused to start (error with LoadModule). To extract the problem we compiled again: Apache only (static), then added PHP and then Perl. Without any other changes it worked afterwards... (Solaris 8 on a Netra AC200) Peter -- 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] Solaris/Apache/PHP load problem
Hopefully the last hill to climb in our first Solaris installation - Apache cannot load a module: bash-2.03# /usr/apache/bin/apachectl start Syntax error on line 244 of /etc/apache/httpd.conf: Cannot load /web/libexec/libphp4.so into server: ld.so.1: /usr/apache/bin/httpd: fatal: /web/libexec/libphp4.so: open failed: No such file or directory /usr/apache/bin/apachectl start: httpd could not be started Files are there where the error messages says, but obviousely they cannot be loaded. User 'root', group 'bin', permissions read/write/execute for all. Is this a known problem with a known fix? TIA, Peter -- 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] Problem with installing on Solaris 8
We try to install PHP4 on a Sun Netra AC200 (T1) under Solaris 8. After we finally managed to 'configure', we get an error with 'make': bash-2.03# make Making all in Zend make[1]: Entering directory `/usr/share/src/php-4.0.6/Zend' /bin/sh ../libtool --silent --mode=link gcc -g -O2 -o libZend_c.la zend_language_scanner.lo zend_ini_scanner.lo ../libtool: ar: not found make[1]: *** [libZend_c.la] Error 1 make[1]: Leaving directory `/usr/share/src/php-4.0.6/Zend' make: *** [all-recursive] Error 1 bash-2.03# We do not find something like 'ar' in the Zend folder, manual does not mention this problem. Does anyone know how to fix this? TIA, Peter -- 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] Calling a webpage with POST arguments
Maybe this was already diskussed, but I am rather new to PHP... I have to call a page on a remote webserver and include some variables. Since the whole stuff comes from a database and is too long for an URL ist must be done with POST. Can I call a website with POST arguments from within PHP? It's like a webform, but without the user clicking on the submit button. TIA, Peter -- 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]