Jump to content

neginf

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by neginf

  1. Hope to have PHP installed on a Windows / IIS computer soon. Have read that 1. a non thread safe version should be used, 2. FastCGI should be used. Is this right ? Do any precautions need to be made for web programming with a non thread safe version ?
  2. The CakePHP version is 1.3.16, the project is written in version 1.3. something, and the MySQL is version 5.6.
  3. Very new to PHP. A query made with the find() function has a syntax error - a column name is outside the backwards quotes. LEFT JOIN `lyn` AS `DiscontinueMed` ON (`Enr`.`` discontinue_med = `DiscontinueMed`.`id`) There are other similar alias lyn with left joins to ENR that look ok and don't cause errors The code that makes the query is function eventFormCreation($model, $fields, $currentPersonId, $limit='50'){ //the only reason we have limit set is because the Upload Additional Information can have more // than 1 without being wrong. Where we need to se the problem with other forms $record = $this->$model->find('all', array( 'conditions' => array($model.'.person_id' => $currentPersonId), // 'fields' => $fields, // 'recursive' => -1, 'limit'=>$limit)); //pass the field to be included in the search $isComplete = $this->isComplete($model, $fields, $record); etc 1. What can cause this ? 2. What can fix it ? 3. Can a query be run in CakePHP without the find() function - writing the query out explicitly and avoiding find() ?
  4. Have project working in 1.3.16. Written by someone else. To put it in 2.3.5, trying to do what's suggested on the 2nd page of this article. http://book.cakephp.org/2.0/en/console-and-shells/upgrade-shell.html Copied lib folder from the CakePHP 2.3.5 area to the 1.3.16 area and copied the console folder from 2.3.5 to the 1.3.16 app folder like the article said. Then tried to run UpgradeShell.php which is in the lib\Cake\Console\Command directory and run it from the app folder this way at the prompt c:\inetpub\wwwroot\old\app>php ..\lib\Cake\Console\Command\UpgradeShell.php --dry-run This is the error I got PHP fatal error:Class 'App' not found in c:\inetpub\wwwroot\old\lib\Cake\Console\Command\UpGradeShell.php on line 21. That line is App::uses('AppShell','Console/Command'); How can I get UpgradeShell.php to run ?
  5. Helloworld.php was working right from a browser but just printing a blank line from the prompt. It had html in it, so took it out and also put "php" infront of "helloworld.php" at the prompt and then it worked. Thank you very much.
  6. New to PHP. A hello world program that prints "hello world" on a browser prints a blank line when run from command line. Have put PHP directory in path and .PHP in pathext. How do you get a PHP program to run from the command prompt ?
  7. Getting warning 512, an sql error in dbo_source.php.There is no line number. There are warnings after that but hoping getting past the sql error will fix them. It's a project written by someone else in CakePHP 1.3.2. The MySql version is 5.6. 1.Is dbo.source.php a file that should be left alone ? 2.Is MySQL 5.6 too new for CakePHP 1.3.2 ?
  8. Under the original directory that a computer came with, I can get a simple CakePHP program to run. When I rename that directory to wwwroot_test, make a new wwwroot at the same level, and then copy everything from wwwroot_test to wwwroot, the simple program runs but with warnings. Have tried this twice. Don't understand why the program acts different in those directories. Is there something about the installation of an original wwwroot that is different from a copy of it?
  9. Ok. Immitated the url and routing (default) of the project that gets the error 500 with a very simple program and it ran ok. Just looked for logs in directories under windows\logfiles. Either had no access to directories or no recent files there. Will get a server person to help. Thank you very much.
  10. Thank you for writing back. app/tmp/logs has one file in it called empty and it is empty. The test site seems to work ok with the url like http://agroup.ab.brd/index.php/users/login and the code I have is supposed to match what is working. Found users_controller.php and a function login() in it. In routes.php set Router::connect('/',array('controller'=>'users','action'=>'login'));. Got same error.
  11. New to CakePHP. Reading tutorials. Need to get an old CakePHP 1.3.2 project to run. It was made by someone else. Can look at a test site that is running and have a copy of the code that site uses in directories starting with app/. Also there is an index.php in the directory above app/. Have data and am able to query it with a basic CakePHP program that isn't part of the project. The url for the test site is like http://agroup.ab.aml/brd and when clicked on turns to http://agroup.ab.aml/brd/index.php/admin/user/add and gets an error "Internet Explorer cannot display the webpage." If you backspace to http://agroup.ab.aml/brd/index.php/admin/user you get the same error. If you backspace to http://agroup.ab.aml/brd/index.php/admin you get part of a CakePHP program with what looks like a custom error saying "requested address admin/ was not be found on this server." If you backspace to http://agroup.ab.aml/brd/index.php, it automatically goes to http://agroup.ab.brd/index.php/users/login and get the whole 1st page of the CakePHP program. Tried to get the code I was given to run but when I try the urls above, I get "The website cannot display the page http 500", even with a url that looks just like the one that works on the test site. 1. What causes the urls to automatically change ? 2. What can cause the error http 500 if the directories, programs, and urls match ?
  12. Trying to get CakePHP to find data but am getting the error "database table acos for model Aco was not found." That table is there. Worried maybe database.php is wrong. In the array $default in database.php, I'm using the MySQL database name for 'database'=>, my MySQL password for 'password'=>, but don't know what to put as 'login'=>. The rest of the array elements are the values that were already there. What login goes in that array ? What else can cause this error ?
  13. After try3 worked, tried try2 with $uses=null; before the function in the controller. That made it work. Made the change to the capitalization in the model you suggested. Saw article saying file and directory naming is different in 1.3.2 and 2.0 and on. Thank you for helping.
  14. There is no data yet. Try3 works with no model-just a controller and view. Still not able to get it to work without changing router.php. Is it ok to put a url question on another post here ?
  15. I'm a beginner at MySQL. Got data as an email attachment yesterday. In an editor, it looks like mostly characters that aren't digits or letters. How do you get that from an email attachment into data in MySQL ?
  16. Trying to make a hello world program in the MVC way. The code for what I'm trying is below. There is no data yet, trying to get this to work. I get warnings related to mysql and an error saying "Database table trys2 for model Try2 was not found." 1. Does a model have to have a table associated with it ? 2. How can I make this program work ? This is c:\inetpub\wwwroot\cakephp\app\models\try2.php < ?php class try2 extends AppModel { } ?> This is c:\inetpub\wwwroot\cakephp\app\controllers\try2s_controller.php < ?php class Try2sController extends AppController { function try2s() { $test='hello world'; $this->set('test',$test); } } ?> This is c:\inetpub\wwwroot\cakephp\app\views\try2s\try2s.ctp < pre> <?php print_r($test)?> < /pre>
  17. Windows 6.1. Changed routes.php like in the CakePHP cookbook getting started section. Now getting warnings about access denied for my_sql_connect(), supplied argument not valid for my_sql_select_db(), my_sql_get_server_info(), my_sql_query(), cannot modify header information. Does having a model there mean that a table with the name as the plural of the model name has to be there also? and error about missing database table try2s for model Try2 was not found. When I take database.php and change it back to database.php.default, get warnings about not finding database.php and error about non existent data source default core/cake/libs/model/connection_manager.php.
  18. Thank you for writing. 1.3.2 is the version. Made those changes you suggested and having the same problem of error 404. It says requested url is http://localhost:80/cakephp/app/webroot/Try2s/try2s and physical path is c:\inetpub\wwwroot\cakephp\app\webroot\try2s\try2s. I can get the default page for cakephp from http://localhost/cakephp.
  19. Below is a try at hello world. 1. What url do I use to try to run it? (I'm getting 404 file not found errors) 2. Is this an ok way to do hello world? This is c:\inetpub\wwwroot\cakephp\app\models\try2.php <?php class Try2 extends AppModel { } ?> This is c:\inetpub\wwwroot\cakephp\app\controllers\try2s_controller.php <?php class Try2sController extends AppController { function try2s() { $test='hello world'; $this->set('test',$test); } } ?> This is c:\inetpub\wwwroot\cakephp\app\views\try2s\try2s.ctp <pre> <?php print_r($test)?> </pre>
  20. New to PHP. Trying to connect with a SQL database. Getting fatal error call to undefined function mssql_connect(). We have version 5.3 of PHP. How do you connect to a SQL database ?
×
×
  • 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.