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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Mysqldump Creates Empty File


I have the following code running on a Windows PC (it actually needs to work in a Linux environment on live but still developing it). It seems to create the a.sql file but there is nothing in the a.sql file even though there is data in the database....




View Complete Forum Thread with Replies

Related Forum Messages:
MySqldump Creates Empty File?
I am Trying to create a one click backup database script so non-geek office staff can do this, but so far I can only output empty files

$db_user = "root";
$db_password = "";
$db_database = "or";
$db_server = "localhost";
$backup_path = "C:xampphtdocsopenrealadminackup";
$path_to_mysqldump = "C:xamppmysqlin";
$filename = "backup".date("YmdHis").".sql";

shell_exec ("mysqldump $db_database > $path_to_mysqldump.$filename --user=$db_user --password=$db_password");

I have tried various forms of this syntax with no content output?

View Replies !
Mysqldump Creates 0 Bytes File!?
i found some simple code for dumping mysql database but whatever i do (change path to mysqldump, change arguments, change functions) it generates 0 bytes file every time! why is this happening? how could i debug my code? Code:

View Replies !
Mysqldump Create The Text File
The below script will create the text file fine (tried gz but doens't work on local machine) but the text file is empty. Any ideas why? Code:

View Replies !
PHP Exec Calls A C Program That Creates A File
I'm using exec to call a compiled C program that creates/writes to a
file...However this doesn't seem to be working....
I tried setting all the permissions to 777 but still nothing...?

View Replies !
Unable To Write A File In A Directory That My PHP Script Creates
I've a problem of being able to create and remove a directory but
unable to write a file inside the created directory for some strange
reason. I suspect that this problem could be vaguely linked to Safe
mode being set to On since my site is using shared server hosting and
probably insufficient/incorrect Unix file permission.

Below is my test script that helps me narrow down the problem.
--------------------------------------------------------------------------------------------
<html>
<head>
<title>File IO Test</title>
</head>
<body>
<pre>

<?php
define("TEST_DIR", "./newsletter/2005_11");
define("TEST_FILE", "./newsletter/2005_11/file_io_test.txt");

echo "Make Directory";
if(mkdir(TEST_DIR, 0777)){
echo "<font color="green">OK</font>
";
}
else{
echo "<font color="red">Fail</font>
";
}

if(file_exists(TEST_DIR) && is_dir(TEST_DIR)){
echo TEST_DIR . " exists.
";
}
else{
echo TEST_DIR . " does not exists.
";
}
echo "<hr>
";

// TEST FILE WRITE
echo "Write Open File";
$file_handle = fopen(TEST_FILE, "w");
if($file_handle){
echo "OK";
}
else{
echo "Fail";
}
fwrite($file_handle, "This file is written at " . date("Y/m/d H:i:s") .
"
");
echo "Write Close File";
if(fclose($file_handle)){
echo "<font color="green">OK</font>
";
}
else{
echo "<font color="red">Fail</font>
";
}
echo "--- START FILE DUMP ---
";
readfile(TEST_FILE);
echo "--- END FILE DUMP ---
";
echo "<hr>";
?>
</body>
</html>
--------------------------------------------------------------------------------------------
This script will report a success with the creation of the directory on
my server, but fails to write a file inside the newly created
directory.

Originally, I only call mkdir without specifying any permission and it
doesn't work. Thus I explicitly instruct mkdir to use 0777 to allow all
write operation by everybody, in case PHP and Apache try to write files
using "nobody" or "www" user account, instead of my shell login user
account. Still it doesn't work. The owner of the created directory is
called "www". When I login via SSH and check the permission, strangely,
the permission is 775 instead, with Write permission for Others
disabled, although I told mkdir to use 0777 instead.

Is there any workaround, and what am I doing wrong here? Thanks for
sharing with me any insight into this problem. I'm not quite sure what
exactly is wrong here, whether because of PHP Safe mode, incorrect
directory permission, incorrect file permission or the case of
different UID or owner.

View Replies !
FIle Uploads: Empty _POST And _FILES Arrays When File Too Large
Uploading of files.. AFAIU from the manual, if a file is larger than the
size defined in the form or larger than upload_max_filesize in php.ini,
that _FILES['file']['error'] should hold an INT error code.

The file upload system is working fine if the file is smaller than the
defined size, but if it's larger, then both the _POST and _FILES arrays
are completely empty:

array(0) {
}

I can obviously check to see if $_FILES is set and contains elements,
but I was hoping for more specific error handling (reason as to why the
upload failed).

Has anyone else encountered this? Any info welcomed =)

View Replies !
Creates A Temporary Folder And A File Within The Folder.
I have a PHP script which creates a temporary folder and a file within the folder.

I have a problem when trying to remove the file and folder using my FTP program. The ownership and group are set to NOBODY. I cannot change the permissions on either the file or the folder.

I have tried chmod and chgrp and chown but for some reason I cannot change permissions.

View Replies !
Write To File Sometimes Deletes EVERYTHING, Leaving Empty File
I've used PHP to save raw data from Flash to an XML in the past. Load the XML into flash, update a couple variables, then send it to PHP to completely overwrite the old .xml file. This works great most of time, but sometimes after a few days, I'll check the .xml and it will be empty (0 bytes).

Not sure if this is caused by a user who aborted during the writing process, or simultaneous connections, etc. Been thinking about doing a backup every day using CRON, but that's a mission and I'd like for it not to happen full stop. Any suggestions?

View Replies !
File Upload Works But Only For Empty File
I can upload a file as long as it is empty (thanks Hendri Kurniawan).
I do not know where to look.

Can someone help me understand what I need to do to upload a small image.
http://chops.novatrope.com/game/test/upload_file3.php

Here is some more info http://chops.novatrope.com/info.php

View Replies !
Instead Of Downloading The File It Just Downloads A 4kb Empty File.
I am using this code:

header("Content-type: application/ZIP
");
header("Content-disposition: attachment;filename=$file
");
readfile($filelocation);

And it works great on many servers. But on this server I am trying to get it working on now, instead of downloading the file it just downloads a 4kb empty file.

View Replies !
Sessions File Is Empty
php 4.4.6
windows xp
iis 5

After upgrading php to 4.4.6 after using 4.3.9 all session files are empty. The file is created but blank. I have checked the sessions folder has permissions for IUSR.

I have also tried every thing here http://bugs.php.net/bug.php?id=16263

View Replies !
PHP Session Is Empty And Session File Is Empty
I am trying to save a SESSION variable which looks to succeed because right after I print it out to verify it. I do so as follows:

session_start();
<snip>
$_SESSION['security_code'] = $code;

The problem is that I submit a form on the same page and I need to check if the $_SESSION['security_code'] == $_POST['security_code'] however this condition is always false because $_SESSION['security_code'] is empty.  I also checked the security files that are created in the PHP 'save_path' directory and it appears to be creating an empty session file.

Can anyone suggest anything here?  Also prior to the condition, I also do a session_start() and that doesn't help either.

I got this code from a open source area and on that web site, if I test it it works fine.  On my localhost it does not work.  I'm not sure if I'm missing some configuration or whether PHP 5.2.2 has problems with sessions.

View Replies !
File Empty When Forcing Saveas
I am trying to force saveas using array for filename.

The problem is that when I click saveas or open, the file is empty. The path to the file is fine, and the file is in the correct directory.

However, when the filename is hard coded, the file is fine.

View Replies !
Ftp_put Puts Empty File =
I'm trying to upload a file from a client (windows) to an ftp server (linux), i deciede to use some of php`s functions to connect and authenticate etc.. i only wish to put a file on the server, so i used ftp_put() function, when i send the file via http, the file is created on the server, but it is empty, i checked the permissions and all are set correctly, i figured if it is empty it means it cant find the file im trying to upload, i read somewhere that it has problems with recognizing windows directory strings e.g(F:hisdirectoryfile.txt), i tryd minipulating the string but it still couldnt find the file, i figured that ftp_put sees the absolute path to the file from a windows box as the file name itself, so it maybe thinks F:hisdirectoryfile.txt is the actual file name, and dosent interpret the directory names, i really tryed every think i could think of, and nothing worked, here is the index.html and upload.php files that i used:

index.html
---------------------------------
<html>
<body>
<p>upload</p>
<P>
<form method=POST action="upload.php" enctype="multipart/form-data">
Source File:<input type=file name=source_file size=20><BR>
<input type=submit name=Submit value=Submit size=20 style="border: 1px
solid #0000FF"></form>
</body>
</html>


upload.php
----------------------------------
<?php
$server = "localhost";
$con = ftp_connect($server);
$user = "user";
$pass = "password";
//destantion file
$destination_file = "file.txt";
ftp_login ($con, $user, $pass);
//change directory to files where the permissions are set to 0777
ftp_chdir($con, "files");

//this is where it goes wrong.
if (!ftp_put($con, $destination_file, $source_file, FTP_BINARY)){
echo "$source_file wasent uploaded";
} else {
echo "$source_file was uploaded";
}
//close connection
ftp_close($con);
?>

---------------------------------------------

let me add, that when i echo`d the $source_file i noticed it displayed a blank, is that because im using the POST method ?, and when i use the GET method i see the directory as F:filesfile.txt ,
so i used echo stripslashes($source_file); , but it still didnt find the file, if someone can find a flaw in what i'm doing please tell, also is there another method of transfering files to an ftp server via http without using php?

View Replies !
Checking File Upload Isn't Empty
I'm trying to check that a form has been filled in, but that the image field is NOT empty. I'm using this code:

if ((!isset($_FILES['imagefile']))&&($_POST['a']=='a')){
$go=$root.'includes/enter_details_bypass_image_upload.php';
header('Location:'.$go);
}

I think it's wrong and don't know how to fix it. Any ideas?

View Replies !
Ftp_nlist Returns False For Empty Directory Instead Of Empty Array
In an application installed with PHP5 it looks like ftp_nlist() returns
false if the directory is empty, instead of an empty array as it should
according to the manual. On the original server with PHP4 it works as
expected.

Is this a bug, or an undocumented change in PHP5, or a setting that
could be changed somewhere?

View Replies !
Upload File- Empty Variable Problem
In the below code the variable $content is empty. Why is this? The other variables take values. Code:

View Replies !
MYSQL Back Up Gzip File Empty?
I have been trying to use the script below to back up my database. It creates a gzip file sure enough but the file inside it has no extension, so i add .sql to it (is that right ?!?) and open it up to find its empty...

Whats going on there ? <?php
error_reporting (E_ALL);
require '../Connections/CDblog.php'
if($link = mysql_connect($hostname_CDblog,$username_CDblog,$password_CDblog)){
mysql_select_db($database_CDblog);
}
$backupFile = $database_CDblog . date("Y-m-d-H-i-s") . '.gz'
$command = "mysqldump --opt -h $hostname_CDblog -u $username_CDblog -p $password_CDblog $database_CDblog | gzip > $backupFile";
system($command);
?>

I dont want to actualy back up the database in full but just a few tables. But the below method to do this always brings me this error

Access denied for user: '............@%' (Using password: YES)

I have no trouble connecting to the database in any other way.

Could it have something to do with the fact that the MYSQL server is not localhost but on an entirely different server?

<?php
error_reporting (E_ALL);
require '../Connections/CDblog.php'
if($link = mysql_connect($hostname_CDblog,$username_CDblog,$password_CDblog)){
mysql_select_db($database_CDblog);
}

$backupfile = '/MYSQL_backup/CDblg_article_art.sql'
$sql = "SELECT * INTO OUTFILE '$backupfile' FROM CDblg_article_art";
mysql_query($sql)or die(mysql_error());
?>

Also is there a way to alter the mysql command

mysqldump --opt -h $hostname_CDblog -u $username_CDblog -p $password_CDblog $database_CDblog | gzip > $backupFile

So it selects only one table?

View Replies !
5 Rc2 Generates A Notice For Empty File Uploades
We've updated our dev copy of PHP5 to RC2 and I've noticed that if I
include a file upload form element and submit the form without selecting a
file it generates a "Notice: No file uploaded in Unknown on line 0" error.

Is there any way to get it to stop generating those notices? I don't want
to turn notice reporting off as they're useful while developing, but I
don't want that notice happening whenever a file upload is not required as
it breaks redirect and messes the page up unnecessarily.

Also on our production server we've set up an error notification system and
don't want it clogged up with extraneous notices as well.

View Replies !
Trying To Get A Mysql Dump From Php Script---empty File Created
I am doing this right now on my own server at home, but would like this to be portable to my host as well.  I am executing the code below and it brings up the mysql dump screen for a flash and creates the file, but it is empty.  The connection information is correct.  Can anyone see what I am doing wrong here?

include('../connections.php');

$backupFile = $mydtb . date("Y-m-d-H-i-s") . '.dump';
$command = "mysqldump --host ".$server." -u ".$user." --password=".$password." ".$mydtb." > ".$backupFile;
echo $command;
system($command);

View Replies !
Empty Table Before Inserting Rows [file Upload]
How would i code a script that would empty the specified table before inserting the new rows from data in a file i'm uploading?

View Replies !
While Loop Inside If (!empty($_FILES['file']['tmp_name']))
when i press the submit button it tries to go to the new page but it seems like it just keeps loading something over and over and over the $myid variable is an integer like 23, or whatever.

<?php
 if (!empty($_FILES['file']['tmp_name']))
    {
      while ($row = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='$myid'")))
      {
        $oldphoto = $row['myphoto'];
        echo $oldphoto;
      }
}
?>

View Replies !
Mysqldump...
Can anyone see why this snippet of code isnt dumping the databases using
mysqldump ?
All the credentials are correct (changed for the purpose of this post).

$host = "localhost";
$user = "root";
$pass = "password";
$database = "database";
$dbname = array ("1","2","3","4","5");
$savepath = "c:/inetpub/sqlbackup";
$date = date("mdy-hia");

$link = mysql_connect($host, $user, $pass) or die("Could not connect");
mysql_select_db($database) or die("Could not select database");

for ($i=0;$i<sizeof($dbname);$i++)
{
$filename = "$savepath/$dbname[$i]-$date.sql";
passthru("c:/mysql/bin/mysqldump --opt -h$host -u$user -p$pass $dbname[$i][color=blue]
>$filename");[/color]
}

mysql_free_result($result);
mysql_close($link);

View Replies !
How Do I Run A Mysqldump From PHP?
I want my PHP program to make backups of my database. How do I make a feature similar to PHPMYADMIN's EXPORT function? i think mysqldump can only be run from shell prompt, not mysql prompt.

View Replies !
Mysqldump
mysqldump -h localhost --port=3306 -u phillip --password=password students blah | mysql -h localhost --port=3306 -u phillip --password=password -C archives

Super simple thing.. I want to copy the students.blah table to the archives database. Whenever I do it, it creates 2 tables, "blah" and "students_archive", which isn't references.

This even after "DROP DATABASE archives" it STILL does it! And no data is ever backed up from the original "blah" table (or the "student_archives" table for that matter).

View Replies !
Mysqldump?
Does mysqldump offer any formating options. When I look at the file of a dump it is very hard to read. I would like it to print each record on a new line.

View Replies !
Large File Uploads - Either The Transfer Hangs Or $HTTP_POST_FILES Is Empty
I've got a client who wants to allow his clients to upload 100MB files thru HTTP. He also wants a progress meter. I'm using the megaupload progress meter, minus the 5MB filesize limit. I've also set my apache transfer timeout to a ludicrously high number, and in php.ini I've set upload_max_filesize, max_execution_time, max_execution_time, etc to values that should allow for large file uploads.

I can upload files of several MB, but w/ anything larger, either the transfer hangs or $HTTP_POST_FILES is empty for the processing script. megaupload uses some perl/cgi code to handle the post data and show the progress meter, but I looked thru it carefully and nothing in there seems to be likely to cause a problem. Can anyone give me advice on what else I should look into? This is driving me NUTS...

View Replies !
Mysqldump Not Working
My hosting provider claims that this script worked when they ran it manually. They also mentioned that they had to remove some whitespace to get it to work. I cannot see any problem with the script now, but it still does not work when called directly from a browser.

The script and the folder it is writing to are chmod'ed to 755:

<?php
$cmd1 = "/usr/bin/mysqldump -hsome.server.net -uusername -ppassword --all-databases > /home4/sub002/sc11883-LGVN/www/Backups/a.sql";
system($cmd1);
echo "Done";
?>

View Replies !
Backup With Mysqldump
I use Windows XP and Apache.

I am trying to backup a database on my local computer with the
following php code:

$dbname = 'ol'
$dbhost = 'localhost'
$dbuser = 'root'
$dbpass = 'password'
$backupFile = $dbname .'-' .date("Y-m-d-H-i-s") . '.sql'
$command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname >
$backupFile";
if (!system($command, $retval)){die('Backup failed.);}

It does produce a file like C:Program Filesxampphtdocs
onlinelearningol-2007-06-20-13-31-09.sql, but it is empty.

mysqldump.exe is at C:Program Filesxamppmysqlinmysqldump.exe and
the script is sitting in the folder C:Program Filesxampphtdocs
onlinelearning.

When I put a copy of mysqldump.exe in the folder C:Program Filesxampp
htdocsonlinelearning I get a black sreen saying 'Enter password:'.
When I give the password I get a file like this:

-- MySQL dump 10.10
--
-- Host: localhost Database: ol
-- ------------------------------------------------------
-- Server version5.0.18

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

---



View Replies !
Mysqldump Problem
i'm trying to backup my database using:

(for example i have database 'test')

shell> mysqldump --quick test | gzip > test.contents.gz

it gives me an error: You have an error in your SQL syntax; check the manual ... to use near 'mysqldump --quick test | gzip > test.contents.gz'.

View Replies !
Mysqldump Syntax
I was wondering what I miss out below in mysqldump syntax

mysql> mysqldump -u root -p dbaseName >file.sql;

or

mysql> mysqldump -u root dbaseName >file.sql;

I connect as "root" and tehre is no password. In both cases I get errors.

View Replies !
Mysqldump From Php Script
I am trying to write a php script that will backup all my databases. However, this isn't working:

<?php
$host = 'myhost'
$user = 'myuser'
$pass = 'mypassword'
$backupDir = "/home/user/www/mysqlbackups";
$backupFileName = "backup.sql";

$back = $backupDir.$backupFileName;
system(sprintf("mysqldump --all-databases -h %s -u %s -p%s > %s",$host,$user,$pass,$back));
?>

I have also tried adding "or die (mysql_error());" to the end of the command, but I do not get any error message from this. However, if I try to echo something after the die statement, then it does echo. so I don't know what that means.

View Replies !
Load A Mysqldump
I have a mysql dump with table creates and data inserts all in a giant text file. What I want to do is to put all those tables into a specified database using PHP. My questions is what is the best way to this? mysql_query() can only do one command at a time.

View Replies !
Mysqldump Function
Does anyone know what is the simplest way to backup a database using the mysqldump function in php?

I have googled a lot and the codes i have found are very hard to understand and most of them does not work.

View Replies !
Mysqldump Backup/restore
I have been trying to get a backup/restore Script working for some time but have had little luck. Is it possible that i can:

1) Have a script that will backup my database and structure to a file, i.e: backup_current_date_and time.sql

2) Make a PHP script that will let me view all the sql files in a directory on my webserver and restore the one i select?

View Replies !
Mysqldump Script On Windows95
I am trying to develop a script to make .sql file of a database. This is what I have so far PHP Code:

View Replies !
Mysqldump Script Not Working
This script is not working to backup all the databases on my server: PHP Code:

<?php
$dbhost = 'localhost'
$dbuser = 'myuser'
$dbpass = 'mypass'
$backupdir = '/home/user/www/mysqlbackups/'

$command = "mysqldump --opt -h$dbhost -u$dbuser -p$dbpass --all-databases > $backupdir";
system($command) or die('could not backup');
?>

I have searched through countless examples of mysqldump scripts, yet I cannot see why my script isn't working. The only output that I get is "could not backup". Does anyone know if I have to specify a name for the dump file? If so, where in the script? Also, does my path to the backup directory seem ok? Do I need the forward slashes both at the beginning and end of the string?

I think that this script should save the dump file on the server, in the directory specified by $backupdir. And I should be able to see the file online. Finally, is there anything extra that I would need to include in the script, since I am saving the dump file in a password protected directory?

View Replies !
Getting Separate Inserts In Mysqldump
I just moved an application to a client's in-house X-Serve, and now when I run mysqldump it delivers all the inserts for a table in a single string - i.e.

insert into 'table' values (values), (more values), (more values)

instead of separately:

insert into 'table' values (values)
insert into 'table' values (more values)
insert into 'table' values (more values)


I realize I don't have --opt enabled in the dump (which I usually do by default, but the previous host didn't support it). --opt includes something called "extended inserts", but from reading the manual, extended inserts is what I'm getting now (all run into a string). I also read these are "on" by default in more recent builds of mysql.

what should I do to split the inserts into separate lines? If I don't, the results from some of the tables are so big they overload phpMyAdmin when doing a restore in those cases I split my uploads into multiple passes.

View Replies !
Mysqldump - Is This Correct Method?
I've been trying to get a mysqldump command to work but it just creates an empty file.

$dbhost   = "xxx";  
$dbuser   = "xxx";  
$dbpass   = "xxx";  
$dbname   = "xxx";  

$backupFile = $dbname . date("Y-m-d") . '.gz'
$command = "mysqldump --opt -h $dbhost -u $dbuser -p$dbpass $dbname | gzip > $backupFile";


can anyone see a reason why this doesn't work? or is there a better way of writing it?

View Replies !
My Insert Creates
I cannot figure how to fix it. That snippet should be used to grab an ID which it does fine Then insert that ID in a col named "member_web_address" As mentioned it does get the ID and insert it But not on the row where from the ID was taken . It does insert it on a new row created by the insert action Which due to the auto increment creates a new ID etc... How can I keep the original row and pass its ID # to the "member_web_address" col in the very same row
<?

$query = "select id from templates where username= '$username' and page= '$page' ";
$result= mysql_query ($query);
while($query_data=mysql_fetch_array($result))
{
$member_web_address=($query_data["id"]);
}
$query = "select id from templates where username= '$username' and page= '$page' ";
$result= mysql_query("insert INTO phplates (member_web_address) values ('$member_web_address')");
?>

View Replies !
Creates The Session
i have a field in a database called Password. It is based on 'password' that a query on the rest of the database is run. The query uses sesions. I attempt to login to thru a login page with my 'email' and 'password'.

This is the page which checks that the login details are correct and it creates the session Code:

View Replies !
Backup A Database Using The Mysqldump Function
Does anyone know what is the simplest way to backup a database using the mysqldump function in php?

View Replies !
Database Backup Using Exec & Mysqldump
Im trying to get a database backup using ...

<?php

exec("mysqldump -ulogin -ppassword database > file.sql");

?>

but the resulting file file.sql is written but is empty can anyone suggest where im going wrong.

View Replies !
Backup &amp; Restore MySQL, Not Using Mysqldump
How can I backup and restore a MySQL DB WITHOUT USING

EXEC()
MYSQL
MYSQLDUMP

If I try running exec() and mysqldump, I get Fork warning errors ..

Win 2000Server
IIS5
Latest PHP & MySQL

View Replies !
Dynamically Creates Varibles
i have this script for that uses 7 pulldowns for the time of an event each day of the week that gets inserted in to a db. Instead of writing the script 7 times for taking the data from the pulldowns, creating a time based on the hour, minute and AM/PM -can i create something that dynamically creates varibles. Basically takes something like $hour1, $minute1 and automatically creates $hour2, $minute2 and so on. This is kinda difficult to explain, heres a snippit of code which i want to duplicate.

View Replies !
Fopen Creates Files?
According to the PHP documentation fopen will create a file that it is directed to open with write access if it doesn't exist... It may be my current host, or I may be doing it wrong, but it doesn't work. Code:

View Replies !
CURL Creates New Session
I currently have a curl session that can access hundreds of different pages on a site. One thing I noticed with it is that it is initiating a new session of the server that is accessing. I don't want it to create a million sessions, just use the one it currently has. I am going to guess that if curl_close($ch) is called, then it is is reinitiated curl_init, it restarts the session correct.

View Replies !
Cron Job Creates Php Files
I have a cron job that is running on my server. Its set to run every half hour. It works great, but it has an annoying little quirk. Everytime the cron job is run, it creates a php file in the root directory of my server. Since its running every 1/2 hour, I get a bucnh of files on my root directory and I have to manually delete them everyday. I've posted the code for my cron job below.

View Replies !
MYSQLDUMP, Create New Database, Before Restoring SQL Data.
I can use mysqldump to create a .sql file backup of my data.

For importing how can I test to see if the DB exists, if it does
import the .sql

If not create the DB then import the .sql!

View Replies !
Mysqldump :: Under IIS 5.1 With Php 5 And Mysql Latest Stable Release
I'm trying this script under IIS 5.1 with php 5 and mysql latest stable release :

<?php
ob_start();
exec("mysqldump -u root -password=123456 mydatabase ");
//if i use system() instead of exec() it will warining me Unable to Fork??? (seems it doesn't find the program)
//so i tryed to update environment Variable PATH with Mysldump location
//but nothing changed

$dump = ob_get_contents();
echo $dump;
ob_end_clean();
//The database dump now exists in the $dump variable... write it to a file using...
$fp = fopen("dump.sql", "w");
fputs($fp, $dump);
fclose($fp);
?>


it seems correct but in dump.sql i find a an empty file....

View Replies !
Mysqldump :: You Have An Error In Your SQL Syntax; Check The Manual
i'm trying to backup my database using:

(for example i have database 'test')

shell> mysqldump --quick test | gzip > test.contents.gz

it gives me an error: You have an error in your SQL syntax; check the manual ... to use near 'mysqldump --quick test | gzip > test.contents.gz'

View Replies !
Looking For Script That Creates List Of Referrers
I've been looking for a script that will create a real-time list of
'top referrers', similar to the links to sites you see on the left of
the page at http://www.linkswarm.com. They also have a page
http://www.linkswarm.com/referrers/referrers.php which shows all
referrers.

I'm assuming you'd be able to set filters. There is no signup
required, you just link to the site and your site appears in the
referrers list, but as a webmaster, you wouldn't want to include
search engines for example.

View Replies !

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