php,mysqlRelated issues-Collection of common programming errors
Shog9
Jim
php sql-server-2008
What I need to do is to be able to connect to a sql database on a sql server 2008 database using a php script. The script is running on IIS 6 on the same server as the sql server. I am using php 5.3.2 and the command sqlsrv_connect to connect. I am passing this method a user name, password, database, and server to connect to. However when I do I get the error “Login failed for user …….” I do not know if the sql server 2008 is set up correctly or not to accept a connection like this.I have I
rohit
php android video browser mp4
I have recorded video through my app (android application) and those videos doesn’t plays on any of the web browser. Required encoding for web browser is : Video encoding(H264) Audio encoding(AAC)the video being recorded through device camera is : Video encoding (MPEG_4_SP) Audio encoding (AMR_NB)
Sheldon Cooper
php
In the program below$array[name1][0] = ‘name’; $array[name1][1] = ’11’; $array[name2][0] = ‘name2′; $array[name2][1] = ’11’; $fileName = “file.php” $fp = fopen($fileName,’w’); $msg = $array; fwrite($fp,$msg); fclose($fp);In this file “file.php”, i want to write an array…such tha its read like<? $array[name1][0] = ‘name’; $array[name1][1] = ’11’; $array[name2][0] = ‘name2′; $array[name2][1] = ’11’;but its not working , please help
Gajotres
php jquery jquery-ajax jquery-mobile jquery-validate
I have my html page where people can sign up, which calls my php page for checks and inputs to db, If i get an error, for example someone does not select their gender it alerts the user as it should. Problem is if the user does not select there gender and submits again the ajax is called twice now and i get two of the same alert messages, If done once more i get three alert messages and this contiunes growing on every press etc. How can i stop this happening.<!DOCTYPE HTML> <html> &l
Arturo
php facebook facebook-graph-api notifications
I am trying to send a Facebook notification from my app using Graph API Explorer. So I have selected my app, POST, and entered this string after the “/”11093774316/notifications?access_token=430704346948156|HU0ygMtEX11HevODOjheGUikVKg&template=Hello&href=index.phpThe access string is what I get on the “Access token debugger” and I check it is ok.However, I get this error message: {“error”: {“message”: “(#15) This method must be called with an app access_token.”, “type”: “OAuthException”,
ElvisLikeBear
php sql sql-server tsql
I have the following table:USE [junglegymSQL] GOALTER TABLE [dbo].[UserSession] DROP CONSTRAINT [FK_UserSession_UserID] GOALTER TABLE [dbo].[UserSession] DROP CONSTRAINT [DF__UserSessi__Creat__5CA1C101] GOALTER TABLE [dbo].[UserSession] DROP CONSTRAINT [DF__UserSessi__Creat__5BAD9CC8] GO/****** Object: Table [dbo].[UserSession] Script Date: 16/09/2013 3:44:55 PM ******/ DROP TABLE [dbo].[UserSession] GO/****** Object: Table [dbo].[UserSession] Script Date: 16/09/2013 3:44:55 PM ******/
Paul Schreiber
php osx selenium jenkins selenium-chromedriver
Config: Mac OS X 10.8.5, java 1.6.0_65, Selenium 2.37, Jenkins 1.538, Chrome 30.0.1599.101, ChromeDriver v2.6.232908 and Firefox 25.0. I’m running tests using PHPUnit 3.7.28 and PHP 5.3.22 (using PHPUnit_Extensions_Selenium2TestCase).(1) If I manually start Selenium like so:$ java -jar ~/Downloads/selenium-server-standalone-2.37.0.jar -Dwebdriver.chrome.driver=/usr/local/bin/chromedriverI can run tests as expected.(2) However, if I start Selenium via Jenkins:# launchctl load /Library/LaunchDaem
PenguinCoder
php sql-server file-io windows-server-2003
I am attempting to walk a directory (using PHP) and get the modified and created time of the files, updating or inserting as needed to an SQL Server 2003 table. I am using PHP’s DirectoryIterator in order to do this, and it works flawlessly if I only use the object’s getCTime() function. If I move to include or instead use the objects getMTime() method, SQL Server throws out an error at me on insert/update: 22003 : [Microsoft][SQL Server Native Client 10.0][SQL Server]Arithmetic overflow error c
hakre
php nginx debian setup file-copying
I have some code that copies a file to a temporary location where it is later included in a zip file.I already have the source files stored in a local cache directory, and have also stored the SHA1 hash of the original files. The files in question are .png images, ranging from a few kb to around 500kb.My problem is that at high server loads, the copy intermittently fails. Upon examining my logs, I see that even though a healthy file exists in the source location, the destination contains a fil
M. Deinum
java mysql hibernate maven spring-mvc
I am using Spring mvc and hibernate.i have successfully mapping table one to many..but now i want to mapping existing table those are already mapping another with tables..but i want to map it with another table..when i do it..it gives below errorMODELpackage pearson.dashboard.model;import java.util.Date;import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import java
dennis
java mysql connection datasource connection-pooling
I don’t know what is wrong with this code? It throws a SQL Exception: No suitable driver found for jdbc:mysql://localhost:3306/test. But I have included the jar file mysql-connector-java-5.0.8-bin.jarI have attempted to get a connection through a connection pool via datasource.I hope someone could help me to sort out this issue.Please ignore if there are any logging errors I want someone to resolve the connection error that has been highlighted aboveimport java.sql.*;import javax.annotation.Re
BalusC
java mysql hibernate jpa
I have an one-to-many relationship as follows@Entity @Table(name = “reminderheader”) public class ReminderHeader implements Serializable {@[email protected](name = “REMINDER_HEADER_GEN”, strategy = “native”)@GeneratedValue(generator = “REMINDER_HEADER_GEN”)@Column(name = “id”, unique = true, nullable = false)@Basic(fetch = FetchType.EAGER)private long id;@OneToMany(fetch = FetchType.EAGER, orphanRemoval = true)@Cascade(value = { CascadeType.SAVE_UPDATE, CascadeType.DE
marc_s
mysql hadoop hive sqoop
I have the simple hive queryINSERT OVERWRITE DIRECTORY ‘/tmp/test’ SELECT flight, SUM(CASE WHEN ev=2 THEN 1 ELSE 0 END) AS req from data_table group by flight;The output looks like ok (separated with ^A in editor) two numeric columns. I’ve created mysql tablecreate table hive_table(fl int,evs int);Finally I want to export the data from hdfs to mysql with sqoopsqoop export –connect jdbc:mysql://mysqlhost/dwh –username user –password password –table hive_table –export-dir /tmp/test/ –input
Leo
java mysql spring recv
all. I have encounter the problem for some days, this is the detail stack information:org.springframework.dao.RecoverableDataAccessException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 18,940 milliseconds ago. The last packet sent successfully to the server was 18,918 milliseconds ago. ### The error may involve com.tuan800.searchtask.model.dao.mybatis.Relation
Denise Mauldin
mysql ruby-on-rails-3 windows-7 rubygems cygwin
I’m trying to install the MySQL Gem for Ruby on Rails on Windows 7 64-bit. I’ve installed MySQL Essential 5.1.54 Winx64 from the MySQL website. I’ve installed Cygwin, which comes with ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]. I’ve installed Rails 3.0.3 from the rails website. When I do ‘gem install mysql’, it outputs:Building native extensions. This could take a while… ERROR: Error installing mysql:ERROR: Failed to build gem native extension/usr/bin/ruby.exe extconf.rb checki
John Breedlove
mysql ruby-on-rails
My end goal is local development of a Radiant CMS installation. So, need rails and a db to play nice. Previous frustrations with mysql led me to try mamp. I have installed MAMP. It is working. I am open to other avenues though.Tried to install the mysql gem but got no love.john-breedloves-mac-mini-2:~ john_breedlove$ sudo gem install mysqlPassword: Building native extensions. This could take a while… ERROR: Error installing mysql: ERROR: Failed to build gem native extension./System/Library/F
user3351507
java mysql eclipse osx
On my Mac with OS 10.9.1. MySQL is installed thru MAMP (version 5.5.29) mysql-connector-java-5.1.29-bin.jar is downloaded and in the class pathWhen I run the following javasource (on eclipse):import java.sql.*; //The class attempts to acquire a connection with the database class DbConnect { public static void main(String[] args) {//url points to jdbc protocol : mysql subprotocol; localhost is the address//of the server where we installed our DBMS (i.e. on local machine) and//3306 is the port o
synapse
mysql ruby osx-leopard
What do I need to install mysql gem on Mac OS X ? I’m getting error “failed to build native extensions”.
HtonS
mysql dbunit spring-test
I use Spring test DBUnit to test my DB Service and Hibernate. I wrote a simplest test possible:@Test@DatabaseSetup(“dumbDataSample_DBAccount.xml”)@DatabaseTearDown(“dumbDataSample_DBAccount.xml”)@ExpectedDatabase(assertionMode=DatabaseAssertionMode.NON_STRICT, value =”dumbDataSample_DBAccount.xml”)public void testBasic() {}And it fails! Why? It did work before I modified the table (removed some fields, added other, reassigned primary key ) It seem that DBunit compares companyName columns from di
Web site is in building