PHP Standalone: Charset Setting
I'm simply using PHP as a programming language, and I just want to
print some text information to stdout,
but instruction
print "é" (é)
does not print my "e" with an accent in the shell window: wrong
charset.
How to set the correct charset?
View Complete Forum Thread with Replies
Related Forum Messages:
Charset | 2 Charset Codes In 1 Page
I don't know if it is possible without for example iframe but I would like to avoid iframe command : _ I want to output a page divided in two parts <table style="width: 100%"> <tr> <td> ... TEXT in UTF-8 charset... </td> <td> ... TEXT in windows-1251 charset... </td> </tr> </table> Sharing two charset codes in the same page. Any idea how can I do it?
View Replies !
Standalone Problem
I've set up PHP 4 with Apache on an intel/Redhat 6.2 linux box with no network interface. Using URL PHP code with the .php extension works fine, but php code in html documents does nothing. In fact, view source shows the php code on the browser.
View Replies !
Multithreading For Standalone Php
I'm trying to write a mutlithreading server with standalone PHP. Concurrent requests is possible. Normally it is done by handling each socket spawn by serversocket in separate threads. But it seems that there is no thread support in PHP at all. Would anyone give me some suggestions? BTW, is the community considering add thread support to PHP in the future? What is the major difficulty to import an existing thread library (such as pthread library) into PHP
View Replies !
Standalone Program
I'm going to be doing a program for an elderly couple who owns a horse ranch, and wants some software to keep track of all their horses, owners, doctors, etc. I'm going to be writing the program in PHP using a MySQL database. I set up one like this for my work and it runs off of Apache on our server. I need this program to be a stand-alone install, without installing MySQL, PHP, and Apache seperately. How could I go about integrating it all into one package?
View Replies !
Standalone PHP Installation
I have never installed PHP before. It's always been set up for me. I have a client whose site is hosted as a virtual server. I'm trying to set up ecom for him, but the mhash library is not installed. So I use fopen to open a script on my website that hashes the variables. Obviously, this is not ideal because if my site goes down his ecom will too. I asked the tech people at his hosting company to set that up, but they said they don't do custom compilations. "As per compiling PHP with --with-mhash=[DIR] this is how that works: any custom compilations, custom applications, etc. are up to the user to compile and install. Use gcc/etc. to compile PHP with the options that you like. The php.ini in /etc is available for your customization as well. If you compile your own binary of PHP, you can place it where you like (or leave it at the default) and get the paths updated to use it, or you can obviously use it directly if necessary." I was planning on compiling a new, minimalist version of PHP (with just mhash) in a different directory, but I'm hesitant to do it in case I get unexpected results (I don't want to take the rest of his site down). Can anyone tell me if this sounds feasible? What kind of pitfalls can I expect? And can anyone recommend a tutorial? Most of the tutorials I've found assume you have root access and/or are compiling PHP/Apache together. I was also wondering if it would be possible to just compile the mhash library and add it to php.ini? That seems to be the simplest thing, though I don't know if it would work...
View Replies !
Php Install Standalone
I need to install php like standalone. can somebody say me that way to install it like standalone on linux, with support for mysql, apache and oci8?
View Replies !
Standalone Sig Generator
I currently have my sig generator running, the problme Im facing is that it outputs like this http://mysite.com/image.php?sigimage.png I need to have it out put like this -> http://mysite.com/image.png?sigimage.png or something like it because a lot of sites do not allow image.php. Code:
View Replies !
Standalone Apps And Php
I have a project in mind for a library management system which I would like to try building with php/mysql. Are there any Delphi-like IDE apps out there that would do the job? Can the code be compiled into an executable?
View Replies !
Standalone Solution
I was asked to write a database solution for a friend.. it was supposed to do the normal add/retrieve/modify/search functions of a databse. i started with vb6 then decided to use php/sql. I might sound really dumb and ignorant but the question is... if i want to "package" this to him... how can i do this without having to personally go and install a webserver and php and sql and the rest so he can use it just through his web browser? can i use an installer that will allow it to be packaged so after the install he would just have to open the databsae through his browser?
View Replies !
Standalone DB (like Access) For PHP/Apache
I am in the process of translating an WIndows/ASP/MsSQL Content Managment System (CMS) to Linux/PHP/???. Is there a popular database I can use that will allow standalone files like Access did (which used .MDB files)? In order for the CMS to work, there needs to be a standalone database file that is self-contained, just like Access .mdb files are under Windows. I guess I am asking for an Access equivalent for Linux/Apache.
View Replies !
Standalone Executable File
I downloaded the tarball and while was able to compile within PHP with no problems, I am having memory timeout issues involving image manipulation with extremely large images (800K - 2mb). Requirements are to create thumbnails for even these banner-sized images, but PHP + GD + [huge image] = too much memory. I'm trying to prove that it is undoable, though the suggestion was to do a command-line GD call to the image instead of using the PHP functions to do so to save some memory; if it still times out, then it's undoable altogether. However, I cannot find the standalone executable file that will ensure I can run GD from the command line.
View Replies !
Submit Standalone Programs With Php
I'm building an application which submits scheduled php jobs. The way I would like it to work is to have one php program to submit the other php programs on a scheduled basis. This control program shouldn't have to wait until one job finishes before it can start the next one; instead, it should be able to submit all the jobs in one go, but it also needs to be able to be informed of the return codes of the submitted programs so dependent programs can be submitted too. I've looked at the exec() and system() commands, but they either don't seem to allow return codes to be returned from a submitted program to the submitter program or they unconditionally print anything the submitted programs produce.
View Replies !
Where Can I Find The GD Library Standalone Executable File?
I downloaded the tarball and while was able to compile within PHP with no problems, I am having memory timeout issues involving image manipulation with extremely large images (800K - 2mb). Requirements are to create thumbnails for even these banner-sized images, but PHP + GD + [huge image] = too much memory. I'm trying to prove that it is undoable, though the suggestion was to do a command-line GD call to the image instead of using the PHP functions to do so to save some memory; if it still times out, then it's undoable altogether. However, I cannot find the standalone executable file that will ensure I can run GD from the command line.
View Replies !
Charset
I'm a newbee, also in english. The thing is that I have a kind of javascript based search engine that use a .txt as its database, it has several field delimited by tabs. What I want to do is using the same application to diferents projects. I just change the look, the datas and I have another beautiful serach engine. How I don't know much about javascript, I made a PHP script that builds a .txt with identical structure to the one I have just explained and fill it with the datas. But It doesn't work. I have noticed that the javascript says anywhere something about "unicode" charset. The PHP script make a entirely new file each time from a Access database, I do this because I needed to modify some database content in some fields, and I think that It doesn't use the same charset that javascript. I belive this because I tested to paste same records directly from txt formed by PHP script to original txt and when saving WordPad tell me something about that I'm saving without format and I am going to loose any format issue. And after this, I could see throught the serach engine the records pasted in the txt. I am using WinXP, Nusphere, Dreamweaver, etc, everything in spanish (so the charset, I think It is ISO LATIN number-015, with Euro, I'm just guessing)
View Replies !
Mssql And Charset
I use the MSSQL function for connecting to a MSSQL database but i have a problem with the charset. My database is in SQL_Latin1_General_CP1_CI_AS and the result of the query with special char are false (ex : é ->S or à->Ø) How can i define the charset of each query?
View Replies !
CHARSET (PHP & MySQL)
I saw that there was some writing about it but nothing helps I have hosting in some firm in US. I set ma database charset to windows-1250. I also set all tables to that charset. Insert with phpmyadmin works fine but when I use php, as output I get strance chars. When I use php to enter data insted of special chars I get "?" or none. Its strange for me becuase when I use SQL trough phpmyadmin and execute script that insert rows all data are inserdet right! Do I need and can it be done to setup charset for PHP. I dont have admin privilegies on server :)
View Replies !
Problem With Charset
i've some problem to print to screen and save date in mysql if the entries contain char like à,è... i try to read some post but i'm not able to solve my problem. i use easyphp 1.8 with apache 1.3.33-php 4.3.10-mysql 4.1.9 SO:windows vista home premium in php.ini i've: default_charset = "utf-8" in phpmyadmin i can read: language: italian (it-utf-8) char set: utf-8 unicode (utf8) collation: utf8_unicode_ci int hte browser meta tag: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> the table structure is: id int(11) question varchar(255) utf8_general_ci answer text utf8_general_ci so if i make select * form table where 1, the output on screen is: 1. abad?? Modify (hope that you see 2 squares after abad it would be abadà) 2. academia Modify 3. agog?? Modify (hope that you see 2 squares after agog it would be agogò) clicking on modify appear a form with a text box and a text area and the strange is that in the form i see the right char. in mysql the data of the table are abadà academia Agogò
View Replies !
Eclipse, Charset And PHP
I'm trying to internationalize my PHP code, but some of the ISO-8859-2 characters don't show in the browser. I'm namely trying to use Croatian and Russian, and some of the characters show and most don't. I did the header (that's the one for Croatian) header("Content-Type: text/html; charset=iso-8859-2"); but it doesn't work. When I type my strings in Eclipse it is all fine and I see all the characters that I want. Is it maybe an Eclipse setting I need to worry about? What am I missing? It is not the browser, as I can see all the Croatian/Russian pages just fine. Server maybe?
View Replies !
Charset And MS SQL Server
I use php on a windows XPpro and a MS SQL Server 2000 The result of the query are different of the content of the table example : in database : protégé in the HTML doc after the mssql_query : prot,g, the database is in "SQL_Latin1_General_CP1_CI_AS" COLLATION_SEQ and i don't know the charset equiv If anyone know the response for me or another solution?
View Replies !
Excel And Php Dom Charset
i use a simple script for decoding excel exported xml. But i have problems with my encoding (windows-1251). Here is the code i think i got it from ibm dev network and its pretty simple just trying to get it working: Code:
View Replies !
Charset Problem
I am having charset problem at the moment, if i try: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> some of the character which are in Tarkish language don't work and if i use: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> others don't work. I even tried: utf8_decode() utf8_encode()
View Replies !
Default Charset
When not specifying the charset in a php script, which one is used by default? A php server seems to have a default charset setting (see phpinfo below of my host's server). Code: php core default_charsetno value Apache Environment HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP Headers Information Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP Headers Information Content-Type text/html; charset=iso-8859-1 Though this one seems to have a default charset setting of none, does the http headers information mean that any website or php script accessed with the browser's address bar gets a iso 8859-1 by default anyway?
View Replies !
MYSQL Charset
i'm building a blog for my personal website with MYSQL , the language i used is Vietnamese , when i use PHP connect to MYSQL and mysql_fetch_array , it displat ? mark ! I think it's charset error . I've check PHPmyAdmin but PMA display the charset is OK ! Here is the picture. The first one is MYSQL Record Table , the second is PHP Display . Some charater like #xxxxxx displays ok ( HTML Special Char , not a function ) , some words like co' -> PHP Display ? .
View Replies !
Charset Conversion
I am trying to read and display data from a mysql database. The data stored in the database is i think UTF-16. It is all hexadecimal numbers. I need to convert these numbers to normal fonts that we can read and convert the normal fonts to UTF-16 which are hexadecimal numbers.
View Replies !
Debugging Charset
We've been building a pretty big web app here for internal use. SMS text messages come in from an aggregator and are stored in a MySQL 4 db. Our operators then deal with them using a web interface. The db is queried using PHP4 and the results output as XML which is then transformed using XSLT into XHTML. Now, in our testing environment everything works just fine. However, when we try and run it with actual live data, any incoming SMS message that contains a non-ASCII character breaks the system at the Sablotron stage (invalid token). Now the aggregating service is sending us the incoming messages UTF-8 encoded. The XML and XSL is all set up to be UTF-8. However, somewhere along the lines something is getting screwed up so that Sablotron barfs (typical examples are pound signs or euro signs). I'm having a hard time debugging this because as far as I can tell everything is set to be using UTF-8 by default. Clearly something isn't (MySQL possibly). I'd really appreciate some pointers for things to check.
View Replies !
Change Charset?
After installing WAMP 1.6.1 I have problems viewing pages (phptogalleries) that necessarilly use folder and file names written with CE special characters supported onlz bz charset windows-1250. How can I change slovak-utf-8 to windows-1250?
View Replies !
PhpMyAdmin - Problem With Charset
I have problem with charset in my Mysql database. server 1(localhost): Mysql version 5 with php5 MySQL charset is UTF-8 Unicode (utf8) MySQL connection collation - latin2_general_ci server 2: Mysql version 4.1.8 php 4.3.10 MySQL charset is UTF-8 Unicode (utf8) MySQL connection collation - latin2_general_ci As you can see both servers have same charset configuration, so here can't be any problems. When i'm trying to dump data from one of the table from my db ( server 2 -> server1) in result mysql gives me strange symbol. For example "£(from polish alphabet) replaced by?". I'm from Poland so i'm trying to use ISO-8859-2 charset style. In my PhpMyAdmin configuration file i have: /* From config.default.php */ $cfg['DefaultCharset'] = 'iso-8859-2' My apache 2.0 get on well with words like £,¹,¿,Ÿ... If you can give me some advice(s) please reply for this post.
View Replies !
Unknow Charset In Database
This problem of charset support seems to annoy many people, and I haven't found a solution so far. Our php.ini as well as page content type charset are iso-8859-15 (for support of Euro sign). In a form, users sometimes paste text written first in MS Word (even if I was not aware of this at first). Each input is html_entitized before INSERT in the MySQL database. It seems however that some browsers overwrite the charset encoding of the page, so that I'm not sure what the charset encoding of the input really is. But since I was not aware of the problem, I haven't checked the input on that. Anyhow, input validated error checking, and was written in database. Here again, I have no idea with which encoding. At least, I've seen that the charset Index of our MySQL version has no cp1252 nor utf-8, even if I'm not sure if that's an issue or not. Also, when looking at the content in MySQL, some of the "odd" MS Word characters are no entities, but just glyphs. Anyhow, when retrieved from database and echoed in a webpage, these are replaced by a "?", meaning at least that they are outside the iso-8859-15 repertoire. Trying to be smart, I did a utf8_decode($string); on a sample, but still got the "?" instead of curly quotes, em dashes, ellipsies etc. utf8_encode made it even worse! Even a mb_convert_encoding($string, "iso-8859-15"); on the same sample did not cure the problem, and also returned "?" as substitute character. As for pasting the "odd" sample in an input field and check that, this will not teach me much, since my configuration has nothing in common with the ones of our users around the world. I even know of someone dealing with Russia having an old French version of MS Office, enabling Cyrillic encoding, all of which is running on a Mac! God only knows what charset that might send through the browser when pasting text in a textarea. I also tested on just a sample, because the "oddity" can be nested into a very big text, and not always near the beginning of it. The problem has two sides: - first, I should find a way to echo correctly what's already stored in database; - second, I should find an efficient way to identify and convert 100% of the "odd" characters, so as to keep ALL of the input inside the iso-8859-15 repertoire before sending it to the database, to avoid further pollution. Even the very extensive explanations of ergophobe and some of his code samples did not help to solve this.
View Replies !
Scpecial Chars - 'Ãi' To 'á' - Charset
I have a sql table that contains files saved with special chars i think, for example, 'AmapÃi', where we expect 'Amapá'. When i debug my var on phped, i see 'Amapá' and when i look at any browser, netscape or IE i see 'AmapÃi'.
View Replies !
Convert STRING Charset
I have a MySQL database, which stores data in UTF-8 Unicode format. I have a webpage which has a form where I enter data to store the information and the CHARSET for that page is ISO-8859-1 (latin1). When I fetch data from my database on a page that has the CHARSET ISO-8859-1 the output is great! But when I now from another page has UTF-8 Unicode CHARSET set and fetch data from the database, some of the characters are messed up (like the Swedish Å Ä Ö characters). My question follows: Can I with PHP, fetch text from my database into a STRING and then "convert" from ISO-8859-1 to UTF-8 Unicode before outputting it to the page which has CHARSET UTF-8 Unicode? OR Do I have to "loop" through and replace "bad/wrong" characters into UTF-8 Unicode, and if so, HOW?
View Replies !
Charset And Special Symbols
So my language includes symbols like č,š,ž etc. Now I'm not so sure how to input them, I set charset to UTF-8, collation in db is utf8_unicode_ci but symbols get converted to some strange ones in db. So I was wondering that I convert them into ascii (č, š,ž) so that I can process them. How should I do this? if I use html_entity_decode(), then I need to change charset to iso-8859-1, which isn't big problem, but the thing is that all symbols are not converted, symbols like š, ž etc... I checked around and I looked into cms drupal and now I'm wondering how did they managed to use utf-8 charset, but still inputs stay unchanged, so if we insert č,š,ž it shows č,š,ž in database and this would be perfect for me.
View Replies !
Mssql Charset Conversion
It looks like I am having a problem reading in the ' and " from a MS SQL database. I am assuming this is because they really are "smart/curly quotes" I have everything that I can think of set to use utf-8 but I am still getting errors thrown in my face. I am new to this PHP thing and have not had any problems with mysql db's before, but I have to get my app to work with MS SQL until they get around to porting it over to mysql.
View Replies !
Charset - Display All The Values
I have developed my site in the charset iso-8859-1 . later my client asked me to change the charset to UTF-8 .. in My databse the previous values are stored in the format "iso-8859-1" now newly stored values are UTf-8 format. In the common page (UTF-8) i have shaw the all the values at that time it have faced the problem newly stored values return the correct format but previous values are not shown in the correct format. I have used the htmlentities() function to display the previous values in correct order but the new values are changed by using the function. I need to display all the values in proper.Please any one give the Best solution for the questionnaire.
View Replies !
Email Charset Problem
The problem i came across is that i can't quite send an email with greek text on it. In gmail or in outlook, the email appears correclty. But in hotmail and yahoo, the email appears in funny characters, which of course can be fixed by changing the encoding of the page. Also, after change the page encoding, i can read the subject of the email correclty, except in outlook inbox where it is scrambled always - no matter what. The email content and subjest appears correctly in outlook email preview screen. Code:
View Replies !
MySQL Charset Issue
I am doing a project and some of the database information is being displayed in the borwser as a tilted box with a question mark inside. Does anyone know what I should set my charset to be to avoid this? The website will be for us residents.
View Replies !
Charset Translation Table
I'm trying to convert some charactors with htmlentities(), but by checking PHP Code: print_r(get_html_translation_table(HTML_ENTITIES)); find it's very limited charset. Is there any way that I can add more to this convert table?
View Replies !
Standard Html Charset?
I'm not quite a HTML newbie but this is a newbie sort of question. Just something I haven't bothered checking out until now. What is the standard HTML charset (you know like iso-8859-1 etc.)? The website is for an English speaking market so US, UK mostly.
View Replies !
Charset - Grabbing Data From The Database
Im grabbing data from the database, which has the utf8_general_ci mysql collation. the problem is that special spanish characters like: "párrafo" print themselves like "p?rrafo" Why? How could i fix this? Im already using this header: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> When i check the data in myPhpMyAdmin it has de "párrafo" value... but when i print it i only get p?rrfo. BTW, im running my apache on Windows and already installed the iconv extension.
View Replies !
Problem With Php, Json, Browser, Charset
I am having a problem that is occuring when using php, json, utf-8 charset and IE7. It sounds like a browser (thus client side) problem but since it is occuring on a php driven website, I think the best help I can get is here. Given: webpage (valid XHTML, utf-8 charset) with form (I use the YUI dialog), using javascript I collect all the user input on the form,...
View Replies !
Special Characters - Charset Problem
When opening a html file with include() my page does not show special characters, instead it shows something like "?" I've already saw a document about this and I got to the conclusion that is some charset problem... but when reviewing my html code I noticed the following line: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> So I guess it's not this charset problem... or is it? What's wrong?
View Replies !
Default Charset And Collation Sequence
I have been trying to figure out what charsets and collation sequences I need. For some reason phpmyadmin (running on my local machine) insists on giving me defaults of latin1_swedish and I can't seem to tell it how to give me something else as default. The problem with the swedish is that a query involving LIKE eg select * from dogbreeds where breedname like '%beagl% seems to fail with latin1_swedish . But if I change all the columns to UTF_8 it works OK. So, my question a) is there any reason why I should not use UTF-8 as the default? b) any clues as to how I can make phpMyAdmin or mysqlAdministrator see that as the default for each table and the database?
View Replies !
Force String Into ISO-8859-1 Charset
I'm developing some code that used a SOAP call to insert records into a remote database. However, the SOAP call is reliant on the string fields in the inserted record being of character-set ISO-8859-1. If it encounters another type of character, the SOAP call throws an 'illegal token' error. The problem is that the these strings can sometimes be of various other charsets (they are received, mime-decoded email bodies). Code:
View Replies !
Chinese Characters (charset Big5).
I have a web page contain Chinese characters (charset big5). If I name the page as mypage.html.big5 or mypage.big5.html then the browser can identify the charset automatically. However, if I add "<?php echo <<<END ...mydoc here ... END; ?>" and name my page as mypage.php.big5 or mypage.big5.php ... well it doesn't work. How can I make php or Apache to understand file extension .php.big5 or big5.php.
View Replies !
Charset Problem, Data From Mysql Appear Wrongly
I have build an application with php/mysql on my localhost Windows XP (english) My application lets you select the language which at the moment is Greek and English. My application is working fine on both languages but when i uploaded it to a remote server greek doesn't work. Actually the greek that are stored in the DB come up wrongly. I have read many other posts regarding this problem and i have tried many things but none works. First of all, i have checked that both mysql servers have the same character_set and character_set variables, so the remote DB supports Greek. Here is the code that initializes the DBConnection $DBLink = mysql_connect($DBHostIP,$DBUserName,$DBPassword) or die ("Could not connect on MySql Database"); mysql_select_db("sarafian_Agenda") or die("Could not select database"); which resides in a function. This was the original code with which only on my server worked in conjuction with the correct character set in the header part of the produced html Having read some articles i decided to try this code in the function $DBLink = mysql_connect($DBHostIP,$DBUserName,$DBPassword) or die ("Could not connect on MySql Database"); mysql_select_db("sarafian_Agenda") or die("Could not select database"); mysql_query("SET NAMES 'iso-8859-7'",$DBLink); ini_set('mbstring.internal_encoding','iso-8859-7'); ini_set('mbstring.http_input','iso-8859-7'); ini_set('mbstring.http_output','iso-8859-7'); ini_set('mbstring.internal_encoding','iso-8859-7'); header("Content-type: text/html;charset=iso-8859-7"); iso-8859-7 is the charcter set for greek. I have tried various combinations for the iso-8859-7 with utf-8 but i had no luck. I really cant understand the problem. The curious thing is that phpMyAdmin presents the data correctly. I have tried tracking down how it does it without succes. Both databases are above the 40010 version that phpadmin checks.
View Replies !
Missing Charset Or Bung Server Settings?
I was wondering if some one could take a look at the two example server outputs below, and help me understand what is wrong. I'm getting garbled characters. The php script I'm developing delivers XML to a client side application I'm also putting together in VB.NET .. Example 1 is my development PC.. It has a recent build of PDP & Apache. This output is good. Example 2 is the production server and is adding all sorts of strange characters, that are causing the XML to be invalid. I'm thinking it has somthing to do with the lack of charset in Ex2.. perhaps. If that is the case can I specify it in the .htaccess file because I dont have direct control over the production server. Has any one seen this before?
View Replies !
|