Jump to content

jagguy

Members
  • Posts

    226
  • Joined

  • Last visited

Everything posted by jagguy

  1. BTW thanks for the replies and all the links which I had a good look at.
  2. Hi, Thanks for the replies. There are no instructions for cakephp and windows for highcharts. To be honest I have given up on the project as this is just to complicated. I am a strong believer in KISS . The documentation isnt there. Unless someone has actually setup this themselves on windows with cakephp/highcharts we are kind of guessing?
  3. Well I am certainly not blaming anyone here for highcharts not working. The issue is that the complete instructions to this setup doesnt exist so i am asking many forums for an answer. I have had posts that this is a simple thing to setup but that doesnt appear to be the case. If I run a cakephp script 'in a controller' with highcharts I just get a "highcharts not found error." In vendors I have the highchartsphp dir with src files and I place these files as well in highcharts. I have the files and they seem in the right dir but I cant get this to work. eg I have the correct names I am referencing App::import('Vendor', 'HighchartsPHP/Highchart'); class ChartsController extends AppController { public function index() { $chart = new Highchart(); /////////////error not found
  4. OK I got the json file to run in cakephp dir and now I have a few dir in a vendor dir. I got no error. . what has happened here and I have a whole lot of files I need to place where. I am am sorry but I really need a bit more explanation because I just get more bits and pieces. I place the highcharts dir in vendor? I still get a an Class 'Highchart' not found in my code so it hast worked
  5. Hi, No that isnt it. I just get an error as there is no name anywhere on my computer 'ghunti/highcharts-php:~3.0' composer require 'ghunti/highcharts-php:~3.0' gives an error of 'could not parse version constraint ~3.0, UnexpectedValueException I have been to 3 other forums and no one can tell me what to do yet but thanks anyway for trying. 1)I have the download called highcharts3 (dir) 2)I have the cakephp project.called cakephp5 I place the download 1) where?and how do I install it with composer
  6. Hi, I am having an awful time creating a composer.json file to install highchartsPHP for windows cakephp. I dont know how exactly to create a file. The examples I have for cakephp composer is for linux. I download the highchartsphp and I place it where? I have composer installed and I do what as version 3 doesnt require composer . https://github.com/ghunti/HighchartsPHP I place the highcharts dir where ? where I should place files to install? How do I install this EXACTLY and does this require mean I have dir called ghunti? I really need some decent how to install as this really isnt good enough . It has been 2 days since I tried to install this highchartsPHP for cakePHP. { "require": { "ghunti/highcharts-php": "~3.0" } }
  7. ok you have made it clear about no (major)issues to expect. So can I conclude you can place text files on either windows/linux without worrying about compatibility issues? With cpanel I have a direct link to files where I can download, why would I use a FTP to just download files when I can do this with cpanel?
  8. I need to copy php files from remote linux (apache) server to windows usb drive. I am using php windows but the files were created in php under linux. Do I just download them or do I need to do something to make this work
  9. Hi, I am trying to setup cakephp cake console in win7 and run cake bake as in the link below.I set up the env variable in win7 as below with a php and cakeapp entry in this Path.I have easyPHP 12.1 and php works fine. I get an error with php in failing to load. dynamic library but the php dir is in the path below so I have no idea . I cant set my php env var is my problem . The php.ini is in this dir specified below. http://www.nurelm.com/themanual/2012/01/30/running-cakephp-command-line-tools-in-windows/ E:\Program Files\EasyPHP-12.1\php\php546x121019214357\;E:\AA-website design\acl\app\Console\;
  10. ok I am getting an error over something simple, can anyone help Also how do i delete previous threads that I dont wont to continue? Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Post.user_id' in 'on clause' SQL Query: SELECT `Post`.`id`, `Post`.`title`, `Post`.`body`, `Post`.`created`, `Post`.`modified`, `User`.`two`, `User`.`three`, `User`.`id` FROM `jagguy`.`posts` AS `Post` LEFT JOIN `jagguy`.`users` AS `User` ON (`Post`.`user_id` = `User`.`id`) WHERE 1 = 1 class User extends AppModel { public $hasMany = 'Post'; } class Post extends AppModel { /*var $name='User';*/ public $belongsTo = array('User'); } controller //// class PostsController extends AppController { public function home2() { $everything= $this->Post->find('all', array('contain' => array('User'))); } view <?php foreach ($everything as $item): echo '<tr><td>'. $item['Post']['id']. '</td>'; echo '<td>'. $item['Post']['title'].'</td>'; echo '<td>'. $item['Post']['body'].'</td>';
  11. jagguy

    blank model

    Hi, I have a cakePHP program that works and displays data from a database table. The part I dont understand and I couldnt find anything on the cakephp blog as yet was the model was left blank? q1) The model is left blank but still works so what is the default behaviour here for the model? It doesnt seem to be needed to do anything i?. q2)I am selecting all the data from 1 table but how do I add a sql statement to select part of the table or a join of 2 tables? the find 'all' seems to just do that only in finding all data from a table. <?php class Post extends AppModel { /*var $name='User';*/ } ?> <?php class PostsController extends AppController { public $helpers=array('Html','Form'); public function index() { $this->set('posts',$this->Post->find('all')); } public function home() { $this->set('posts',$this->Post->find('all')); } } ?> view /// .. <?php foreach ($posts as $item): echo '<tr><td>'. $item['Post']['id']. '</td>'; echo '<td>'. $item['Post']['title'].'</td>'; echo '<td>'. $item['Post']['body'].'</td>'; echo '<td>'. $item['Post']['created'] .'</td>'; echo '</tr>'; endforeach; unset($item); ?>
  12. I am already doing this? strange advice.
  13. Hi, I installed cakePHH on my win 7 , apache, easyphp laptop. php files work fine but I cant get anything to run with cakephp which is extracted where I can run html files. I set fatabase config file, ran index.php and everything seemed fine until i tried to do something my error is Missing ControllerError: UserController could not be found. Error: Create the class UserController below in file: app\Controller\UserController.php And I followed http://www.grasphub.com/2013/01/print-hello-world-in-cakephp/
  14. Yes I am in the correct file but I dont see this as recommnded from the post NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "D:/code/" ServerName localhost </VirtualHost> I dont get creative about settings BTW
  15. There is no VirtualHost document root uncommented in this file so what do I do here? DocumentRoot "D:/code" (...) # DocumentRootDirectory <Directory "D:\code"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> (...) NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "D:/code/" ServerName localhost </VirtualHost>
  16. Hi, I have installed easyPHP and it works fine on win7 I want to run php files from another folder other than the default. I NEED to know how I run php files from folder e:/webdesign/myfolder . Currently easyPHP set this folder to run php files from e:/program files/easyPHP/www What settings/files to I edit or change to achieve this. I have looked everywhere and I cant find the answer. I confused on what settings or files to change.
  17. jagguy

    php xml

    if i have a large amount of data is it better to load the data into XML from say mysql/php? then i can simple dump to a file to be read by flash easier than loadvars. I have been looking at flash/php/xml using xml send and load which i am finding hard to understand. They say for large amounts of data from mysql use XML from the data loaded into php sever file. I am confused as examples on this are just awful. i dont want to use XML and prefer just php/mysql
  18. This is quite a big issue so I am still confused. I have users upload files to a dir. I don't want anyone else to view these files other than me. Now the dir has chmod 711 and the files themselves have 644 by default. So when a user uploads a file then only i should be able to view it. However someone else can come along and just type the path in the url and the file is viewable eg a .txt file.
  19. I uploaded the file on a website and run it . It works fine. Now what about headers on my email. My ISP just contacted me about unauthorised emails. Now I didn't do anything other than 1 email sent like below(no spam or anything just 1 email). I believe the email was detected because it had no headers and was thought to be suspicious. What headers do i need to make it official. $to="derek@somemail.com; $subject="i like bananas"; $message="fish is good with cheese"; $from="jagguy@phpfreaks.com"; mail($to, $subject, $message, "From: $from");
  20. I have set my dir to chmod 711 so you cant access the index. However all the files in the directory are not automatically set to the same permissions . What can happen is that anyone can tyoe in a name of say a text file or img and theey can see the file (provided they know the name). How can I protect my .txt,.doc and .gif files from anyone just typing the url and viewing the file. By default they have chmod 644 but i can't go through each new file and set the permissions manually.
  21. This does nothing when i run from my localhost on my pc? I check my mail and it doesn't get it. What do I do if the mail fails as how can i get a message to say the email wasn't sent? <?php $toemail="mymail9@hotmail.com"; $subject="KSC REgsitration"; $message="Your account has been activayed and you are read to use the KSC website "; //$message.=" \n login ".$log." \nPassword :".$pwd; $from="jagguy@phpfreaks.com"; echo "yesy"; mail($toemail, $subject, $message, $from); echo "yesy"; ?>
  22. When I upload a file over the net I am having problems. It works but if I log onto 2 pc's and upload a filename of the same name then my program will just overwrite the other. Now I have a function to detect existing filenames which works but not for new files of the same name. So on 1 pc i can upload a filename =my.txt and on another pc I upload a file =my.txt. If I do this at the same time then I end up with 1 file called my.txt and the other has been overwritten. If I do this again then On 1 pc i can upload a filename =my.txt and on another pc I upload a file =my.txt. If I do this at the same time then I end up with 1 file called 1my.txt and the other file called 2my.txt. How can I solve this for new files to upload? if (file_exists('student_files/' . $filename) ) { // append a digit to the beginning of the name $tmpVar = 1; while(file_exists('student_files/' . $tmpVar . $filename) ) { // and keep increasing it until we have a unique name $tmpVar++; } $filename= $tmpVar . $filename; } if ($_FILES['uploadedfile']['size'] < 500 || $_FILES['uploadedfile']['size'] > 3000000 ) echo "ERROR File too small > 500 bytes or<br> File is too big > 3mb"; else if ($ext=='jpg' || $ext=='gif' || $ext=='png' || $ext=='doc' || $ext=='txt' || $ext=='xls' || $ext=='zip' || $ext=='ppt' || $ext=='exe') { // echo "<br><br>".$ext."<br>"; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path.$filename)) { echo "<strong>Upload was a success!<br><br>Filename : ".$filename." <br>was entered into the system</strong>"; echo"<br><br>(If the filename has a number added to the front eg 2myfile.txt that means another filename of the same name had already been entered)";
  23. jagguy

    sockets

    With sockets can you create some sort of instant message between you and another pc over the net on a webpage?
  24. This works on my mysql DB Delete from logbook where TIMESTAMPDIFF(SQL_TSI_DAY, date, NOW()) > 2
×
×
  • 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.