Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

background image not loading in newly thrown html page by shell script

Shell Programming and Scripting


Tags
apache2, html, korn shell scripting

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
ravi18s's Unix or Linux Image
ravi18s ravi18s is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 26 May 2009, 8:56 AM EDT
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Data background image not loading in newly thrown html page by shell script

I m trying to throw back html page when a file is found.While throwing back html page, the background image is not coming. I am using Apache server.Please suggest how to resolve...
#!/bin/ksh
echo -e "Content-type: text/html\n\n"
echo "<html><head></head><body background=\"/asc/ppp.jpg\">"
echo "<center><h2> The File name with" echo $QUERY_STRING echo "is found </h2> </center>"
echo "</body></html>" exit 0

Last edited by ravi18s; 04-30-2009 at 03:10 AM..
Sponsored Links
    #2  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
ravi18s's Unix or Linux Image
ravi18s ravi18s is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 26 May 2009, 8:56 AM EDT
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
please suggest something, I googled lots of time but nothing happened...
Sponsored Links
    #3  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 18 December 2017, 12:53 AM EST
Location: Foxborough, MA
Posts: 8,203
Thanks: 231
Thanked 785 Times in 732 Posts
Please don't bump up the posts - it's against the Forum rules.
    #4  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
pludi's Unix or Linux Image
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,521
Thanks: 38
Thanked 335 Times in 308 Posts
Do you call this as a CGI script? Or are you just generating a static HTML file? Does the background image exist? Can the server locate it at the specified path? Does the web server have read access to the file? Could you properly format your code and put it in [code] and [/code]tags for readability?

Last edited by vgersh99; 04-30-2009 at 09:49 AM.. Reason: added [noparse]/[/noparse] tags for bb codes
Sponsored Links
    #5  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
ravi18s's Unix or Linux Image
ravi18s ravi18s is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 26 May 2009, 8:56 AM EDT
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
yes I am calling this as a CGI script, this script runs when an html form submit the values using get method, then after submitting this script runs and get the value from form and then html page is created. Background image do exist and web server can read it... but when html page gets created its background image is not coming..

dear vgresh99,
I am a new member in future I would not send such mails sorry for that
Sponsored Links
    #6  
Old Unix and Linux 04-30-2009   -   Original Discussion by ravi18s
pludi's Unix or Linux Image
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,521
Thanks: 38
Thanked 335 Times in 308 Posts
So when you call the background image directly in the browser it shows?

Are there any errors/messages when you call your script directly, or in Apaches error_log?
Sponsored Links
    #7  
Old Unix and Linux 05-05-2009   -   Original Discussion by ravi18s
ravi18s's Unix or Linux Image
ravi18s ravi18s is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 26 May 2009, 8:56 AM EDT
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
[Wed Apr 29 06:25:06 2009] [error] [client 130.20.144.17] (8)Exec format error: exec of '/home/edi/apache_2.2.4/cgi-bin/ppp.jpg' failed, referer: Domain Acquisition Service-Sedo.com

This error is coming ...its from error logs

On directly accessing the image from browser the image does not appear.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Function loading in a shell scripting like class loading in java mpsc_sela Shell Programming and Scripting 1 06-09-2008 08:02 AM
Invoking shell script from html/jsp page bubeshj Shell Programming and Scripting 2 06-28-2006 02:53 PM
Access shell scripts from HTML page nhatch Shell Programming and Scripting 4 03-01-2005 11:48 AM
loading a unix image ahaurek UNIX for Dummies Questions & Answers 1 05-09-2001 02:32 PM



All times are GMT -4. The time now is 03:02 AM.