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.





Launching Files Locally


I have PHP and Apache installed on a windows box that is attached to
my home theater. I wrote some code that indexes the contents of a
directory that has some video clips etc in it, and the outputted HMTL
is nothing more than a series of hyperlinks to these files, with some
CSS to liven it up a bit.

The problem is this: when I click on one of the links, rather than
launch the file, it attempts to "download" it (even though the file
resides right there on the machine anyway). In my hyperlinks, I
specified to use the "file:" protocol instead of HTTP. I really just
want it to launch the file.




View Complete Forum Thread with Replies

Related Forum Messages:
Launching A URL
When I am executing a PHP routine, I would like to start a page on
a server. Could be also interesting to receive back the answer so
I can use it contents in my program.

In other words as a sample when I am at some point of execution of
a my PHP routine I would like to send to the network:

http://www.someserver.com/somefunction.php?&user=$auser

Eventually I would like to receive in some way the answer page from
the server.

It's possible to do this?

View Replies !
Launching Application
I developed an internal website (hosted in a company server), which contains a few php scripts (forms users fill out and e-mail to others upon send). I have an e-mail instruction in the scripts, with a list of e-mail addresses. I would like to change this so users can launch Lotus Notes from the script upon sending, and choose to who send the form (instead of having fixed e-mails in the script). The company has given me the path where the .exe program resides on the server.

View Replies !
Launching Second Script When First One Finishes
I have numerous PHP scripts that connect to our Oracle database and export csv files. The amount of time it takes for each script to finish varies. Sometimes it takes 10 minutes, sometimes 30 seconds. I would like to figure out a way to have the first script run and when it finishes, launch the second script and so on and so on.

View Replies !
Launching PHP From HTML Form
i build an app using PHP/MySQL/web. the APP and PHP programm are both located on the CD.

step 1:
i want it to a first interface (installation phase) to be an HTML page.

step 2:
I want it to get some informations for the installation

step 3:
i want the form to launch a PHP page (on the CD) and using the PHP.exe (on the CD)

step 4:
the PHP page send my modules using FTP

step 5:
once the FTP transfert is finished, the PHP page open a new page (that has been just uploaded) on the web server.

my problem is in step 3, how is it possible to launch a PHP script from an HTML page which is not on a web server??

I can do it easily with a SHELL script but i prefer the graphic interface of an HTML form. I know it is either possible using GTK but i don't want to use it because i'm not surre the client has a JVM.

View Replies !
Launching Community Site
I'm creating a community website, and I want the following features:

