I use Apache 2.2.22 and PHP 5.4.0 with MySQL 5.5.22.
Installed the same page on two of my servers and on one server instead of " there is a #34; displayed.
Apache, PHP and MySQL configs are the same. Why is this happening ?
Look your MYSQL var with :
SHOW VARIABLES LIKE 'character_set%';
If something different between your two servers, modify your my.cnf file.
It was libxml2 issue. I've restored it from default CentOS repo and now it's ok :)
Related
I just did a fresh install of Apache server 2.2.
Everything works. When I go to localhost I get: "It Works!"
I just installed mySQL5.5 and when I go to localhost:3306 I just get gibberish:
J���
5.5.22�'���4[LM{D~p�ÿ÷!�€����������6[I=4/+,9z{|�mysql_native_password�!��ÿ„#08S01Got
packets out of order
I see many posts on the internet with users with similar problems, but I can't figure out a solution.
Can anyone help?
The mysql service is not a web interface - you cannot connect using a browser. You will need to install a mysql client of some kind.
If you try to start phpmyadmin then do it like this:
localhost/phpmyadmin
I'm a jsp beginner.
I have a same problem with you.
I guess it's kind of port problem.
For me, I had set the port for Apache server connector as 9090.
Later, when I installed mysql, the port for mysql was 3306 as its default port.
In my jsp file,
i loaded jdbc driver like 'jdbc:mysql://localhost:9090/dbname'
and then i call 'http://localhost:9090/my.jsp' on my web browser.
That's when I got the same problem with you.
I fixed the port part in my jsp file like 'jdbc:mysql://localhost:3306/dbname'
and I could get it all right.
I think you need to check the port for your Apache server.
You can check out \conf\server.xml file in your Apache directory.
The part starts with "Connector port=8080...." in server.xml file.
If so, you need to put 'http://localhost:8080... on your browser.
Try just to write http://localhost/ without the port and it will work , Or go to your phpmyadmin and click on My websites and it will take you immediately to your localhost
I'm having exactly the same problem, so far I have :
1)Manually changed the Collation (it seemed to be defaulting to cp850)
2)altered the ini/cnf file (located under services.msc -> MySQL)
3)Changed the max_packet_size to 2G
3)rebooted the server.
As a start to this please run this script from MySQL
'SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';'
It should bring up a table of your collations, they should all read utf8
Possible causes
Is there any way to have Cassandra PDO at Windows with Wamp?
This is for development purposes I don't want to install Linux and change all the environment.
https://code.google.com/a/apache-extras.org/p/cassandra-pdo/
I'm using Windows 7 (64 Bit), Wamp 2.5, PHP 5.5.
OK, here's what I found out:
1) It's totally possible
2) The docs that appear in the first google search results are a bit obsolete
Start by downloading the latest Datastax Community Cassandra here:
http://planetcassandra.org/cassandra/
Install & setup properly. In fact, most of the configuration is done by the installer, you just have to edit the apache-cassandra/conf/cassandra.yaml file to find all paths to /var/lib... and change those into something like d:/cassandra/... That includes "commitlog", "data", "saved_caches". Restart the Cassandra service, examine the logs. Mine shown no problem. The OpsCenter at ...:8888/opscenter/index.html was working fine, showing one node online.
Now, the PHP part.
There's a sneaky thing called Thrift. From what I've learned today (I first heard about Cassandra and Thrift yesterday), it's a way describe a binary protocol of connecting to some online service, in this case, to Cassandra. It will basically generate PHP files that will provide all the connectivity you need from PHP itself (no extensions needed).
You will need:
1) The Thrift PHP libs
2) The .exe Thrift compiler
Both can be downloaded here:
https://thrift.apache.org/download
Then use the following command to compile PHP files that will act as a "driver" to connect your PHP applications to Cassandra:
thrift --gen php D:\DataStaxCommunity\apache-cassandra\interface\cassandra.thrift
Put the result in some PHP include_path folder.
Also, find the PHP Thrift libs (in the libs archive from the same download page) and put those in a folder accessible to your script (e.g. include_path or the project folder).
Refer this page:
thrift.apache.org/lib/php
I guess that should help!
I have same problem as you, but when i tried this method, it works correctly for me.
Reference link
Here is a code example, very easy to understand :
<?php
require_once 'Cassandra/Cassandra.php';
$o_cassandra = new Cassandra();
$s_server_host = '127.0.0.1'; // Localhost
$i_server_port = 9042;
$s_server_username = ''; // We don't use username
$s_server_password = ''; // We don't use password
$s_server_keyspace = 'cassandra_tests';
$o_cassandra->connect($s_server_host, $s_server_username, $s_server_password, $s_server_keyspace, $i_server_port);
$s_cql = "CREATE TABLE carles_test_table (s_thekey text, s_column1 text, s_column2 text,PRIMARY KEY (s_thekey));";
$st_results = $o_cassandra->query($s_cql);
I have some PHP files developed on a Linux machine, which I am now working on on a Mac (OS 10.8.2). Pages were not showing up correctly on the Mac, even when they were showing correctly on the linux box. After some investigation, I found that it was because it wasn't recognizing syntax like this:
<?=$var ?>
Anything starting with just a <?, rather than a <?php (not just the var shortcut above, any block of code) is being interpreted as plain text, rather than PHP. On the Linux dev box and production server, the shortcut <? syntax is recognized just fine. I assume this is a configuration thing that I missed during setup, so what did I miss? Can I configure my Mac to recognize this syntax?
The mac is running PHP 5.3.15. The dev box is running an earlier 5.*. I don't know the version on the production server.
Either upgrade to PHP 5.4 (which supports <?= .. ?> all the time), or enable the "short tags" setting in the php.ini file.
These are called short tags.
Edit your php.ini file and set:
short_open_tag=On
I recently set up an AWS EC2 instance and installed Apache, PHP, and MySQL on the 64-bit Linux server using yum
Then I uploaded my php files for my contact form in /var/HTML/WWW
It displays fine except parts of my contact form are being displayed. They are PHP— the PHP tags and the code within them are being shown.
Here is a live example: 23.23.152.36
And here is a version on another server where its working fine.
Does anyone have any ideas why this is happening?
Do you have PHP enabled on your webserver? For Apache, you may need to modify httpd.conf to enable PHP.
Can you run phpmyinfo() on your webserver?
Enable short_open_tag in you php.ini
short_open_tag
Default Value: On
Development Value: Off
Production Value: Off
shorthand notation is on its way to deprication, i wouldnt suggest building code with shorthand notation anymore.
just use <?php echo ?>
You want to change <?php=$name;?> to <?= $name ?>. That's what you need to do if you want to use the shorthand notation.
I have a file named index.php which using a mysql server gets a simple username. The mysql server is running on centOS and I have two different systems running apache serving as web servers.
One is my own windows pc using a "wamp" solution which uses the mysql server refereed before and the other is the centOS server itself.
I use this so I can develop in my laptop and run the final on the centOS box.
The problem is this:
Accessing centOS box I get (on hxxp://centos):
out_sider 1lu�s 2oi
Using wamp on windows I get (on hxxp://localhost):
out_sider 1luís 2oi
The mysql database is configured correctly seeing that both use the same and I used svn repository to move files from windows to centOS so the file is the same.
Does anyone have any suggestions?
Thanks in advnce
My first guess is its probably a locale thing, try adding or updating locale settings of the centOS, or try controlling it from PHP.
str = iconv(mb_detect_encoding(str)/*or insert the encoding type if you know it*/, "UTF-8", str);
and try also:
str = mb_convert_encoding (str, "UTF-8");
Also try connecting and querying the MYSQL server directly, to rule out the fact that it maybe the MYSQL table charset (on centOS) or something.