[FX.php List] Question about uploading to a 2nd drive

Bob Patin bob at patin.com
Thu Aug 25 06:21:46 MDT 2011


I've got an old site that is now using a RAID for the pages on its site; I have an upload function that allows clients to upload images.

I'm trying to repoint the PHP to the external drive, but nothing I've tried seems to work. I've given the proper r/w privileges to the folder, and I know that's not the issue; my path is not correct, apparently.

Assuming I have a 2nd drive called "External" and that I have a folder structure like this:

Documents/web_folder/logos

I tried this:

Volumes/External/Documents/web_folder/logos/<filename>

but that doesn't work. What would be the proper file path that I should be using?

Thanks,

Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker

		
On Aug 25, 2011, at 5:21 AM, Bob Patin wrote:

> Hey Tim,
> 
> So will that test fail if the WPE loses connection to the database server?
> 
> Last night it failed and I did get the email, so perhaps my method's not as bad as I thought, but I'd like to have something that I could be sure will alert me each time.
> 
> Reinstalling FMServer right now, hope this fixes it. Very annoying.
> 
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> AIM: longterm1954
> iChat: bobpatin
> --
> Expert FileMaker Consulting 
> FileMaker Hosting for all versions of FileMaker
> 
> On Aug 24, 2011, at 9:02 PM, Tim 'Webko' Booth wrote:
> 
>> Dear Bob,
>>> 
>>> Ah I see what you are trying to do... alert yourself from an FX page if it doesn't load correctly.
>> 
>> Well, you can make a call from a page to check if Port 80 is responding on the remote server and do something then before FX is invoked - I do use that for some checks, but I think only on a single machine deployment.
>> 
>> <?php
>> 
>> // Insert valid hostname, user, password, database name and layout in the database (lines 5, 9, 10, 11 & 24)
>> 	$dbHost='xxx.xxx.com.au';		//Database IP
>> 	$port='80';						//Webserver Port
>> 	$dbType='FMPro7';					//For FMPro7
>> 	$conType='HTTP';					//Connection Type
>> 	$dbUser='web_user';					//Database User Name
>> 	$dbPass='password';					//Database Password
>> 	$dbName='Database';			//Database Name
>> 
>> 	include_once('FX/FX.php');	// FX.php file
>> 
>> 	//Simple server tests
>> 	$_SESSION['serverError'] = ""; // reset server error
>> 	//Check if Port 80 works at all
>> 	if( !fsockopen ($dbHost, 80, $errno, $errstr, 2) )	{
>> 		$_SESSION['serverError'] = "Server not up";
>> 	} else {
>> 		//Check if a findany to an available table works
>> 		$pageObj=new FX($dbHost,$port,$dbType,$conType);
>> 		$pageObj -> setDBPassword($dbPass,$dbUser);
>> 		$pageObj -> setDBData($dbName,'VALID LAYOUT NAME', 'all');
>> 		$pageData = $pageObj -> FMFindAny();
>> 		$_SESSION['serverError'] = $pageData['errorCode'];
>> 	}
>> 	if ($_SESSION['serverError'] != "0") {
>> 		echo "Error: ".$_SESSION['serverError'];
>> 	}
>> ?>
>> 
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list