php-general Digest 20 Aug 2011 00:49:30 -0000 Issue 7448

Topics (messages 314563 through 314572):

Can't create new projects with Netbeans as nonadmin
        314563 by: Andreas

New version : EasyPHP (Wamp Server) 5.3.7.0 with PHP 5.3.7
        314564 by: EasyPHP
        314565 by: Sharl.Jimh.Tsin

SOAP-ERROR: Parsing Schema: unresolved element 'ref' attribute
        314566 by: Ignacio Marín Hernández
        314567 by: Richard Quadling
        314568 by: Ignacio Marín Hernández
        314569 by: Ignacio Marín Hernández
        314570 by: Richard Quadling

Anyone has mcrypt working with Zend Community Edition and Mac OS X Lion?
        314571 by: robert mena

Re: Login with Remember me Feature
        314572 by: Alekto Antarctica

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi,

Netbeans 7.0.1 on WinXP.

I can't create new projects with Netbeans without being logged in as administrator.
When I call   file->new project   I only get the category "Samples".
The category "PHP" with the empty projects only appears when I'm logged in as Administrator.

How can I create projects as normal user?


regards

--- End Message ---
--- Begin Message ---
Hi

EasyPHP (Wamp Server) 5.3.7.0 is out and includes PHP 5.3.7

PHP 5.3.7 VC9 | Apache 2.2.19 VC9 | MySQL 5.5.15 | PhpMyAdmin 3.4.3.2
| Xdebug 2.1.2

* Features *
- avalaible server port automatically detected (no more port conflict)
- administration page :
 > apache configuration manager (timezone, port)
 > php configuration manager (max execution time, error reporting, upload
   max filesize)
 > create/delete alias
 > add/list modules (wordpress, drupal, joomla, prestashop, spip, webgrind,
   xdebug manager...)
 > phpinfo
 > extensions
 > mysql manager : phpmyadmin

* Install *
- For administrators, EasyPHP is installed in "Program Files"
- For non-elevated users, EasyPHP is "My Documents"
- Or, on an USB key, external drive, memory stick…

* Apache Conf. *
- Since 5.3.4.0, "localhost" is not used anymore. "127.0.0.1" is used
 instead (Windows Vista/Seven hosts file permission problem)

Enjoy!

Website : www.easyphp.org
Screenshots : www.easyphp.org/screenshots.php
Facebook page : www.facebook.com/easywamp
Twitter : www.twitter.com/easyphp

--- End Message ---
--- Begin Message ---
在 2011-08-19五的 15:16 +0800,EasyPHP写道:
> Hi
> 
> EasyPHP (Wamp Server) 5.3.7.0 is out and includes PHP 5.3.7
> 
> PHP 5.3.7 VC9 | Apache 2.2.19 VC9 | MySQL 5.5.15 | PhpMyAdmin 3.4.3.2
> | Xdebug 2.1.2
> 
> * Features *
> - avalaible server port automatically detected (no more port conflict)
> - administration page :
>  > apache configuration manager (timezone, port)
>  > php configuration manager (max execution time, error reporting, upload
>    max filesize)
>  > create/delete alias
>  > add/list modules (wordpress, drupal, joomla, prestashop, spip, webgrind,
>    xdebug manager...)
>  > phpinfo
>  > extensions
>  > mysql manager : phpmyadmin
> 
> * Install *
> - For administrators, EasyPHP is installed in "Program Files"
> - For non-elevated users, EasyPHP is "My Documents"
> - Or, on an USB key, external drive, memory stick…
> 
> * Apache Conf. *
> - Since 5.3.4.0, "localhost" is not used anymore. "127.0.0.1" is used
>  instead (Windows Vista/Seven hosts file permission problem)
> 
> Enjoy!
> 
> Website : www.easyphp.org
> Screenshots : www.easyphp.org/screenshots.php
> Facebook page : www.facebook.com/easywamp
> Twitter : www.twitter.com/easyphp
> 

so fast,Great Job!

-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


--- End Message ---
--- Begin Message ---
Hi everybody!

I've got some troubles trying to connect with a WS.

I'd tried that with natives functions:

$web_service="http://url_of_the_webservice.asmx?WSDL<http://url_of_the_webservice.asmx/?WSDL>
";

