Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Enabling/Disabling InnoDB With Default Mysql Installation.


If you install mysql and find innodb table type is not available,
follow these steps.

find my.cnf file. usually my.cnf file resides in "mysql/bin" folder.
Then search for "skip-innodb", if you find the line then comment it as
"#skip-innodb", then retart you mysql daemon.

Thats it

To disable, uncomment "skip-innodb" or start mysql daemon with
following command

mysql --skip-innodb

thats it.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Overwrite Default Php Installation
On my linux system php seems to have been installed by default. When I
type:

"which php" it tells me /usr/bin/php

I installed php and it has put an executable in the /usr/local/bin/php

"which php" still says /usr/bin/php

"whereis php"
php: /etc/php.ini /usr/bin/php /usr/local/bin/php /usr/local/lib/php
/usr/local/lib/php.ini

/usr/local/lib/php -v shows the new version but php -v shows the old
version.

How can I correct this problem?

I want to run the command php -v and it shows the newest version.

I have already tried removing /etc/php.ini /usr/bin/php

[ot] Listing Foreign Keys In MySQL On InnoDB
I use mysql 5 with innodb engine.
When I create a table like:
create table tbltest(
testid int(10) UNSIGNED NOT NULL auto_increment,
artid int(10) UNSIGNED NOT NULL REFERENCES tblart.artid,
PRIMARY KEY (testid)
) ENGINE=InnoDB;

Works fine.
If I insert a value in artid that doesn't exist in tblart, mysql produces an
error as it should do.

Now if I want to find out about the tablestructure, like this:
SHOW CREATE TABLE tbltest;
mysql just shows the create table syntax, BUT without the FK-constraint.

When looking through the documentation I only found SHOW TRIGGERS, but that
also doesn't list the FKs.

I must be missing something completely in the docs. :-/
How can I ask mysql which Foriegn Keys it has?

Disabling Html Code In Inputfields In Php/mysql
How can i disable html-code-input in my php-guestbook?

Problem On Default Value : : MySQL
Problem on default value : : MySQL

I am facing problem in this line