- members are able to write reviews
- members are able to post classified ads (I'd like to be able to charge money for this)
- ability in the future to create groups within the community.

Can anyone suggest a content management system (CMS) or other off-the-shelf solution? Drupal springs to mind, but then I don't have a lot of experience with these kinds of builds, so I may be missing something that is out there.

View Replies !
Launching A Background Script From Php In Windows/IIS
I'm trying to build a PHP page which launches another php script to be run
in the background. The web page should return immediately, while the
background script may run for 10 minutes or something. Unfortunately I'm
getting all kinds of weird behaviour..

In my main script I'm using exec() (also tried the other options) to start a
..bat file. This actually works, the batch file is launched and is able to
write something to disk.. Now if I put the following line in the batch file:

c:phpphp.exe -q backgroundscript.php

then instantly I'm seeing about 30 php.exe processes being created, but
nothing seems to be happening really. The processes seem to be dying
immediately and replaced by new ones. So apparently php is trying something
but fails and tries again.

Both the script and the batch file work fine from the command line. Group
'Everyone' has read/execute rights for the batch file, the php script and
php.exe. I have tried prefixing the command with START /b or cmd.exe /c but
neither seem to make any difference. Also I tried redirecting stderr, stdout
and stdin to NUL

Server is Win2k, IIS5, php4.3.0. Searched the php docs, tried suggestions
but it doesn't work, maybe because they use Apache.

My guess is that the anonymous user IUSR_* doesn't have the rights to do
something, but I can't figure out what.

View Replies !
Launching An Application: Does PHP Limit Network Connections?
I am having a problem using PHP to launch an application on the server.
All the basics work, but I cannot launch more than 4 instances of the
application. This application functions as a server itself, and I
specify the port number when I launch it, so my theory is that I am
reaching some limit on network connections.

This is my basic launch sequence:

<?php
$command = 'c:Program Files (x86)myprogmyprogram.exe'
$arguments = ' /Port:' . $port;
exec('C:PsToolspsexec.exe -accepteula -d -s "' . $command . '" ' .
$arguments . ' 2>&1', $output);
?>

Note that I am using psexec because I need to keep track of the process
ID number and kill the application when a user logs out. I can provide
more details if needed, but if there is indeed some upper limit on port
connections, that would certainly explain what I'm seeing.

Incidentally, if I try this same procedure launching "Internet
Explorer", my limit is 9 (instead of 4). If I launch a non-network
application, it seems that I can launch as many as I want without limit.

Note: I am using Windows XP Professional x64 Edition SP1

View Replies !
Launching A Program With Exec & Pstools/psexec.exe
I am trying to launch a program with PHP code. I am running Apache on Windows XP SP2. Code:

View Replies !
Launching Several CURL Posts Without Waiting To Download Pages..
Hy there, ok, i`ll get to the problem:

My php script has a function named curl(some curl options and instructions), it doesn`t matter that, what it matters:

$var1 = curl("http://www.somedomain.com/somepage1.php");
$var2 = curl("http://www.somedomain.com/somepage2.php");
$var3 = curl("http://www.somedomain.com/somepage3.php");
$var4 = curl("http://www.somedomain.com/somepage4.php");

Ok, so it downloades the content of somepage_.php to the $vars, however somepage_s_.php contains several scripts which takes a verry long time for the page to download, so my script waits for each page to download, one by one, as line by line, what i would like do rezolve is to start the curl without waiting to download the first page, then the second and so on, it should start the download of all the pages at almoust the same time. That would be all, please help, i`ve lost 4 nights trying to get this fixed but no luck.

View Replies !
Using Php Locally
i have a site and my customer wishes me to transfer the whole site (it uses PHP and MYsql) to a laptop. So can u guys (and gals) recommend a nice little programme which will allow me to run php and Mysql on the lappy? I had PHP Dev or something like that and i lost it - and i cant find it.

View Replies !
To Try Php Locally
localy I have installed the server xitami
WORKING with XITAMI I'ld like to know what can I install to run localy
also PHP files to work toogether with Xitami.

View Replies !
How To Run Locally
How do you run PHP on your own computer? That is, how can I see the result of my PHP scripts without uploading the files to my server first?

View Replies !
Updating DB Locally
I have a database on my local machine that I make entries and
corrections on. I'd like to be able to upload that to my server and have
that update the database that's on the server. What I've been doing is
saving the local file as a backup. Then I have to edit the backup,
deleting the create file info and all previously uploaded entries before
I can import the text file to the server.

Is there an easier way to do this so I won't get duplicate entry
notices. I'd like the info from my local file to overwrite the server
file like FTPing a new web page will overwrite the old one. Is this
possible to do with mySQL?

View Replies !
Mysql Locally
I read that I should install mysql and phpmyadmin locally. Is that right? Will I be able to "move" the local to my host? Is it hard to load?

View Replies !
Php.ini Sessions Locally
I've got a test server set up on my Mac with PHP5 and mySQL, and I've got two problems that I believe can be solved through the PHP settings on my local machine. First, the new buld of PHP seems to default the 'display_errors' setting in PHP to 'Off', and I'd like to turn it on. I've found several online posts about how to edit your php.ini file, and I've gone in the edited my php.ini file and changed the 'display_errors' to 'On', and uncommented the line, yet it still does not work.

If anyone knows how to fix that, or have any ideas of what I might have done wrong, that'd be great. And then I'm working with a login/admin setup that I'd like to test locally, but sessions does not seem to work on my machine. It works when I upload it via FTP to my hosting server, but not locally. I'm thinking that there might be a setting for this in my php.ini file as well. Anyone have any ideas?

View Replies !
Using $_GET[] Locally
I have code which works fine over the Internet using formmail to send the results by email but I am trying to run the code on my PC using IIS and I cannot get the correct xxx values for $_GET[xxx], to use echo &_GET[xxx] etc. The parameters being sent include

&Slider+Values=+%0D%0ASituation+-+Social+Individual%3A+3+3+3+3+3+3+3+0
&Slider+Values=+%0D%0ASituation+-+Formal+Individual%3A+3+3+3+3+3+3+3+1
&Slider+Values=+%0D%0ASituation+-+Social+Group%3A+3+3+3+3+3+3+3+2

What do I use for the xxx values in $_GET[xxx]?

View Replies !
Testing PHP Locally In Windows 98
Is there any way to test out a PHP script in Windows 98 without uploading it to a server and trying it there? I'd like to see the results of my PHP without having to upload it with every change...

View Replies !
Redirecting A Url To My Server Locally
I have a domain that I want to point to my local server, so if I type in www.ebay.com, it doesn't go there, but to my apache server. I tried doing this in windows hosts file, added the line: 127.0.0.1 www.ebay.com

But it just didn't work. I'm not sure what else to try, and was pretty sure that way worked - didn't do anything period. Does anyone know anything else to try?

View Replies !
Sending Emails (locally).
is anyone familiar with WAMP5 or the like? for building and testing php/mysql applications locally.

This is basically how I build my site, and it would save a lot of trouble if I could build and properly test emails locally and not need to upload to my web host just for it to work. I use the mail() function.

View Replies !
CURL Save Rss Feed Locally
I'm just trying to save an rss feed locally for Flex sandbox issues. Code:

View Replies !
Setting Up A Test Server Locally?
in the right direction to setting up a local server or whatever it's called on my computer so that I can test sites locally, before uploading them onto the internet?

I've no idea where to start... just heard bits about it. It'd just be helpfull to test my code, before putting it out for people to see.

View Replies !
Errors Shown Locally (in The HTML)
I have a script with some evals. When an error occurs in the eval PHP+HTML code, the error is shown after that a lot of HTML has already been output (Provided that the error is not very serious - a warning for example - and that there is some HTML code before the PHP code from which the error comes). This is annoying. I would like the error msgs to be displayed like the parse errors msgs get displayed (that is alone and top, right of the page). Is this possible with errors being displayed locally in the HTML?



View Replies !
Undefined Variable Passing Vars Locally Via URL
I've recently installed Apache 2 and php 5.2 on my WIndows XP
machine. Everything is up and running.

I'm passing some vars via the URL. It works fine online:
http://www.torusdesign.nl/spry/test...SchilderijenNAV

This is the code:
<?php echo $folder; ?>
<?php echo $navColor; ?>

The problem is that when I test it locally I get an error that the
variable in undefined.
Notice: Undefined variable: folder in F:WEBSERVERApache2htdocssonja
est.php on line 14
Notice: Undefined variable: folder in F:WEBSERVERApache2htdocssonja
est.php on line 15
Notice: Undefined variable: navColor in F:WEBSERVERApache2htdocs
sonja est.php on line 32

Can someone please help me out. Is there something wrong with my local
php configuration?

View Replies !
PROBLEM: My PHP Scripts Try To Download Instead Of Run Locally (Win2K IIS)
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now.
I have an annoying problem in that I can not run the php
scripts/pages locally, instead they open up in the browser as a
download.

By that I mean that If I access them via my lan or the net from
another computer on my lan, the webpages that have php on them and end
in a .php extension all run fine and work just great.

BUT if I open up the browser on the IIs server and do a file open and
browse to the php page I want, I get the download file box as the
computer trys to download the page instead of executing it.

An alternative method of getting the same error is if I use the
browser on the server to locally open a web page up with a link to a
php script/pagepage, I see the web page just as it should appear, but
as soon as I click on the link to the PHP script/page the same
download & save thing happens instead of the page just being processes
normally.

This is a real pain when I want to just run some scripts locally for
testing or admin purposes.

View Replies !
Flash/PHP Search Engine Not Firing Locally
I have this flash/php search engine that works online (but only when i access it with Internet Explorer) For some reason when i try and run the swf itself from the location of my local apache server it does not process the php code to do the search.

Here is an example of the Flash which takes the input of "name2" and sends it to the PHP. (by the way the links are just examples) Code:

View Replies !
Downloading A Remote File, And Saving It Locally
Im trying to retrieve a remote text file, and save it locally, downloading a new version every 2/3mins.

Im no expert with PHP so am trying to base it off a script I have where it downloads the file and saves it locally every 15mins (overwriting the previous one).

Ive tried mess around with the code, and I can get it to save the file locally with the correct filename, but I cant get it to download a new file everytime.

This is the portion of code I have trying to achieve the above..anyone know how to solve the problem? Code:

View Replies !
Locally Works/remotely Breaks? (Oracle Related?)
I'm diving into this crazy PHP thing, and I find myself a bit stuck.
Locally I can get a site to work very well. However, whenever I ask a
buddy of mine to test the site and I give him my IP it doesn't work.

I have a form. The form checks username/password against a database and
then either sends you back to the form or forwards you to the next
page. Is:

header("Location: http://localhost/nextpage.php");

the proper form of redirection?

The issue on the not at my computer logins is in this redirect. I'm not
sure what I need to send, but I was getting connection errors in the
beginning which aren't showing up anymore. Then I was getting
unreferenced index errors, but I put all the variables in a session and
that seems to work now. And now I'm stumped because I'm not getting
errors in the log.

View Replies !
Scripts Are Fast Locally, But Slow On Remote Server
I have a set of PHP scripts that seem to be efficient and quick enough
both on my home testing environment, and a few different web-hosting
services I use.

However, on one particular web-hosting service, there is often a very
painful 10 second (!) lag when first loading up the scripts. This long...

View Replies !
Page Coming Up Blank/white Online, But Works Fine Locally...
I'm going to start off making this question very vague and general (as to not over-clutter it with needless info), but if you want more details I can provide them...

Basically, I have a PHP page (that serves to update a table on a SQL database) that works fine locally. But when posted online, the page doesn't even show up. There's no error or anything - the page is just blank (white). It displays this way both on IE and Firefox...

It is one of many pages in the site.  The site itself has the user log in, and then they can post a new record to the database, delete a record, or update/edit a current record.

All other pages are working/displaying fine, but it's just that "update/edit" page that comes up blank (and again - it works fine locally, just not online).

View Replies !
Use Virtual Hosts To Develop Locally But Upload Throws Error In Source File References
On my development computer, I have virtual named host set up, like
www.site1.lab.

When I upload those to my web site for customer review under
mywebsite.com/clients/site1/
it throws some of the source file references off and it does not work
properly.

My references are like:
require_once($_SERVER['DOCUMENT_ROOT']."/utility/top.php");

Obviously those will not work since $_SERVER['DOCUMENT_ROOT'] references
mywebsite.com.

Is there anything I can do in apache.conf for a virtual directory that would
make it so when I upload a site for customer review, I don't have to change
the source references?

View Replies !
Get The Mail Function To Send Mail After Processing My Forms Locally
I am using an Apple Mac Book Pro computer on which I am running MAMP (Macintosh, Apache, Mysql, PHP) I can not get the mail function to send mail after processing my forms locally. I checked the php.ini file to see what could be the problem and I believe I have it configured properly.

View Replies !
Turn On $_SERVER["PHP_AUTH_USER"] Locally?
I am finding that on a new server where I am developing

$_SERVER["PHP_AUTH_USER"] and
$_SERVER["PHP_AUTH_PW"]

Do not show up in $_SERVER when I when they should be defined I test
using
print_r($_SERVER) or this

<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button'
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your
password.</p>";
}
?>

Is there a setting that is keeping PHP from accessing this
information? Can I set this locally?

$_SERVER["REMOTE_USER"] also stays empty.

View Replies !
Dealing With XML Files - Merging 2 Files Or Appending XML Files
i have some painful problems with PHP and XML and I guess I'm not the only one. I would like to append 1 xml file to another xml file. Code:

View Replies !
Delete Files - Check All Files In /home/radar/kabc*.png
Trying to figure out a code to do something that is probably simple, but I'm not able to find anything to combine to make it happen. Here is what i'd like to accomplish. Check all files in /home/radar/kabc*.png --- if those files are older than x hours, delete them. After deleting those files, I'd like to copy new "placefiles" in the place of the image, basically, copy test.png to kabc101.png (example filename). I'd like to not loop this process if the file size is equal to 123456 bytes exactly, and have the owner of those files a certain user.

What this is, is a radar software that I use to upload to my personal website, so if there's no weather going on, I don't use the radar software, and it's not updating the radar on the web, so, after so many hours of the software not uploading anything new, i'd like to find a way to have these placefiles put in place. Once I start my software again, it'll overwrite those files automatically. Does this seem like it's possible? Is it an easy task?

View Replies !
Including Files In Different Direcories That Include Files From Teirs
Okay, I made a simple AJAX shoutbox and I want to include it on all my pages. To insert the shoutbox I simply type <? include('/shoutbox/shoutbox.php');?> into my HTML page.

The problem is, that in /shoutbox/shoutbox.php I also include settings.php, functions.php, and some other files, and when I include /shoutbox/shoutbox.php into my index page, /shoutbox/shoutbox.php tries to call settings.php from the same folder that my index file is in, since I just 'included' it in index's source.

So my question is, is there any way, without using frames, to include a PHP file as it would be if you link directly to it in the address bar, but placed into another file in a different directory?

View Replies !
How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page:

<?php require_once('Connections/conn.php'); ?>

I want to hide the connection file, "conn.php", so it's out of the web
accessible file structure. I understand putting them in the php include
directory shoudl do this. For example, let's say the directory I put them
in is /www/phpIN/, and /www/ht/ is the root web directory.

So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and
removed it form CONNECTIONS directory.

View Replies !
Creating Dir, Copy Files And Pass Variables To 2 Files
I need to create a folder on the server weekly named by the user. To this folder copy the contents of an /Original folder. Inside the new folder edit one of the files to insert a data with a XML path generated in another application, copied (via memory) and pasted within the very first form and passed to the file in question.

<param name="FlashVars" value="xmlfile= $lanofile" />

the $lanofile is the value that I need to pass from the form to be read by this file.
I have created an form (n.php) that POST the name of the folder to a second file (creatdir.php) everything is cool until I have to edit the third file.

How can I pass the value of one of the formfileds to a second file and them read this value as a variable to be consumed as mentioned above? Or actually right whatever is on the third field to this position (not using variables).

View Replies !
How To Detect Number Of Files And Files' Name In A Folder?
I have a server built in window + apche. I am trying to make a photo album, but I don't know what is the code for detecting the number of files in a server folder and the files' name~.

View Replies !
Include Files Do Not Workin The .php Extension Files.
I have common top and bottom pages for each page in my web site. I refer to them like this:

<!--webbot bot="Include" U-Include="top.htm" TAG="BODY" -->

I recently added a PHP helpdesk system, and the include files do not workin the .php extension files. i have tried changing them to be handled by the frontpage editor as HTM format, but no change. How do I get PHP files to work with Frontpage Include files? Or am I required to use PHP coding to emulate the same thing in this case?

View Replies !
How To Store The Files And Only Be Available To The Person Who Uploaded The Files.
I have a form setup already with 4 upload boxes. How do i upload all 4 files to my website and then store it so that user1 can only access their uploaded material and so on. I dont understand how to store the files and only be available to the person who uploaded the files.

View Replies !
Uploading Files - Display All Files .jpg
I have a button and when I click on it you'l get the window where you can select a file on your harddisk. This file will be uploaded to my database, this all works perfect. Only annoying thing is, when I click the button the windows opens and display all the .html files while I want it to display either all files or .jpg (whatever is easier). This would save me clicking on the roll down menu and selecting the right file format.

View Replies !
Convert The .php Files Into Its Object Files
Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed?

View Replies !
Making Html Files Be Files
i just switched hosting, so transferring everything, as always, is a pain.

One thing is that I don't like files that end with .php (sorry, I just don't). I have always thought that .html looks far more friendly. So, on my old hosting, I added this line to my .htaccess file:

AddType application/x-httpd-php .php .html .css

This way, both my html and css files would be read as php files, and it worked great and happily. Plus, people would be seeing html files doing interactive things that they should not be able to do, which was fun to hear about. Code:

View Replies !
How Can I Process .html Files Like . Files?
I need to place php script in .html files and have the server process them like .php files. I only have access to the control panel (CPanel). Is that possible?

View Replies !
How To Convert Doc Files To Text Files
i want to convert the doc files to text files by using php5 (window)...ist catdoc only used in linux?

View Replies !
Session Files (text Files) Deleted After Sometime When User's Session End
In developing a recent project, I want to implement a feature, that certain query results will be written to a text file, after the user's session end for twenty minutes, the text file will be deleted automatically.

I know in win/IIS/asp how to config this feature, but no idea how to do these in linux/apache/php. Php manual's session_save explain is not helpful enough. Anybody have such experience??

View Replies !
Upload Audio Files Of Type .wav & Video Files Of Type .avi
I need to upload audio files of type .wav & video files of type .avi
/ .mov but my current file unloader is not helping me with that. My
unloader works with application types, images, txt, pdf , mp3, mpg,
mpeg but not with those .wav & .mov/.avi files........

View Replies !
Files Inside Files
im creating something new with alot of php files, and i remembered that alot of times on message boards and things like that you see like "misc.php?action=list" or something like that. i would really like to decrese the amount of files i have for this new thing im creating. can someone show me how to put multi files in one?

View Replies !
Parse .inc Files As PHP Files
how can I set my Web server configuration file to parse .inc files as PHP files?

View Replies !
ZIP Files
I have to do a script which read a zip file and update with it a database, I need to know if there is a way to uncompress .zip files with PHP.

View Replies !
.txt Files
Does anyone know where I can find out how to get PHP to save a text file. Also, How can I combine text boxes and check boxes within one form? I would like to write a simple script which will take a url, and allow me to choose a description(from 4 or so options) and write a text file which could be used as a SSI.

View Replies !
Not Able To Run The Php Files
i get these two warnings when i run the php page.

Warning: Cannot send session cookie - headers already sent by (output started at /usr/local/apache/htdocs/ticketsmith/config.inc.php:62) in /usr/local/apache/htdocs/ticketsmith/common.inc.php on line 380

Warning: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/htdocs/ticketsmith/config.inc.php:62) in /usr/local/apache/htdocs/ticketsmith/common.inc.php on line 380

and the code that generates the warnings is : Code:

View Replies !

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