try {
$client = new SoapClient($web_service, array('soap_version'   => SOAP_1_1,
                                             'encoding'=>'utf-8',
                                             'trace' => TRUE,
                                             'STYLE' => SOAP_DOCUMENT,

                'use'   => SOAP_LITERAL

                                            )
                        );


}
catch (SoapFault $exception) {
        //ERROR!!!
        echo "<h1>A exception has ocurred: </h1> ";
        echo $exception;

}


and i recived this error:

A exception has ocurred:
SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unresolved element
'ref' attribute in /var/www/sites/version_2/SOAPdingus.php:20 Stack trace:
#0 /var/www/sites/version_2/
SOAPexample.php(20): SoapClient->__construct('http://services...', Array) #1
{main}



We are working with PHP 5.1.6 (but we tried too in a server with PHP 5.3.4
with the same error). You must know that we connect with others WS without
any kind of problems.

--- End Message ---
--- Begin Message ---
2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
> $web_service="http://url_of_the_webservice.asmx?WSDL<http://url_of_the_webservice.asmx/?WSDL>
> ";

Surely, that should be ...

$web_service="http://url_of_the_webservice.asmx?WSDL";;

And sorry for calling you Surely.

Richard.
-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--- End Message ---
--- Begin Message ---
Dear Richard Surely (hehe):

I don´t understand what do you want to say with "that should be
$web_service="http://url_of_the_webservice.asmx?WSDL<http://url_of_the_webservice.asmx/?WSDL>
";"

Obviusly, "url_of_the_web_sevice" it's just an example. With the real url I
can read without any problems the especifications of the WSDL. But i recived
that error when I trie to connect doing
new SoapClient($web_service, array('soap_version'   => SOAP_1_1,
                                             'encoding'=>'utf-8',
                                             'trace' => TRUE,
                                             'STYLE' => SOAP_DOCUMENT,
                                              'use'   => SOAP_LITERAL

                                            )
                        );

Thanks!




El 19 de agosto de 2011 11:26, Richard Quadling <rquadl...@gmail.com>escribió:

2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
> > $web_service="http://url_of_the_webservice.asmx?WSDL<
> http://url_of_the_webservice.asmx/?WSDL>
> > ";
>
> Surely, that should be ...
>
> $web_service="http://url_of_the_webservice.asmx?WSDL";;
>
> And sorry for calling you Surely.
>
> Richard.
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>

--- End Message ---
--- Begin Message ---
mmm, i think i understand you now!

But the url it's ok, it's only
$web_service="http://url_of_the_webservice.asmx?WSDL";;