`datetime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

when I tried to crate a new table in MySQL(version 3.23.47-nt)

Default Value To Insert Into MySQL
What should I insert as the default value if a form field is blank? My fields don't currently accept null.

if($_POST['height']) {
  // error checking
  $height = $_POST['height'];
}
else {
  $height = '';
}
Should $height be equal to '', NULL, or maybe 'NULL'? I'm thinking 'NULL' incase I or someone else decides to change the field to accept null?

MYSQL: How To Set A User's Default Database?
Is it possible to set a user's default database for MySQL database?

Instead of having an additional line of command, i.e:

mysql> use database <database_name>

Perhaps there are parameters I can set up a default database for a user when
she log on to mysql.

Mysql - DEFAULT '' Defined Yet NULL Inserted
My database was inserting NULL for empty strings so I changed the field
definition with this query:

ALTER TABLE `myTable` CHANGE `myUrl` `myUrl` VARCHAR( 255 ) NOT NULL
DEFAULT ''

No error was reported following the query and yet I still get NULLs on
insertions.

MySQL Datetime Field Default Now() Fails
I have a mySQL database table with a column field datatype of datetime that
I set up in the original create table statement like this:

create table nnet_usermetadata (
....
nnet_record_entered datetime default 'now()'
)

However, upon execution, each time a record is entered into
nnet_usermetadata the results are:

00-00-0000 00:00:00

Is there a way I can always ensure that the current date and time are always
entered into the datetime field?

Installation (MySQL, Apache, Perl, And PHP)
I just installed MySQL, Apache, Perl, and PHP, and am having some issues with PHP. I am not really sure if it is loaded correctly. When I execute apachectl restart, it responds that the server is restarted, but a test html page with the tag <phpinfo ( )?> does not produce any specific output. Is this a correct test page, or how else can I test that PHP is functioning as a Apache DSO?

MySQL/Windows Installation Question...
Just upgraded MySQL on my development machine to 4.1 and get the familiar
error "Client does not support authentication protocol...".
A bit of Googling learns this is expected behaviour and all clients in use
should be instructed to use the new protocol (including PHP). However, on
none of the hosts used for hosting client sites this has ever been a problem
yet (most still use 3.23...) and I don't want to be obliged to change things
everytime I move a finished site from my machine to the clients host, so I
prefer to stick with using the old password.

This is possible: the documentation tells me to just start the service with
'mysqld --old-passwords' as option.

However, as per the registry, MySQL starts automatically as a service when
windoze starts. Without this option. Now every restart of the machine I can
stop the freshly started mysqld service and start it again with
the --old-passwords option but it should be possible to do this leaving the
appropriate info in the registry. Anybody 'been there, done that'? Where to
put what in the registry with this effect?

InnoDB Autocommit And Locks
I have 2 questions regarding InnoDB tables:

1. In the MySQL manual, it states that
"MySQL begins each client connection with autocommit mode enabled by
default. When autocommit is enabled, MySQL does a commit after each SQL
statement if that statement did not return an error."

Does using BEGIN override this behavior? In other words, with
autocommit on, does BEGIN open up a new transaction and stop committing
until an explicit COMMIT command? Or do I need to turn autocommit off
before multi-query transactions?

2. I have been reading the examples for LOCK IN SHARE MODE and FOR
UPDATE in the manual, but I am still confused as to when I should use
one as opposed to the other. I have gone through tutorials but many
just use the same examples as the manual. I'm sure I'm just missing
something small, but if someone could give a simple example of the
difference between the two, that would be very helpful as the difference
to me seems very suttle.

Database Stores Default Number Everytime, But I Havent Set A Default Number??
Im having some problems with my database. Everytime i store a number which is longer than 10 numbers the script or database puts this number into the database: 2147483647. Its does this everytime no mather how i write the numbers and nomather how long the number is, it just needs to be over 10.

I have set any default value in the database and to be sure i havent i tried deleting the table, but same thing happends again???

PHP5 Installation With MySQL, Windows 2000
Why I still have "undefined function error" messages?


I included path c:php to my windows env.
Edited php.ini file: include directory value. removed comment mark
from extension=php_mysql.dll
copied libmysql.dll to system32 directory
Apache2 runs fine.
I can run phpinfo.php
I can create a database into the MySQL.

Fedora 4.0- PHP 5 - MYSql 5 -Apache With 64 Bit Installation Help...[URGENT]
Can anyone help in installation of Fedora 4.0 , PHP 5 and MYSql 5
with Apache webserver I want to install 64 bit version of all because I
bought new PC with 64 bit supporting. Please provide me help where I
can get step by step information about installation of all above and if
necessary give download link also. I tried myself lot but not
successfull.

I have 64bit fedora 4.0 which is installed from fedora site.

Guide me soon if possible I need to start project in PHP 5 and MySql 5.

PhpMyAdmin InnoDB Insert Into BLOB?
Anyone ever used InnoDB storage engine and try to insert into BLOB fields with phpMyAdmin. For some reason it won't do it, due to some guess at a row count?

Strange Behavior With Phpmyadmin And Innodb Tables
I recently converted all my existing MyISAM tables to InnoDB tables
through phpmyadmin. I noticed some strange behavior whenever I would
refresh the screen, as phpmyadmin would report different numbers for the
cardinality of the primary key (i.e. one minute it would say cardinality
388, then 244 on refresh, then something else), and it would report
different values for the number of rows when mousing over the table
names on the left menubar. This behavior only seems to exist on tables
with a "larger" number of rows, and by larger I only mean ~100 or more
rows (tables with fewer rows always report the correct number of rows).

Whenever I do a SELECT *, I get the correct number of rows returned, so
I know they are actually there.

MyISAM Vs InnoDB And Collation Latin1_swedish_ci And Utf8
1.)what are the pros and cons between MyISAM vs InnoDB?
2.)what is the difference between Collation latin1_swedish_ci and utf8?

Disabling SOAP PHP 5.2
How do I go about disabling SOAP extensions  with php 5.2? Is there a simple edit to php.ini? I am trying to use NuSoap and am getting a conflict problem.

Disabling The Back Button
I have a form that is to be filled. The summit button call a php script that populates a database. Is there a way to make sure that if someone click on the back button on the browser they do not get a chance to send the same form again.

Disabling The REFRESH BUTTON?
I have a page: customize.php

The page has two submit buttons using CSS to give them an image.
<input type="submit" name="AddToCart" src="../images/customize_addcart.jpg" class="AddToCart" value="" alt="Add To Cart">

<input name="PriceUpdate" type="submit" class="PriceUpdate" value="" src="../images/customize_updateprice.jpg" alt="Add To Cart" />
At the top of the page. I have an IF STATEMENT that will determine which BUTTON has been clicked on.

If the "AddToCart" button has been clicked > The information is sent to the Shopping cart and and page is redirected to cart.php using "header function"

When the user clicks on the "PriceUpdate" button the page will recalculate the total price based on the selections from the POST variable...

PROBLEM IS: Once the user clicks the "PriceUpdate" button - if they click on the refresh button on their browser window. A warning ALWAYS comes up saying:
" The page can not be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page you were trying to view. "

How can I make is so this message will not occur
-OR- Bypass this message
-OR- Just make it so that the Refresh button on the browser does not do anything if clicked.

Disabling Oracle Triggers With PHP
I'm using the PEAR database abstraction (MDB2) to access Oracle 9i.  The PHP application is interacting with Oracle to execute Oracle Procedures.  In one procedure the logic includes disabling triggers before deleting data from the table.  The delete statement works, but the alter command to disable the trigger fails.  THe procedure works if you call it outside of PHP.

Anyone ever have problems with PHP call ALTER commands and/or disabling triggers?

Disabling Enter Key For Form Submission
Could anyone please help me with tips on how to disable a ENTER key, so that a form is submitted only when the designated button for submission is clicked.

Disabling The Built-in POST Handler
I need to handle very large file uploads and push the data into a socket.
Having php to write everything to a temporary file, then reading it
again inside the script and pushing it into the socket is very inefficient
and imposes size limitations to the uploaded files (which may reach GB
in size)....

Disabling View Source On Pages
what's the best way to protect source code on a page? I.e. not permitting the right mouse click to view source or properties.

Detecting/Disabling Back Button Using PHP
I was wondering if there is a way to disable or detect when a user presses the browser back button in PHP.

What I want to do is that when a back button is pressed, the page reloads.

Please let me know if there is a way to do this. If any of you use modernbill, it has that feature.

Enabling PHP Error Log
I'm working on integrating some PHP code into a website hosted by
catalog.com. It appears that PHP error handling is disabled. Other
hosting services (that I have worked with) have this turned on such that
when an error occurs in loading an HTML page, the error message is
displayed to the screen.

I've added "error_reporting(E_ALL);" to my PHP code and it has not made
a difference.

What must I do to enable this behavior?

Enabling Sockets
I'm running windows.

My php.info contains the following

But how do I add the enable socket directive?

I uncommented the socket extension line in php.inf, to no avail.

System Windows NT EWHSERVER142 5.0 build 2195
Build Date Sep 5 2005 15:50:13
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Server API ISAPI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:phpphp.ini
PHP API 20031224
PHP Extension 20041030
Zend Extension 220040412
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp

Enabling GD Support
how to create graphics using PHP. i tried calling a function:

<? $image = imagecreate($ButtonWidth, $ButtonHeight);?>

when i trie to call the 'imagecreate()' function i am getting an error, something to the effect of "function not defined". how do i fix this? is this because my current configuration of PHP does not support the GD library?

Enabling InteBase For Php
how can i enable InterBase support in php.ini.

Enabling Register_globals
I am working on a project using PHP. I would like to know how can i enable the register_globals on my machine.

Enabling Gd On PHP5
I don't seem to have gd or gd2 enabled on my Fedora Core 5
installation of PHP5. I yummed gd2 and put extension=gd2.co in my
php.ini file but that didn't work.

Enabling GIF Support In Win32
I'm writing a script that will automatically resize uploaded images into Thumbnails. I'm running Apache with PHP on Windows 2000 and I have enabled the GD extension in the PHP.ini.

My code works fine for JPEG but for GIFs it claims that GIFs are not supported in the build I'm using. GIF is not listed as enabled under the GD section of phpinfo();. How do I enable GIF support on the Win32 PHP version of the GD library (php_gd.dll)?

Problem Enabling DOM XML On Win32
I'm running PHP 4.3.2 with Apache 2.0.46 on Windows XP Home. Intel P4
1.5GHz chip with plenty of memory.

I'm trying to enable DOM XML functions in PHP and having a bit of
trouble. Per the PHP manual's instructions, I've done the following:

1. Edited my php.ini file like so:
[snip]
;Windows Extensions
[snip]
;extension=php_gettext.dll
;extension=php_hyperwave.dll
extension=php_iconv.dll <-- removed the ;
;extension=php_ifx.dll
;extension=php_iisfunc.dll

2. Installed iconv.dll (ver. 1.9.1.win32 downloaded from
http://www.zlatkovic.com/libxml.en.html) in C:WindowsSYSTEM32

3. Restarted Apache

I created a test PHP file with the following code:

<?php

$storyfile = "story.xml";

$storydoc = domxml_open_file($storyfile);
$storyroot = $storydoc->root();
$nodes = $storyroot->children();

printr($nodes);

?>

to test everything out. PHP returned the following error:

Fatal error: Call to undefined function: domxml_open_file() in
C:Apache2htdocsxmldom.php on line 5

Just to make sure I wasn't using the wrong function, I replaced
domxml_open_file() with the deprecated xmldocfile() function, and got
the same result.

Enabling Magic Quotes
Is there a way to do this in my php script, or is this something the server folks have to do?

Enabling GDlib Support
I was using PHP4.0.3pl1 and imagecreate() worked fine without specifying "--with-gd=shared" when I did configure. Now i swtiched to PHP4.0.4.pl1, and the imagecreate() function stopped working. I try to recompile with the option mentioned above, but somehow nothing seems to have changed.

I looked at phpinfo() and it seems that my re-compiling wasn't working because "Configure command" was not updated (I should see --with-gd but it wasn't there). Also, when I do phpinfo() for my old system (the one that is working, with PHP4.0.3pl1), there is a table for GD information. I did not recall specifying any option to include GDlib but it was there... dunno why...

1. How do you properly recompile PHP? What I did was first "make clean", "rm Makefile", "./configure --with-gd=shared --with....." the make and make install. Then copy php.ini to the /usr/local/bin. I am probably missing some steps. Or is there anything in php.ini I have to change?

2.Is the --with-gd=shared option even right? I see libgd.so in /usr/lib, so should I use --with-gd=/usr instead?

PHP.ini File Enabling GET To Fetch Infro From URL...?
What should the contents of my PHP.ini file be if I want to enable "GET" to fetch infro from URL?

Enabling The Calendar Function On Linex
Can someone please give me instructions on how to enable the calendar function  in the php configuration directives?

Enabling User To Use HTML In A Textarea Field
We have a form in a php file and want to allow the user to use HTML directly in the textarea to format their input. What would be the code to put in for this feature?

Enabling (PHP5) OpenSSL Extensions When Signing A Certificate
I have been trying to enable/use specific OpenSSL extensions that I use in
generating certificates manually, via PHP5 + php5-openssl
module/extension.

Filling out the "configargs" array with 'x509_extensions' and/or
'req_extensions' fails to generate/sign a certificate with the desired
X.509 extensions included in the signed certificate. The extensions in my
"openssl.cnf" file work just fine with manual OpenSSL commands.

Also, I am not sure that the "configargs" array method of specifying an
OpenSSL configuration file works properly. I have looked at the openssl.c
code, and see that the signing code appears to use the certificate request
extension, rather than a "regular" extension specification, thereby
ignoring the 'x509_extension' argument. Actually, I find the entirety of
the openssl.c code to be very confusing, but that is besides the point.

SO - I want to be able to use OpenSSL extensions, via PHP5-OpenSSL, of ANY
type as I can with manual OpenSSL commands (or modified CA.sh scripts)
where the REQ or CA commands accept a "-extensions" parameter, but I
haven't been able to get this to work yet.

GD Default DPI
I'm currently making a website that needs to edit images with adding text,
the problem is, the picture starts at 300 DPI (pixels/inch), but after GD
edits the image, it's set to 72 which i read to be the default value GD
always uses. is there a way to edit that default to a higher number, if not
are there other ways to edit images through php and still keeping the
original DPI.

Magic_quotes_gpc On By Default In PHP 4.3.3?
Prior to upgrading to PHP 4.3.3 (Windows), magic_quotes_gpc was turned off in the php.ini file. However, when I upgraded, I told the installer overwrite my previous php.ini files. I didn't have anything special in my previous version of php.ini and I wanted a clean slate.

After I upgraded to 4.3.3, I noticed that my scripts were acting strange, specifically form input. I checked php.ini and found that magic_quotes_gpc was turned on.

I unzipped the installer exe and upon inspecting the php.ini, I found the default php.ini included had magic_quotes_gpc On.

I thought they were going to set magic_quotes_gpc off by default in the later versions.

Anyone know why they did this? Was it a mistake?

What Is Better As A Default Value: NULL Or ''?
I would like to collect some statistical data and then make some reports on it. I'm creating tables for this task and i'm not sure what is better for filling default values: NULL or ''. What is optimal for storage purposes and for further reports creation?

Default Image
How can I write a function in such a way that it would look for a specific image to load. If that image exists on the server it will load it, if not it will load a default image.

Dropdown - Default Value
I want to be able to have a drop down list that doesn't necessarily have the first item as the default. The content is being populated by PHP so I have no idea how to do it.

Default Variable Value
Does php provide a built in way to use a variable's current value if
that variable is already set but to use a default value otherwise.
That is, a more compact syntax for:

$some_var = isset("$some_var") ? $some_var : "default value";

Set Column Default
we have a table  sistock with column cameramodel  varchar(30) and try to  set default value to blank with the following:

ALTER TABLE SISTOCK CHANGE COLUMN CAMERAMODEL CAMERAMODEL ENUM ('INSTOCK',
'BACKORDER','SERVICE','OBSOLETE') DEFAULT '';

and we get an error at the mysql prompt;

ImageString: How Do I Use A Font That Is Not One Of The Default 5?
I am playing with imagegd for generating images, and was wondering if there is a way I could use a font that is not one of the default 5? I remember reading somewhere about a TT font library for imagegd, but don't remember the specifics. If someone could point me in the right direction I would appreciate it.

Default Option On Select Box
I need to make a field in a admin form to be a drop down select box. I have the field right now as: PHP Code:

Using Default DB, User, Password
How do I use odbc.default_db, odbc.default_user and odbc.default_password defined in php.ini in the mssql_connect() function? I do not want to define these vars globally at the application level for many reasons. Shouldn’t calling the function without any parameters force PHP to look at the INI file for the defaults?


Copyright © 2005-08 www.BigResource.com, All rights reserved