Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Problem running php pages (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Problem running php pages
#1093
garfield (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Problem running php pages 2 Years, 2 Months ago Karma: 0  
Hi,

I downloaded the php-pages component from this site and added a php page named contactform. This contactform works perfectly when I run it in a wrapper but then I don't have the same looks as my website.
The contactform uses a captcha-field and when I enter the code it keeps saying I entered it wrong (though in a wrapper it works perfectly)
I searched this forum and found this:
<form method="post" action="' . $filename . '">
	<input type="...
The $filename = index.php?option=com_php&Itemid=20 When I try the next example, after submit I get: "Please choose a File", so I guess it does nothing with the hidden fields. Is their something I need to additionally add to the script?
<form method="post" action="' . $filename . '">
	<input type="hidden" name="option" value="com_php">
	<input type="hidden" name="Itemid" value="20">...
The $filename = index.php What am I doing wrong?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1094
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Problem running php pages 2 Years, 2 Months ago Karma: 10  
You're doing the right thing as far as I can see.

The first the form submits ok? But the captcha doesn't work?
Second doesn't submit?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1095
garfield (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Problem running php pages 2 Years, 2 Months ago Karma: 0  
If I run the page using a wrapper from joomla it works fine.

the first:
When I put the script in the manage pages then the form is visible and I can fill it in but when I submit it gives the message the captchacode you entered is not correct.
I comment out the captchacode and the form works perfectly.
The path to the captchacodefiles is right because the captchaimage is loading (otherwise I would get an image not found.

Can there be a problem when including the captcha php-files?

the second:
The form displays the right way but when I submit the form redirects to index.php and not index.php?option=com_php&Itemid=20 although I put the option and Itemid in hidden fields.
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/11/24 03:47 By garfield.
  The administrator has disabled public write access.
#1096
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Problem running php pages 2 Years, 2 Months ago Karma: 10  
Do you have error reporting turned on? You can do it at runtime:

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
If the captcha files were not included properly, you'd get E_WARNING level errors. The only other thing I can think of is if the captcha depends on global variables. There should be E_NOTICE level errors displayed if that is the case. The PHP Component runs inside a function, so globals are out of scope. They have to be referenced with $GLOBALS array, or importing into the local scope with the "global" keyword. Another thing to look for is if the captcha has error suppression, or try/catch blocks that prevent the errors from surfacing.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.