The second part between "< .... >"  ($web_service="
http://url_of_the_webservice.asmx?WSDL<
http://url_of_the_webservice.asmx/?WSDL>") was Gmail who wrote it  (not me)
when I forward the email.

LoL

By the way, Thanx fro the answer!

El 19 de agosto de 2011 12:18, Richard Quadling <rquadl...@gmail.com>escribió:

> 2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
> > Dear Richard Surely (hehe):
> >
> > I don´t understand what do you want to say with "that should be
> > $web_service="http://url_of_the_webservice.asmx?WSDL";";
> >
> > Obviusly, "url_of_the_web_sevice" it's just an example. With the real url
> I
> > can read without any problems the especifications of the WSDL. But i
> recived
> > that error when I trie to connect doing
> > new SoapClient($web_service, array('soap_version'   => SOAP_1_1,
> >                                              'encoding'=>'utf-8',
> >                                              'trace' => TRUE,
> >                                              'STYLE' => SOAP_DOCUMENT,
> >                                               'use'   => SOAP_LITERAL
> >
> >                                             )
> >                         );
> >
> > Thanks!
> >
> >
> >
> >
> > El 19 de agosto de 2011 11:26, Richard Quadling <rquadl...@gmail.com>
> > escribió:
> >>
> >> 2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
> >> >
> >> > $web_service="http://url_of_the_webservice.asmx?WSDL<
> http://url_of_the_webservice.asmx/?WSDL>
> >> > ";
> >>
> >> Surely, that should be ...
> >>
> >> $web_service="http://url_of_the_webservice.asmx?WSDL";;
> >>
> >> And sorry for calling you Surely.
> >>
> >> Richard.
> >> --
> >> Richard Quadling
> >> Twitter : EE : Zend : PHPDoc
> >> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
> >
> >
>
> Your url was ...
>
> http://www.site.com/service?wsdl<http://www.site.com/service?wsdl>
>
> Rather than ...
>
> http://www.site.com/service?wsdl
>
> Can you provide the URL?
> --
> Richard Quadling
> Twitter : EE : Zend : PHPDoc
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>

--- End Message ---
--- Begin Message ---
Ah! The joy to mail readers.

If you can supply a valid URL, I can take a look and see what it is doing.

2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
> mmm, i think i understand you now!
>
> But the url it's ok, it's only
> $web_service="http://url_of_the_webservice.asmx?WSDL";;
>
> The second part between "< .... >"
> ($web_service="http://url_of_the_webservice.asmx?WSDL<http://url_of_the_webservice.asmx/?WSDL>")
> was Gmail who wrote it  (not me) when I forward the email.
>
> LoL
>
> By the way, Thanx fro the answer!
>
> El 19 de agosto de 2011 12:18, Richard Quadling <rquadl...@gmail.com>
> escribió:
>>
>> 2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
>> > Dear Richard Surely (hehe):
>> >
>> > I don´t understand what do you want to say with "that should be
>> > $web_service="http://url_of_the_webservice.asmx?WSDL";";
>> >
>> > Obviusly, "url_of_the_web_sevice" it's just an example. With the real
>> > url I
>> > can read without any problems the especifications of the WSDL. But i
>> > recived
>> > that error when I trie to connect doing
>> > new SoapClient($web_service, array('soap_version'   => SOAP_1_1,
>> >                                              'encoding'=>'utf-8',
>> >                                              'trace' => TRUE,
>> >                                              'STYLE' => SOAP_DOCUMENT,
>> >                                               'use'   => SOAP_LITERAL
>> >
>> >                                             )
>> >                         );
>> >
>> > Thanks!
>> >
>> >
>> >
>> >
>> > El 19 de agosto de 2011 11:26, Richard Quadling <rquadl...@gmail.com>
>> > escribió:
>> >>
>> >> 2011/8/19 Ignacio Marín Hernández <nah...@gmail.com>:
>> >> >
>> >> >
>> >> > $web_service="http://url_of_the_webservice.asmx?WSDL<http://url_of_the_webservice.asmx/?WSDL>
>> >> > ";
>> >>
>> >> Surely, that should be ...
>> >>
>> >> $web_service="http://url_of_the_webservice.asmx?WSDL";;
>> >>
>> >> And sorry for calling you Surely.
>> >>
>> >> Richard.
>> >> --
>> >> Richard Quadling
>> >> Twitter : EE : Zend : PHPDoc
>> >> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>> >
>> >
>>
>> Your url was ...
>>
>> http://www.site.com/service?wsdl<http://www.site.com/service?wsdl>
>>
>> Rather than ...
>>
>> http://www.site.com/service?wsdl
>>
>> Can you provide the URL?
>> --
>> Richard Quadling
>> Twitter : EE : Zend : PHPDoc
>> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
>
>



-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

--- End Message ---
--- Begin Message ---
Hi,

After I've upgraded it stopped working and even if I reinstall the Zend CE
package it complains.

Regards.

--- End Message ---
--- Begin Message ---
Thank you for all the helpful input so far!

I have now tried to implement the changes you suggested, but I unfortunately
keep getting an error in line 114, in {-bracket in the switch statement. I
know it is not very desirable to send all the code in a mail, but I think
this is the best solution to find where the error(s) are located.

Also when it comes to implementing the loggedin-function as Geoff Shang so
kindly suggested for the config.php. I keep getting an error message that
says that there is an error in the * "return true;" - line

*

*function loggedin()
{*

*if (isset($_SESSIONS['username']) || isset($_COOKIE['username']))
return true;
else
return false;*

*}*


So for now this code-block is the same as it used to be, because this done
not generate any errors.

When it comes to the function loggedin() inside the connexions.php, I am not
sure where to call the function. Should this be just before the comparing of
the password?

..........or before the switch statement?


*connextion.php*

*<?php*

*include('config.php');*

*?>*

*
*

*<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>*

*    <head>
             <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
            <link href="<?php echo $design; ?>/style.css" rel="stylesheet"
title="Style" />
            <title>Connexion</title>
  </head>

<body>  <div class="header">*

*               <a href="<?php echo $url_home; ?>"><img src="<?php echo
$design; ?>/images/logo.png" alt="Members Area" /></a>*

*          </div>*

*<?php*

*// LOGGOUT:
//If the user is logged, we log him out*

*if(isset($_SESSION['username']))
{
     //We log him out by deleting the username and userid sessions
            unset($_SESSION['username'], $_SESSION['userid'],
$_SESSION['usr_level']);*

*?>*

*<div class="message">You have successfuly been loged out.<br />
<a href="<?php echo $url_home; ?>">Home</a></div>

<?php*

*} // close the if-loop "user logged in"*

*else
{*

*        $ousername = '';*

*        //We check if the form has been sent
        if(isset($_POST['username'], $_POST['password']))*

*        {*

*                //We remove slashes depending on the configuration
                // And encrypt the password using salt and md5*

*                if(get_magic_quotes_gpc())
                 {*

*                        $ousername = stripslashes($_POST['username']);
                        $username =
mysql_real_escape_string(stripslashes($_POST['username']));
                        $password = stripslashes($_POST['password']);*

*                        $salt = sha1(md5($password));
                        $password = md5($salt.$password);*

*                } // close the remove slashes and encrypting-loop*

*                else
                     {*

*                        $username =
mysql_real_escape_string($_POST['username']);
                        $password = $_POST['password'];*

*                        $salt = sha1(md5($password));
                        $password = md5($salt.$password);*

*                } // close the elese: "get_magic_quotes_gpc()" - block*

*              *

*                //We get the password of the user*

*                $req = mysql_query('select password,id,usr_level from users
where username="'.$username.'"');
                $dn = mysql_fetch_array($req);*

*               //Get user level of the user*

*                $usr_level = $dn['usr_level'];*

*
*

*               //  if (loggedin()){ ------> should be placed her??*

*                *

*                //We compare the submited password and the real one, and we
check if the user exists  *

*               if($dn['password']==$password and mysql_num_rows($req)>0)
                {                        *

*                        //If the password is ok, we set the $loginok var to
true
                        $loginok = true;*

*                        //If the password is good, we dont show the form
                        $form = false;
                *

*                                  // If the user is alredy logged in
                                  if ($loginok)
                                  {
                                           if ($remember=="on")

                                           setcookie("username", $username,
time()+3600*48);*

*                                          else                            *

*
                                //We save the user name in the session
username and the user Id in the session userid*

*                                                 $_SESSION['username'] =
$username;
                                                 $_SESSION['userid'] =
$dn['id'];
                                                 $_SESSION['usr_level'] =
$dn['usr_level'];
               *

*               //  if (loggedin()){ ------> should be placed her??
             *

*                                           switch ($usr_level)  *

*                                         {
                                         case admin:
                                               $access_name = "admin";
                                               $page_suffix = "admin";
                                       break;*

*                                       case newbie:
                                              $access_name = "newbie";
                                              $page_suffix = "newbe";
                                       break;*

*                                        case advanced:
                                               $access_name = "advanced";
                                               $page_suffix = "advanced";
                                       break
                               } //close the switch-looop*

*                           }  // close the if-logged in - loop  *

*  ?>*

*<html><head>
<title>Redirecting...</title>

<meta http-equiv="REFRESH" content="10;url=http://<?php echo
$_SERVER["HTTP_HOST"] . "/index_$page_suffix.html"?>">*

*</head><body>*

*<div class="message">You have successfully been logged in. You can
now access the <?php echo $access_name ?> area.<br /></div>*

*</body> </html>*

*<?php*

*                  } // the comparing of passwords
          else
                {*

*                        //Otherwise, we say the password is incorrect.*

*                        $loginok = false;
                        $form = true;
                        $message = 'The username or password is incorrect.';
*

*                } // close the else-coparing of passwords
         } //close the $form-loop, ($form = false;)*

*        else*

*        {*

*                $form = true;*

*        } // close the password is not good, ($form = true;)*

*
*

*        // if $form is true, password is not good. Display $message, (what
is $message????)*

*        if($form)
        {*

*                //We display a message if necessary
                if(isset($message))
                {
                echo '<div class="message">'.$message.'</div>';
                } // close the display-block*

*       //We display the form, redirect back to login-page
       header("Location: header_login.php");

        } // close the display message if-loop*

*
*

*?>*

*               *

*        </body> </html>*

--- End Message ---

Reply via email to