Jump to content

Search the Community

Showing results for tags 'pear'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 8 results

  1. I can not find why my pear directory is failing. DB.php which is in the pear directory does not open. I have pasted code to show the path of the server to the secondary website(see the red below for the code and the output). The path that I can see is: /home1/nuclearp/public_html/libs/pear/DB.php Thanks to anyone who can see why I am getting my error. This is the index.php //this script reads the path and is listed in the output below: <?php $path = getcwd(); echo "This Is Your Absolute Path: "; echo $path; ?> <?php require_once("includes/ru_config.php"); require_once("includes/ru_connection.php"); require_once("includes/ru_data.php"); require_once("includes/ru_utils.php"); require_once("libs/ru_multi_smarty.php"); $smarty->display("index.tpl"); ?>This is ru_config.php <?php //require_once(dirname(__FILE__) . 'ru_4pear.php'); ini_set("include_path", ini_get("include_path") . ":/home1/nuclearp/public_html/libs/pear/"); require_once('DB.php'); This is the output from www.atc-roofing.com (the index.php result)
  2. Hi Guys, I've got xampp running on my machine with wordpress, and had 2 security related questions: A) I was constantly running into issues with wordpress and trying to find includes. I'm building a plugin, so on the plugin's main file, I just added a 'set_include_path' function equal to the root directory of my website. Then, the require_once, and include functions that are also on that page seem to have stopped having issues. Are there any security issues with using the set_include_path, and setting it to say 'C:/htdocs/home'? B) I used Xampp to install apache, mysql, and php. Until recently, I had no idea what PEAR was. I'm curious though...is PEAR installed by default with PHP or Xampp? Thanks for any help guys
  3. My developer has given me a class file (attached) to handle sending email, however sending email from within the app does not work (the developer is not available at the moment). My website host has said they support PEAR for sending email, and have provided the following code. which I have tested and it works (with the necessary variable values being defined before of course). $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } For the test email script that works with the above, there is a require_once to "Mail.php" and include_path=".;..\Pear" in a .user.ini file. The test email script is in the root of the website and so is the PEAR folder. I need help changing the cls.SendEmail.php file so that the app can send email. Thanks for the assistance. cls.SendEmail.php
  4. I have a site, up and running on the internet and want to run it locally. On my Mac I have Zend CE and can access my database with mysqli without a problem. The existing site uses Pear MDB2 to access the database. So, I installed MDB2 on my local machine and still couldn't access the database through the MDB2 code that works on the web server. I added an array to try to open the database connection on port number 10088 but that doesn't make any difference. I am new to Pear and MDB2. Any help appreciated. To illustrate the problem I have created code that just opens the database directly and then fails with MDB2. Since it works in the first case, the database, username, etc. are all working. <?php ini_set("display_errors", "1"); error_reporting(-1); ini_set('include_path', ini_get('include_path') . ':/home/davidann/php'.':/usr/local/zend/bin'); //Mysqli direct include_once('setUnamePass.php'); $link = mysqli_connect("localhost", DBUSER, DBPASS, DATABASE) or die("Unable to connect!"); echo 'Success using mysqli directly'; $result= mysqli_close($link); //MDB2 include_once('MDB2.php'); define('DB_DSN', 'mysqli://'.DBUSER.':'.DBPASS.'@localhost/'.DATABASE); class valuation { public function __construct() { //open database connection //$options = array( // 'port' => 10088,); $this->db_connection = MDB2::connect(DB_DSN); if (PEAR::isError($this->db_connection)) { exit($this->db_connection->getMessage()); } //set fetch mode to associative $this->db_connection->setFetchMode(MDB2_FETCHMODE_ASSOC); } } $valuation = new valuation(); ?> The output is as follows: Success using mysqli directly Strict Standards: Declaration of MDB2_Driver_Common::raiseError() should be compatible with that of PEAR::raiseError() in /usr/local/zend/bin/MDB2.php on line 990 Strict Standards: Non-static method MDB2::connect() should not be called statically, assuming $this from incompatible context in /usr/local/zend/apache2/htdocs/NewFolder/NewFolder/ezvaluation2/www/ezvaluation.com/valuation/testdbopen.php on line 22 Strict Standards: Non-static method MDB2::factory() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 433 Strict Standards: Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 376 Strict Standards: Non-static method MDB2::loadClass() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 385 Strict Standards: Non-static method MDB2::classExists() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 327 Strict Standards: Non-static method MDB2::fileExists() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 335 Strict Standards: Non-static method MDB2::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 340 Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 574 Strict Standards: Non-static method MDB2::errorMessage() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 972 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 743 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 386 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/bin/MDB2.php on line 434 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/zend/apache2/htdocs/NewFolder/NewFolder/ezvaluation2/www/ezvaluation.com/valuation/testdbopen.php on line 23 MDB2 Error: not found
  5. Getting the following error after doing a test relocation of a website to a new shared server. Fatal error! Your request can not be executed! Fatal error: Cannot use object of type PEAR_Error as array in /data/19/3/11/99/3011262/user/3343466/htdocs/HTJ/system/ext/I18N/LangData.php on line 66 checked the LangData file and here's the 'offending' code, from line 62-72 public static function createLangDataFromServer($lang_data) { $langData = new LangData(); $langData->setID($lang_data['lang_id']); $langData->setCaption($lang_data['name']); $langData->setMeta($lang_data['meta']); $langData->setErrorText($lang_data['error_text']); return $langData; } Stumped as to what might be causing this. Keep in mind he site was originally built on a Smarty php basis.
  6. I am attempting to implement an API on my website using WSDL through SOAP. My hosting company (fatcow) does not support PHP SOAP. They do however support PEAR SOAP 0.9.1. I have continuosly ran into the error: Server was unable to process request. --- Object reference not set to an instance of an object. I believe I am possibly forming the XML SOAP request incorrectly. The getLastRequest() method is not returning anything for debugging. The var_dump() method is returning an enormous amount of information. I am looking for some guidance in debugging this SOAP call. I have included my php code below with the resulting XML SOAP request found in my var_dump. <?php require_once 'SOAP/Client.php'; $WSDL=new SOAP_WSDL('https://api.mindbodyonline.com/0_5/SiteService.asmx?wsdl',array(trace=>1)); $proxy=$WSDL->getProxy(); $options=array('soapaction' => 'http://clients.mindbodyonline.com/api/0_5/GetLocations'); $params = array('Request'=>array('SourceCredentials' => array('SourceName'=>'StudioSevaYoga','Password'=>'*************','siteIDs'=>array('int'=>'23661')),'XMLDetail'=>'Full','PageSize'=>'10','CurrentPageIndex'=>'0')); $ret = $proxy->call("GetLocations",$params,$options); var_dump($ret); ?> POST /0_5/SiteService.asmx HTTP/1.0 User-Agent: PEAR-SOAP @version@-beta Host: api.mindbodyonline.com Content-Type: text/xml; charset=UTF-8 Content-Length: 862 SOAPAction: "http://clients.mindbodyonline.com/api/0_5/GetLocations" Connection: close <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <GetLocations> <Request> <SourceCredentials> <SourceName xsi:type="xsd:string">StudioSevaYoga</SourceName> <Password xsi:type="xsd:string">********************</Password> <siteIDs> <int xsi:type="xsd:string">23661</int></siteIDs></SourceCredentials> <XMLDetail xsi:type="xsd:string">Full</XMLDetail> <PageSize xsi:type="xsd:string">10</PageSize> <CurrentPageIndex xsi:type="xsd:string">0</CurrentPageIndex></Request></GetLocations> </SOAP-ENV:Body> </SOAP-ENV:Envelope> WSDL: https://api.mindbodyonline.com/0_5/SiteService.asmx?wsdl My php page throwing error: http://studio-seva.com/pearSoap5.php Any help would be greatly appreciated.
  7. I keep getting this error when I run this command: php-build -i development 5.4.2 ~/local/php/versions/5.4.2 1 warning generated. PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. ----------------------------------------- [Warn]: Aborting build. Anybody know where to go from here?
  8. I have coded a couple of applications and for logging in users, I do the following: ask the user for a username create a password salt and encrypt the password store the username and encrypted password in a database e-mail the user his password on a login page, ask the user for his username/password pair salt and encrypt the password provided by the user compare the encrypted password value to the one stored in my database if the encrypted value matches I do a session_start() and store the user_id in a session variable. on every page I do session_start() and check the session variable for the user_id if the user_id is not found redirect to the login page if it is give them access to whatever they should have access to. Now, I have inheritted a program that I did not write and it handles authentication using the PEAR:Auth module. I had a user complain that he was being repeatedly redirected tot he login page. I could not replicate his problem and closing and re-opening his browser solved the problem on his end, but I'm assuming he's not insane so I am tempted to rip out the existing PEAR:Auth methodology of tracking users and replace it with what I am used to. However, PEAR:Auth must do more than php sessions or nobody would use it so I worry that if I replace it I will eaither be making things less secure or losing some functionality. Try as I might, I can't see what I'd lose by replacing PEAR with something simpler. What am I missing? What does PEAR:Auth give me that php sessions doesn't? Thanks, David
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.