|
Here is a stripped down version of what I use to authenticate users, it works fine on my php v5.0.2/mysql 4.0.21 server, but fails on my php v5.1.6/mysql v5.0.45 server.
In the code below, should I be aware of anything that might not be supported by the...
Started by Brad on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Look into using PHP MySQL escaping ..
Doesn't work, try putting the following snippet right after <?php :
// Enable displaying errors like that.
|
|
Okay, I've looked all over the internet for a good solution to get PHP and MySQL working on IIS7.0. It's nearly impossible, I've tried it so many times and given up in vain. Please please help by linking some great step-by-step tutorial to adding PHP ...
Started by z3r0p4r4d0x on
, 8 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
I can get PHP-to-host-php-applications....
But I haven't had great success (using Vista).
Roadblock: How do I get PHP to work with ADOdb and MySQL?
It's supposed to work via FastCGI.
A page of information about PHP.
|
|
I'm running Vista 64 box, and attempting to setup Joomla using IIS7 (I like Joomla, I want to have some asp.net components on my web site, so that's why I want to use IIS7 and not Apache). It's my first time installing both php and mysql, so it's very...
Started by Jimmy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
However, running phpinfo from a php file served by IIS does show mysql....
I thought that didn't work at first because running php -info from the command line still doesn't show mysql.
Of using php32 on a 64 bit system.
|
Ask your Facebook Friends
|
I'm trying to get a PHP site working in IIS on Windows Server with MySQL.
I'm getting this error…
Fatal error: Call to undefined function mysql_connect() in C:\inetpub...\adodb\drivers\adodb-mysql.inc.php on line 363
Update…
This link outlines the steps...
Started by Zack Peterson on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I found....
Looks like you haven't got the MySQL PHP...
Check out phpinfo to see if the mysql functions are compiled with your PHP
<?php phpinfo(); ?> with MySQL support, or has not been enabled in the php.ini.
|
|
Hi all, I have a script which calls mysql_connect() to connect to a MySQL DB. When I run the script in a browser, it works as expected. However, when I run it from a command line I recieve the error
Call to undefined function mysql_connect()
This seems...
Started by CoolGravatar on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If that doesn't work, try playing with mysqli and see if it's globally for the entire MySQL portion of PHP if you php cmd version actually has mysql support:
<? php echo php_info() ?>
If not, then....
|
|
$result = mysql_query("SELECT avg(r.rate) FROM rate r where ImgName='1'");
this php is not working.
Originally my code is
<?php $con = mysql_connect("localhost","root","sql"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_...
Started by Vikram Phaneendra on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to get the average....
"</td>";
Your query is producing a scalar rather than a set of rows .
$row['rate_average'].
You can use an alias:
SELECT avg(r.rate) AS rate_average FROM rate r WHERE ImgName='1'
and then output:
echo "<td> " .
|
|
I'm hosting a website on Zymic (free host) that utilizes MySQL. I opened an account, and wrote the SIMPLEST function to connect to the DB. It looks like this:
<?php $conn = mysql_connect("uuuq.com","paulasplace_sudo","mypassword"); if(!$con) { die(...
Started by BBetances on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Often times these free hosts have their MySQL servers.
The code into your post, but you store the results of mysql_connect() into $conn, but the if statement checks a different variably $con...
|
|
I have an extremely simple script with PHP exec , calling mysql command:
$dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'mypass'; $db = 'job'; $file ='job_create.sql'; $mySQLDir='"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql"'; if ($dbpass !=...
Started by Ngu Soon Hui on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If php executes the command directly using something like the exec*() family of api calls rather....
The problem here is probably that
mysql < file.sql
depends on a pipe operation that is facilitated by the shell.
A commandline tool gives.
|
|
This works great in PHP
date_default_timezone_set('my/timezone'); $actualDate = date('Y-m-d');
Now when doing queries, I like to do
INSERT INTO articles (title, insert_date) VALUES ('My Title', now())
The problem with this is the now() in the MySQL is...
Started by alex on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Keeps everything in GM Time so if you move.
I usually set the MySQL server to Greenwich Mean Time, and then use gmdate instead of date in PHP.
To the timezone of the user before displaying it.
|
|
I tried to use WordPress, and it would never work. I have apache and mysql running, the accounts and database are all set up, there are no typos. So I tried to make a simple connection:
<?php $conn = mysql_connect('localhost', 'USER', 'PASSWORD'); ...
Started by Mk12 on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
First....
Not that it helps you much, but in the recent versions (and even less recent ) of MySQL, error code 2002 means “Can't connect to local MySQL server through socket [name-of-socket]”, so that might tell you a bit more.
Mysql.sock".
|