Jump to content

ballhogjoni

Members
  • Posts

    1,026
  • Joined

  • Last visited

Everything posted by ballhogjoni

  1. like i said this is CakePHP's framework code...so don't blame me for it
  2. yes i sorted out the ini file. here is the function: function &getInstance() { static $instance = array(); if (!$instance) { $instance[0] =& new Inflector(); if (file_exists(CONFIGS.'inflections.php')) { include(CONFIGS.'inflections.php'); $instance[0]->__pluralRules = $pluralRules; $instance[0]->__uninflectedPlural = $uninflectedPlural; $instance[0]->__irregularPlural = $irregularPlural; $instance[0]->__singularRules = $singularRules; $instance[0]->__uninflectedSingular = $uninflectedPlural; $instance[0]->__irregularSingular = array_flip($irregularPlural); } } return $instance[0]; } These deprecated messages are coming from cakePHP's framework...so I guess they haven't updated yet.
  3. I am getting an error saying Deprecated: Assigning the return value of new by reference is deprecated in /Users/xxx/dev/git/xxxx/cake/libs/inflector.php on line 131 I understand that this is because =& has been deprecated in php 5.3+, the question i have is what do I do about it? are the objects passed as references still or do I handle them some other way? My server is running 5.2.5 and my dev machine is running 5.3.2. Does this error act like a fatal error and break out of the script or does it act more like a notice? Sorry for all the questions, just been out of php since php 4, don't know all the changes. Thanks
  4. I am new to CakePHP. I have checked app/tmp/logs/*.log for errors but nothing is logging there. I checked my apache error log, but nothing there. I checked php.ini for where the errors are being logged but that section is commented out. I checked my virtual host for error logging but nothing in my virtual host. I know there are server side errors because my browser gets a 500 internal server error. Where are the errors being logged? How do I find this out?
  5. Hey guys/gals not sure if this post is in the right forum, but I am getting a PHP: syntax error, unexpected '&' in /private/etc/php.ini on line 110 in my apache log file. Not sure what is wrong with line 110 because I think that its correct syntax. Here is line 109-111 error_reporting Default Value: E_ALL & ~E_NOTICE Development Value: E_ALL | E_STRICT Any ideas? Thanks
  6. ok figured it out...nothing wrong with the code that I posted in the first post. I was editing in the wordpress editor and had made a change that caused the error. I clicked the back button on the browser which showed the broken code, i changed it to worked right but since the file was saved with broken code wordpress couldn't update the correct changes. I just logged into the server and made the changes in vim and it fixed right up.
  7. I am getting this error and cant figure it out: Parse error: syntax error, unexpected ')', expecting '&' or T_VARIABLE in /path/to/app/cool.php on line 150 this is line 50: function GetParentIDS(){ this is the rest of the function: global $wpdb; $CATS = ""; $Maincategories = get_categories('use_desc_for_title=1&hide_empty=0&hierarchical=0'); $Maincatcount = count($Maincategories); foreach ($Maincategories as $Maincat) { if($Maincat->parent ==0){ $CATS .= $Maincat->cat_ID.","; } } return $CATS; } this is the function above it: function sidebarArticles(){ global $wpdb; global $PPT; $string=""; $posts = query_posts('meta_key=type&meta_value=article&posts_per_page=5'); foreach($posts as $article){ $Artimage = get_post_meta($article->ID, 'image', true); $string .= "<li>"; if(strlen($Artimage) > 1){ $string .= '<a href="'.get_permalink($article->ID).'" title="'.$article->post_title.'"><img src="'.$PPT->ImageCheck($Artimage).'" style="float:right; max-width:40px; max-height:40px;" /></a>'; } $string .= "<h4><a href='".get_permalink($article)."'>".$article->post_title."</a></h4> <cite>Posted <em>".$PPT->TimeDiff($article->post_date)."</em></cite> <p>".$article->post_excerpt."</p> </li>"; } return $string; } Any ideas?
  8. What is wrong with this curl code? $post_url = "http://www.ddsfgfdre.com/signup/dbsignup.php?p=65f1764b8142e6efc4eaeb743d5ec99d&document_url=http%3A%2F%2Fdvcfn.ededfdns.info%2F&referer=http%3A%2F%2Ffacebook.com&FirstName=Chester&EmailAddress=sdgfsfg%40yahoo.com&phone1=345&phone2=321&phone3=9087&ZipCode=84660&Dezdfgount=%24500-%242500&ActionButton=Makefree"; $ch = curl_init(); print_r($post_url); curl_setopt( $ch , CURLOPT_URL , $post_url); //the url curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4s curl_setopt($ch, CURLOPT_POST, true); // set POST method $ret = curl_exec($ch); curl_close($ch);
  9. i figured it out...needed to run __construct instead
  10. I think I know a good bit of oop but don't know if I can do this. I tried it, but its not working. When I call the saveDomain() from the indexAction() within the indexController I expect to get the name of the table, which in this case, is Domains. Any help, thanks? oh ya, i am using php 5 indexController class IndexController extends Zend_Controller_Action{ function init(){ $this->domain = new Domain(); } function indexAction(){ $this->view->base_url = BASE_URL; $this->domain->saveDomain( BASE_URL ); } } domain model class Domain extends Zend_Db_Table_Abstract { protected $_name = 'Domains'; protected $_primary = 'id'; var $db; function init(){ $this->crud = new Crud( array($this->_name) ); } function saveDomain( $domain ) { $this->crud->Read(); } } crud model class Crud extends Zend_Registry { var $db; var $_tableName; static function init( $tableName ){ $this->db = parent::get('db'); $this->_tableName = $tableName; } /* * */ public function Read( $condition = null, $sql = null ) { echo "<pre>"; print_r($this->_tableName);echo"</pre>"; } }
  11. Im not gonna help until you start using a database. j/k fopen should help you
  12. $qry = "LOAD DATA LOCAL INFILE '" . $_POST['file_path'] . "' INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (".$_POST['value_1'].", ".$_POST['value_2'].", ".$_POST['value_3'].", ".$_POST['value_4'].", ".$_POST['value_5'].", ".$_POST['value_6'].", ".$_POST['value_7'].", ".$_POST['value_8'].",".$_POST['value_9'].", ".$_POST['value_10'].", ".$_POST['value_11'].",".$_POST['value_12'].",".$_POST['value_13'].",".$_POST['value_14'];
  13. I set up a class variable and I get an error: Parse error: parse error, expecting `','' or `';'' in my code class IndexController extends Zend_Controller_Action{ var $db = Zend_Registry::get('db'); }
  14. As a side note, never do this. Unless specifically configured to, your webserver will process the .inc file as plain text and send it to the browser, allowing anyone to view your database connection info. It's an easy and stupid way to find yourself "hacked" (I use the term loosely) if you put it above the web root!
  15. I have a sentence and I want to take a word out of the sentence. what the best way to do that. I am going to use regex, but I don't know which function to use. any ideas?
  16. there are alot of cc processors. it really depends if you want the user to stay on your site or not. if you don't care I would say to use google checkout, otherwise look into authorize.net
  17. is there a way for me to create an imap email on my server and then check it locally?
  18. thanks, but which one is the model and the controller. I set it like this: first file is the config.php I include config.php into my model which is the second file and I extend AppInfo then I create my controller which already extends Zend_Controller_Action so I can't extend my model here. I get a Fatal error: Call to private AppInfo::__construct() from context 'Zend_Loader' in C:\xampplite\htdocs\app\controllers\IndexController.php on line 6
  19. I want to run a script when I receive an email. Does any one know how to do this?
  20. can you give me an example...Im using the Zend framework and I dont think it works that.
  21. that doesn't work for what Im doing...I want to use the variable assigned in the first file.
×
×
  • 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.