Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > php fatal error I need help!

php fatal error I need help!
Thread Tools
Professional Poster
Join Date: Jan 2000
Location: south
Status: Offline
Reply With Quote
Nov 14, 2002, 04:37 PM
 
Hi I was wondering if you guys could help me with a few problems I am having getting some php code to render. I don't know all that much about php I am sort of a copy and paste kind of guy. Maybe I am a complete idiot and this stuff would work if I knew anything.

I have two seperate problems.

1) I have a site that uses header.php and footer.php files so that I can update one file instead of many. I was also using the code I found at this site so that the title tag could be different on each page.
Here is an example of the code for the index

[php]<? $strTitle = 'Mich&egrave;le&rsquo;s agenda';$strCaption = 'Agenda';include("http://michelelosier.com/php/header.php");?>[/php]


I developed the site on my mac and everything worked fine I also uploaded to one server (a subdomain) running php 4.2 and everything was fine. I then uploaded it to the real domain on a different server with php 4.12 and it didn't show up at all. Is the new servre missing a possible module or something like that? Is there anyway I can get the stuff to work or should I look for a different server? Do I or can I define the function somehow?

2) I was using a script I found

here so that I could rotate an between two images everytime a certain page reloaded. Once again this worked fine on my mac and on the subdomain but when I put it on the other server I get this error:

Fatal error: Call to undefined function: showad() in /directory/blah/blal/index.php on line 8

I wrote to there support center and this was their response:
Honestly, I'm not sure how I can help here. As you can see, even PHP's main site does not list the showad() function:
http://www.php.net/quickref.php

Please let us know if there's anything we can do...
I then asked about there version of php and this was the response;
I doubt that it has anything to do with the version of PHP as 4.12 is not very old itself. Maybe your previous host had compileed PHP with some modules that we ddn't? We obviously will update PHP in the future, but there's no set date as of right now.
Now in my opinion these are not very insightful or useful responses. Does anybody have any ideas how to fix this or do any of you have a quick bit of code that would rotate two images that don't need to link to anything. Is there some way I can define the function so that it works? I did the correct include( ) thingy in the header as well

Any help on this would be greatly appreciated.

One more problem I forgot to mention. I made a gallery of pictures and I each gallery page has something like this at the top

[php]<? $strTitle = 'page title';$strCaption = 'title of picture';$strCaption2 = 'dexcription of picture'; $strPrev = 'cosi_02.php';include("http://michelelosier.com/php/photo_head_v_eng.php");?>
<img src="http://michelelosier.com/images/photos/cosi_03.jpg" alt="" width="425" height="640" hspace="0" border="0">[/php]

the $strPrev and $strNext are for images in the header that will lead to either the previous page or the next one in the gallery. Once again it worked on the mac, the subdomain but not the other one. Help
(Last edited by shmerek; Nov 14, 2002 at 04:55 PM. )
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 14, 2002, 05:13 PM
 
instead of: include("http://michelelosier.com/php/header.php");

try: include("/home/michelelosier.com/php/header.php");

or whatever your path is, on that server. i'm sure you know what i mean though
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Professional Poster
Join Date: Dec 2001
Location: somewhere
Status: Offline
Reply With Quote
Nov 14, 2002, 05:38 PM
 
What type of server did you upload to? Unix flavors are case sensitive.

Are you sure that the showad() function wasn't a user defined function that you need to have an include file for? I would bet that they wrote the function themselves, and have an include file for it.
     
shmerek  (op)
Professional Poster
Join Date: Jan 2000
Location: south
Status: Offline
Reply With Quote
Nov 17, 2002, 08:35 PM
 
Originally posted by wallinbl:
What type of server did you upload to? Unix flavors are case sensitive.

Are you sure that the showad() function wasn't a user defined function that you need to have an include file for? I would bet that they wrote the function themselves, and have an include file for it.
There was a include file that they wrote. I will try the different path thingy. They are running redhat 7.2 I think.
     
shmerek  (op)
Professional Poster
Join Date: Jan 2000
Location: south
Status: Offline
Reply With Quote
Nov 18, 2002, 05:54 PM
 
*Edit scratch that.

Thanks philzilla you saved me, I owe you a beer!
(Last edited by shmerek; Nov 18, 2002 at 07:40 PM. )
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Nov 19, 2002, 04:34 AM
 
Originally posted by shmerek:
Thanks philzilla you saved me, I owe you a beer!
accepted!
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:21 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2