PEAR question [message #25427] |
Tue, 05 June 2007 01:56 |
Eclipse User |
|
|
|
Originally posted by: dom061077.gmail.com
Hi! How Can I run my PEAR php files in eclipse PDT??It's like PEAR classes
can't be parses
|
|
|
Re: PEAR question [message #25468 is a reply to message #25427] |
Tue, 05 June 2007 10:18 |
Eclipse User |
|
|
|
Originally posted by: smserg.bk.ru
You can add path to pear in Project > properties > php include path >
libraries, and parser will find it.
Daniel wrote:
> Hi! How Can I run my PEAR php files in eclipse PDT??It's like PEAR
> classes can't be parses
>
|
|
|
Re: PEAR question [message #25753 is a reply to message #25468] |
Tue, 05 June 2007 17:08 |
Eclipse User |
|
|
|
Originally posted by: dom061077.gmail.com
It doesn't work...when I Run it as "PHP Script" the Browser Output only
show me html source code instead page. The source code is:
********
<?php
require_once 'Auth.php';
require_once 'HTML/Form.php';
function showLogin() {
/* Use the HTML_Form class to show our login form
*/
echo "<html><head></head><body>";
$form = new HTML_Form(htmlspecialchars($_SERVER['PHP_SELF']), 'post');
$form->addText('username', 'Username:');
$form->addPasswordOne('password', 'Password:');
$form->addSubmit('submit', 'Login');
$form->display();
echo "You are not currently logged in!";
echo "</body></html>";
}
$options = array (
'dsn' => 'mysql://root:luque@localhost/calendar',
'table' => 'users',
'usernamecol' => 'user_id',
'passwordcol' => 'password',
'crypttype' => 'md5'
);
$dsn = 'mysql://root:luque@localhost/calendar';
$a = new Auth("DB", $options, 'showLogin');
$a->start();
if ($a->checkAuth()) {
header('location:calendar.php');
}
?>
********
The Browser Output show me:
X-Powered-By: PHP/5.2.0
Set-Cookie: ZendDebuggerCookie=127.0.0.1%3A10000%3A0||004|77742D65|1000;
path=/
Set-Cookie: PHPSESSID=16c7ca91ce8a8fd7116c24bec5630ea6; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-type: text/html
<html><head></head><body><form action="C:\Archivos de programa\Apache
Group\Apache2\htdocs\webcalendar\login.php" method="post" >
<table >
<tr>
<th align="right" valign="top">Username:</th>
<td >
<input type="text" name="username" size="20" value="" />
</td>
</tr>
<tr>
<th align="right" valign="top">Password:</th>
<td >
<input type="password" name="password" size="8" value="" />
</td>
</tr>
<tr>
<th align="right" valign="top"> </th>
<td >
<input type="submit" name="submit" value="Login" />
</td>
</tr>
</table>
<input type="hidden" name="_fields" value="username:password:submit" />
</form>
You are not currently logged in!</body></html>
*******
Thanks a lot!
|
|
|
Re: PEAR question [message #25759 is a reply to message #25753] |
Tue, 05 June 2007 22:18 |
Eclipse User |
|
|
|
Originally posted by: andrescpaz-eclipse.yahoo.com
Hi Daniel,
I don't understand your question, but since you're generating HTML I think you want to run this script as "PHP Web Page" and not as "PHP Script", that's to run command line scripts.
What you got was not a browser output, but the command line output.
-a.
Daniel wrote:
> It doesn't work...when I Run it as "PHP Script" the Browser Output only
> show me html source code instead page. The source code is:
> ********
> <?php
>
> require_once 'Auth.php';
> require_once 'HTML/Form.php';
> function showLogin() {
> /* Use the HTML_Form class to show our login form
> */
> echo "<html><head></head><body>";
> $form = new HTML_Form(htmlspecialchars($_SERVER['PHP_SELF']), 'post');
> $form->addText('username', 'Username:');
> $form->addPasswordOne('password', 'Password:');
> $form->addSubmit('submit', 'Login');
> $form->display();
> echo "You are not currently logged in!";
> echo "</body></html>";
> }
>
> $options = array (
> 'dsn' => 'mysql://root:luque@localhost/calendar',
> 'table' => 'users',
> 'usernamecol' => 'user_id',
> 'passwordcol' => 'password',
> 'crypttype' => 'md5'
> );
> $dsn = 'mysql://root:luque@localhost/calendar';
>
> $a = new Auth("DB", $options, 'showLogin');
> $a->start();
>
> if ($a->checkAuth()) {
> header('location:calendar.php');
> }
>
> ?>
> ********
>
> The Browser Output show me:
>
>
> X-Powered-By: PHP/5.2.0
> Set-Cookie: ZendDebuggerCookie=127.0.0.1%3A10000%3A0||004|77742D65|1000;
> path=/
> Set-Cookie: PHPSESSID=16c7ca91ce8a8fd7116c24bec5630ea6; path=/
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
> Pragma: no-cache
> Content-type: text/html
>
> <html><head></head><body><form action="C:\Archivos de programa\Apache
> Group\Apache2\htdocs\webcalendar\login.php" method="post" >
> <table >
> <tr>
> <th align="right" valign="top">Username:</th>
> <td >
> <input type="text" name="username" size="20" value="" />
> </td>
> </tr>
> <tr>
> <th align="right" valign="top">Password:</th>
> <td >
> <input type="password" name="password" size="8" value="" />
> </td>
> </tr>
> <tr>
> <th align="right" valign="top"> </th>
> <td >
> <input type="submit" name="submit" value="Login" />
> </td>
> </tr>
> </table>
> <input type="hidden" name="_fields" value="username:password:submit" />
> </form>
>
> You are not currently logged in!</body></html>
> *******
> Thanks a lot!
>
>
|
|
|
Re: PEAR question [message #26059 is a reply to message #25759] |
Wed, 06 June 2007 17:08 |
Eclipse User |
|
|
|
Originally posted by: dom061077.gmail.com
Ok,but when I go to "Run->Run As->PHP Web Page" It doens't work. The web
browser into eclipse shows me "Page Not Found". By the way,the php source
code without PEAR works fine into "Browser Output" and it shows me Web
Page Not HTML source code.
Thanks
|
|
|
Re: PEAR question [message #27059 is a reply to message #26059] |
Fri, 08 June 2007 23:37 |
Eclipse User |
|
|
|
Originally posted by: nobody.fergusonv.com
I think that your inclusion of the PEAR code is causing an error, and
your webserver/PHP is configured to not display errors, resulting in a
404. I would recommend enabling 'display_errors' in your test environment.
tjjfv
Daniel wrote:
> Ok,but when I go to "Run->Run As->PHP Web Page" It doens't work. The web
> browser into eclipse shows me "Page Not Found". By the way,the php
> source code without PEAR works fine into "Browser Output" and it shows
> me Web Page Not HTML source code.
>
> Thanks
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05144 seconds