Background Colour Not Showing
I need to use a coloured background for a page which contains tables. Using
Frontpage 2k I can create the background colour OK and it views correctly;
but when viewed using apache, there is no background colour, it is just
white.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Calender Change The Background Colour
im have made a calender that i want to tie into a sql database , and depending on the value in the database will change the background colour of that day in the calender, the problem im having is with the following: $colour = "#FF0000"; // this is just to test whether the background colour changes $cal_event_opentd = "<td align=center bgcolor=#<?php echo $colour;?><b>"; but for some reason the backgroud doesnt change,can anyone tell me where im going wrong.
Background Alternating Colour Code
Im having problem making my background alternate between colors. Following is my code, the result alternates 2 colors ok, but prints each entry from my database 30 times. Code:
How To Update Form Input Field Background Colour On Validation Error
I have been searching for form validation scripts for ages and all th ones that I like are far too complicated and inflexible so I decided to stick with my own which is easier to understand. The only thing I don't like which i have seen on better form validation scripts is that and fields with errors are highlighted. i can only presume that they have used php to set the background color of the input field or textarea. How would I add some code to change the background colour of form elements if an error is found? Here is my code which validates the form but doesn't change form elements colours. Code:
Selecting Colour Problem
I have a dynamic part of the page where the user can select what colour they want the bottom and top table colour to be, the thing is, on the bottom part of the table i have my advertisment link, which if someone is cunning enough they could make the colours the same colour as the link in an attempt to hide the advertisment PHP Code:
Colour Top 3 Results In A Table
I'm currently trying to make a poker league whats seem to be going well. I have populated a table with the league results, but would like 1st position in gold, 2nd in silver and 3rd in bronze. These will be the first three rows of the table, as the data has already been arranged in the correct order. I'm a little unsure how to go about doing this, and wondered if anyone could point me in the right direction. Code:
Changing Text Colour
i had this script down but have modified it, somewhere along the way and can't see where, what i had was, if there were messages in the users inbox the word "Inbox" would go red, if there were unread messages in there the "Inbox" would go blue if there were no messages it would simple be black Code:
Comments Php Script Colour Change
i have just got a free php comment script of the net. but the defualt theme is black text on white back ground. Wile on my web site i have a dark back ground and white writing, so after many hours of php code readying and learning i have finaly managed to change most of the text into white exept for the last 3 text pices. 1. the "Name/ tilttle" of the comment/s 2. the "date and time" of when the comment was posted 3. the " comment/ text" which the user posted from what i have found i belive i need to set the colour in this part of the script here but everything i have tryed hasnt worked. 1. $COM_LANG['header'] = "Comments"; 2. $COM_LANG['months'] = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); 3. not sure where the code is for this :| i have just started with php.
Cell Colour Based On Field Data
I have a mysql database and i am using php to display some field data in a table cell on a page. The field data is either 'failed' or 'passed', how can i make the cell colour change depending on the field data result?
Image(jpeg) Upload & Resize Loses Colour?
I am uploading an image to a server and resizing the image then saving it to a directory,I had it working fine on my local machine (windows) but when i uploaded the code to the server (linux) - same directory structure etc, it didnt work the colour appeared to be removed from the image, as though the number of colours in the image was reduced to 2 or 4 or something? has anybody come accross similar problems with GD or image functions in php?
Running Background Job...
Is it possible to get a php3 script to check what day it is, and then do some stuff, If it’s let’s say Monday? This without you doing anything. Like a background - or cronjob… I guess you would use perl or something to do this, but that is not an option I have.
Background Processing
What is the technique you use for background processing? Like when user submit a task, the user could then wait for the result by email or through a result page. I'm wondering how would they do that?
Background Color
I am totally baffled by what is happening in my code. I have a section of code (shown below with two comment lines inserted). They are essentially identical text boxes (names and variables different). Yet, the first comes up with a white background and the second comes up with a yellow/gold background....
Run Process In Background
I want to run process from my php script in background. I try different functions from functions list but all of them whaiting for process ending. How can I run `wget -b ...` and finish my script, but wget must still working? I use PHP5, Linux, Apache2.
Background Processes
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc?
Php Running In The Background?
In order to run a php script - do I need to access it via a browser? Is there a way to write a php script and let it run from the shell in the background?
Running Php In The Background
I am trying to run a php executable (GTK) from a browser... now exec() does the job, but the browser hangs waiting for the .exe I have just called to finish, I assume so it can 'report back' to exec(), any ideas how I can get around this ? - I have tried backticks,passthru,system,exec - all with the same results, i.e. they all expect a returned value and sit around waiting for it. This is a windows app so /dev/null wont help & it is not a CGI with output I can dump anyway.
Run A Php In The Background Using Http
i have a script (script1) which needs to call another script (script2). It should not wait for the answer, so script2 should run in the background. I really need to call the php script using: http://urlof myscript/script2.php I don't want to use it as a cgi and use CLI. I did a test with fsockopen and curl and a timeout of 10 seconds and call http://urlof myscript/script1.php from my browser: Script1 stops after 10 seconds => OK Script2 has been called by script1 and continue to run in the background =>OK After 60 seconds Script2 is killed by php!! => KO :( The script is working fine if i call http://urlof myscript/script2.php from my browser. It needs around 120 seconds to finish. Why is it stopping after 60 seconds when I use fsockopen and call it from script1? Here is the script in SCRIPT1: $fp = fsockopen("$host", 80, $errno, $errstr, 30); stream_set_timeout($fp,10); if (!$fp) { echo "$errstr ($errno)<br /> "; } else { $out = "GET $path HTTP/1.1 "; $out .= "Host: $host "; $out .= "Connection: Close "; fwrite($fp, $out); $status = socket_get_status($fp); while (!feof($fp) && !$status['timed_out']) { echo fgets($fp, 128); $status = socket_get_status($fp); } fclose($fp); } I have added this in SCRIPT2: ignore_user_abort(FALSE); // becareful, FALSE really means it should ignore user abort !!! set_time_limit (120); ini_set("max_input_time",120); ini_set("max_execution_time",120); Do you have any idea?
Background Refresh
I am using php_move_file to upload some files to the server. I want to be able to support large files. But the Apache settings is that after 90 sec. the connections resets. This becomes a problem with large files (slow links). Is there anyway to write a script that would refresh in the background....
A Way To Get Current Background?
I have several websites running on a global script. Some pages, the backgrounds black, other, white. Sometimes people have the taste of posting black font on a black background, or white font on a white background. What I wanted is to know if theres a way to 'check' the current background color? Because I can then add in the script to 'change' any incorrect colors before posting. I'm not sure if theres a way for PHP to tap into CSS and check, but it would be alot easier to change the global script since its *Checking* for the background color rather then me do it per site and change it manually.
Background Redirection
I need to create a redirection from a php page to another, without having a web browser opened. Imagine that you make a php starting via command line or cron job, then your php is running in background and no web browser is open on it. How can this php (from the background, with no web browser opened) call (trigger) another php? please note that I'm not talking about include. I need that the background php gives control to ANOTHER php url . per what I tested the php 'header' command does not work and obviously also any javascript redirection cannot work because there is no web browser opened. so, finally, how can that php running in background call another php url?
Using SWF Files As Background
Im not sure if it posilbe, but im trying to get a SWF file as the background of my page, but the swf file is dynamically named. Its like a gallery and when a user clicks on the lick to that file, it displays the image /swf. but i want the file to appear as the background. code: echo "<body background = '".$POST['file_name']."'>"; ii have 3 files so far. file1, 2, 3 .swf. and i can easily view each one as a seperate file, and they work once i embed them as images. is this my php code, or do i have to look at my browser to display the swf as BG..?
Starting Application In Background
On my main page I have several hyperlinks which point to a php page that plays different .wav files. In the play_sound.php page I just echo the .wav file and when the link is clicked in the calling page the browser (IE6) opens Winamp and plays the sound (since I output a header with Content-type: audio/wav). It works great but is there any way to open the application in the background or at least minimized so you don't see it over the top of the main page? Is it a setting in HTML that determines this or does it have to be done through php?
Display Graphic As Background
I've just realised that my previous post was very confusing in usage of English. Therefore I am rephrasing it as following: How do I display a graphic file (e.g. archit01.jpg) as a background inside a HTML table. The graphic file is listed in a MYSQL table called gfx and the gfx_ID=archit01. hope it makes sense. :oops:
Exec In Background On Windows
How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function blocks until something.exe terminates. Just what I /don't/ want. (Wouldn't an & be nice here! Sigh) I need something.exe to disconnect and run in the background while I continue on with my script.
Sending Pings In The Background
I set up my CMS to open a small window that called up a script that sent pings in the background. I had also set up a script that sniffed out if the browser was blocking pop up windows for my CMS and asked the user to remove the block, but now, since I've changed comps, it seems that my damn anti virus is blocking it and won't let me change the settings! Is there any other way, maybe a temp cron, that I could run a script in the background and still allow the user to surf away?
Running A PHP Script In The Background
I'm currently working on a PHP script which is run from the bash prompt to perform various tasks. How can I get it to load itself into the background? (i.e. so the program runs, and continues to run "invisibly", but after executing the program you are returned to the bash prompt).
System Function To Run In Background
I have the following line of PHP code: $ret_val = system("PHP myscript.php $param1 $param2 >> output.txt &"); Obviously the intention is to run a PHP file in the background async'ly. This works 100% perfect on one server; running the script in the background without errors. On another server the above line runs the command immediately rather than in the background. Output is still redirected OK and no errors are reported. Does anyone know of a situation that might cause the above code wait for the child process to finish before continuing? The file was copied from one server to the other without any modifications. Furthor, both servers are identical in software. One was literally imaged from the other. The only difference might be the file permissions. I created some folders on both machines but I think on one of them I sudo'd to root to create a folder and on the other I was logged in as a user (so CHOWN might differ). In both cases though PHP has read/write access (no errors were reported and identical script output is produced). The permissions in question are those on the myscript.php and on the output.txt file produced. The PHP manual says nothing about file permissions affecting the ability for a target script to run in the background. Any thoughts? Should I be redirecting errout as well (e.g. 2>>errors.txt)? Maybe an error is being reported on the second server and that is why PHP is waiting? I can't see how PHP can know in advance that an error is going to happen before it starts running the script in the background though.
Background Text Image
How can I place text on a page like a watermark background. For example, I may want to put FOR SALE in large red letters in the center of a page at a 10% opacity then write text over it from the initial point of origin. I've tried using style commands, but the results are inconsistant.
A Tool To Generate Background
I am looking for a tool (script, plugin, code, ...) which can generate background image for webpage look at background on http://vtorrent.info/ page or on the Vista webpage. I want to create this in fly - only give two colours and expect result which will be created by function. Is any plugin for it? code in php or js or .. whatever ?
Exec Background Process
I want have PHP call another process (another PHP script at the moment but it may end up being a binary) in the background and not wait for process to complete, but rather instantly jump the the next line of code. I've tried things like: exec("./script.php &"); // script.php has executable permissions set exec("at -f ./script.php now"); // and #!/usr/bin/php at the top of the code Neither seem to work. They both execute script.php, but both hang around until script.php has completed.
XP Exec Background Process
I was trying to exec a background process on XP using PHP CLI, but could not get it to work. Suppose the command I want to spawn off is "cmd". On *nix, it is as easy as putting ampersand "&" at the end of the command. I tried the following on XP without working. exec("cmd"); exec("cmd >NUL"); exec("cmd /c cmd"); exec("start /b cmd"); I tried many combination, but on each one, PHP waits for cmd to exit before continuing. Doing this in Windows script host (cscript) is simple: Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd", 0, False The "False" parameter causes the Run method to continue immediately without waiting for the command to finish. So I could make my PHP file exec a VBS file that does the actual background execution of my command. PHP exec documentation says it will not wait if output of the command is redirected somewhere, but this didn't seem to work for me. If anyone has experience in doing something like this on Windows XP SP2,
MySQL Query In Background
Sometimes in PHP I need to run a query, but the query will take a long time, and my PHP doesn't need any feedback from the query. How do I make it so that my PHP just tells MySQL to execute the query and then just goes on executing the rest of the script instead of waiting for the query to complete before moving on?
Display Graphic As Background
How do I display a graphic file (e.g. archit01.jpg) as a background in a table of a PHP page if I have a table called gfx and the ...
Random Text & Background Colors?
Is there a way to generate colour hex strings that are guaranteed to be dark and thus good as random-generated text colours? something like ------------------- srand((double)microtime()*1000000); function tc() { $frag = range(0,6); $text = "#"; for ($i = 1; $i <= 6; $i++) { $text = $text . $frag[mt_rand(0, count($frag)-1)]; } return $text; } $text = tc(); -------------------- is what I have in mind.... but I really don't know how the hex codes for rgb realte to "darkness" And while I'm on the subject, whats the converse (for pale colours, for backgrounds) look like?
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.
Sending Lots Of Emails In The BACKGROUND?
I'm building a 'job posting' site of sorts. When a job is available in a particular state, I want the system to send an email to everyone who is 'watching' that state. I know how to do this, but I need to figure out a way to 'send the emails in the background' - ie: if an administrator adds a job to Wyoming, I don't want them to have to wait for the php script to finish selecting and e- mailing everyone watching the state before the administrator can move on and do other things. I originally thought that passing this task to the PHP command line would do the trick, but it turns out that a script like... exec("my php script that emails people"); echo "complete!"; ....does not echo "complete!" until the thousands of people have all had their info passed to the mail server (a long time). I suppose that I could get rid of this by just lumping everyone together in the Bcc: field of a single e-mail message, but at this point I'd like to keep that as a last resort and go with the personalization ("Hi James... a job has been posted in Wyoming"). Does anyone have any thoughts as to how I can send the emails without preventing the administrator from doing other tasks until the script has finished executing?
How To Start Script In The Background (using Exec())?
I have some troubles trying to start php script using exec() and leave it running in the background. Manual says: "If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends." So, I'm doing this: exec("/usr/local/bin/php /mydir/myscript.php >/dev/null 2>/dev/null &"); I don't recieve any output from "child" script, but "parent" script waits until "child" is doing its work.
Using Sessions To Change Background Color
I am trying to use session to store the background color throughout each page by session variables. I think the problem comes from the structure of my site. each page is accessed by ?topic=home or ?topic=tutorials It is setup as: example not actual code:
Launch A Background Task From A PHP Script?
For example, when a user posts on my message board, it may fire many e-mail notifications to other users, and other tasks. I want the posting confirmation page to end displaying quickly, without waiting for those notifications or other tasks to complete. So basically what I want is to launch 'background.php' from 'main.php', with the user seeing only the output of - and waiting only for the end of - 'main.php'. Without the need to wait for the end of the possibly long 'background.php', like if I had simply included it in 'main.php'. According to the PHP Manual, the function register_shutdown_function() was the solution "in PHP 4.0.6 and earlier under Apache", but "since PHP 4.1 the shutdown functions are called as the part of the request" so that PHP waits until the shutdown functions are completed before closing the connection to the user. E.g. in PHP 4.1+ this <?php function background () { echo 'Starting background task... ' // Do something long that I don't want the user to see or wait for sleep(5); echo 'End of background task. ' } echo 'Starting main script... ' register_shutdown_function('background'); echo 'End of main script. ' ?> will output: Starting main script... End of main script. Starting background task... End of background task. I want a way to output only: Starting main script... End of main script.
Print Table With Background Colors
I've a table in wich I've this CSS: ..oddrow{background-color:#FFFFFF} ..evenrow{background-color:#CCCCCC} The oddrows are white and the even are grey. BUT ! when I do print the table, there is nothing !!!
EXEC() Runs Process In Background
Exec, shell_exec, system, popen functions all run the process in the background. how can i get it to run the process normally. my code looks like this: <? exec("batch_file.bat"); ?> am i doing anything wrong?
Table Background Color Based On Value
I'm trying to make this happen on query from my database . $h1 = 4; $h2 = 5; if ($h1 == 4){$color="green";} if ($h2 == 5){$color="yellow";} print "<table><tr>"; print "<td bgcolor=$color>$h1</td>"; print "<td bgcolor=$color>$h2</td>"; print "</tr></table>";
Shell_exec Background Process *Windows*
I am trying to get a shell_exec command to run in the background. So far I have tried: $ret = shell_exec($ffmpegcmd1." >NUL 2>&1");$ret = shell_exec($ffmpegcmd1." >NUL 2>&1 &");$ret = shell_exec($ffmpegcmd1." >NUL"); without any luck.
Background Colors On Display Pages
Is it possible to display table data using a while loop, yet have each output row with a certain bg color depending on a value within that row. For instance, if I'm dislaying the incomes of various businesses, I want to show the business with a positive income with a green background, and the business with a negative income with a red background. Is this possible?
Forking A PHP Process Into The Background In A Web Server Environment
I have installed the PCNTL functions[1] on my PHP enabled webserver in the interest of being able to fork a process into the background so I can do some heavy processing but return control of the browser back to the user rather quickly. However, after mucking about with PCNTL for a while and not getting the results I expected, I finally stumbled across this line in the opening parragraph on PCNTL functions on PHP.net: "Process Control should not be enabled within a webserver environment and unexpected results may happen if any Process Control functions are used within a webserver environment." Seems like they should bold and highlight in red that line, but I digress. In any case, can anyone suggest a way to fork a process off to unload a large amount of processing and return control of the web browser to the user? All the examples and whatnot I have found assume a CLI version of PHP. I want to do this on the web server! [1]I am running Apache2/PHP4.3 on RHEL 4. I downloaded the RPM for PCNTL at
Imagerotate(), Producing A Black Background Color
I am having this Image, the background of the image is transparent But on rotation using imagerotate(), it is producing a black background color. This background color is coming on using any function on the original image ie, like imagecopy() etc . I have used imagecolortransparent() to suppress the color, but still the problem is coming.
Change Background Color In Table From 2nd Row Onwards?
i am displaying data in a html table with five rows of five columns each, the first row is a title row with blue background, and the 2nd row onwards is the data rows with a radio button. When a user click first row, nothing should happend, but when the user clicks the radio button or any column of the row, I wish to select the radio value (clicked) and set the background color to silver for the entire row of five columns. Here is my javascript code which is working fine, except it removed the first row style background color, which I don't wish to remove. Code:
Image Create Default Background Color
I have a script that crops and image and resizes it, but that's not the problem. If the image is smaller than the crop area, PHP just fills it in with black. Is there a way to make PHP fill it in with white instead of black?
|