Jump to content

Search the Community

Showing results for tags 'database'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

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

  1. Hello everyone, Usually in many CMS database tables prefixed or suffixed with "cache" can be manually cleared without a problem because the system will populate them on the "next page request". Actually in Processwire I am expecting this behaviour: [On PW 3.x] Manually clear table "caches" in database Go to "client" side (not in the admin panel) All references to my "/site/modules" in my template files does not work : wire("modules")->get(""), $modules->get("") and modules()->get("") PHP error: Fatal error: Uncaught TypeError: Return value... My _init.php file are not able to find the references to my /site/modules/ The client side not working because this PHP fatal error. If I go to the admin panel "Admin -> Modules" and I trigger the action "Check for New Modules" in the top-right corner in the page, it populates the caches table with the required information and them the client side works. It is normal? Or I am doing something wrong ? A solution could be to manually call the script that the button "Check for New Modules" calls, but I want to know if I am doing something wrong here. Thank you in advance guys !
  2. Hi all, Just wondering if its safe to delete the content of the cache table manually within the database?
  3. Hi, I have a project that, based on initial specs, I decided to build in another framework due to the client wanting the ability to regularly import data from an existing manufacturing system. I decided a platform that would allow me to match the imported data to the system would make sense. Since then, the project has morphed (I know, it never happens) and the regular import is unnecessary and so a comprehensive admin is needed. I want to switch to PW but don't want to have to manually link thousands of tables. I have the import routine working for the main table but I am not sure how to import the support tables and automatically create the page fields for them. Oh, in case it matter, the links are not autoincrement id fields, but character codes. Eg. Category table - code: TRN, description: Transportation If someone can point me in the right direction it would be much appreciated.
  4. Hi Everyone, Since a couple of months, we have our new website live with processwire as CMS system. In this website there is a huge database (1900+ trees), wich can be found with different filters. Take a look at www.vdberk.com/trees. The website does not to be seen very fast when you select a couple of filters. Every time there is a delay between 3-5 seconds. Now we are migrate the website to another sever, with more preformance. So we hope this give us some timeprofits. Does anyone have any kind of suggest, to make this filter faster. Now the website is on PHP5.6, is php7 better? Can this make a different? We used ProCache already. Thanks in advance
  5. I encountered a situation over the past few months where tables have been crashing when a user saves a page in PW. I'm assuming it is something related to the server/hosting provider (Site5), because it only happens on this host, but across completely different unrelated accounts. When it happens the table in question gets "marked as crashed", and then shows "in use" when you see the table in PHPMyAdmin. No data is retrievable by PW from whichever table/field is crashed, so if the body table crashes, then the front end doesn't show any body text anymore until someone goes into PHPMyAdmin and repairs the table. I'm trying to make a module or at least some button the client can click from their admin that will run a repair on the tables so i don't have to help them and go to their cPanel etc.. I added a button on the dashboard of the sites in question (for sites that i use a dashboard on), or i told them to bookmark the link to the repair process, something like example.com/repair_database.php?action=repair; so far it seems to work but wanted to check to see if anyone sees any problems or improvements to this, it was done in only a few minutes, so may have left out something... I'm not sure if this could/should be made into a module, since it is conceivable that a table could crash that would render the modules system non functional, so thought maybe better to be a bootstrapped script(?) <?php // in root of pw installation - this is the 3.0+ version; repair_database.php /* Bootstrap PW ----------------------------------------- */ include("/home/path/to/index.php"); $config = \ProcessWire\wire('config'); $user = \ProcessWire\wire('user'); if(!$user->isLoggedin()) die("access denied"); function optimizeTables() { $tables = array(); $db = \ProcessWire\wire('db'); $result = $db->query("SHOW TABLES"); while ($row = $result->fetch_assoc()) { $tables[] = array_shift($row); } foreach ($tables as $table) { $result = $db->query("OPTIMIZE TABLE `$table`"); while ($row = $result->fetch_assoc()) { echo $row['Table'] . ': ' . $row['Msg_text'] . "<br /> \n"; } } } function repairTables() { $tables = array(); $db = \ProcessWire\wire('db'); $result = $db->query("SHOW TABLES"); while ($row = $result->fetch_assoc()) { $tables[] = array_shift($row); } foreach ($tables as $table) { $result = $db->query("REPAIR TABLE `$table`"); while ($row = $result->fetch_assoc()) { echo $row['Table'] . ': ' . $row['Msg_text'] . "<br /> \n"; } } } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Database Repair &amp; Optimize Tool</title> </head> <body> <pre> ____ _ ____ __ __ / __ \___ ____ ____ _(_)____ / __ \____ _/ /_____ _/ /_ ____ _________ / /_/ / _ \/ __ \/ __ `/ / ___/ / / / / __ `/ __/ __ `/ __ \/ __ `/ ___/ _ \ / _, _/ __/ /_/ / /_/ / / / / /_/ / /_/ / /_/ /_/ / /_/ / /_/ (__ ) __/ /_/ |_|\___/ .___/\__,_/_/_/ /_____/\__,_/\__/\__,_/_.___/\__,_/____/\___/ /_/ </pre> <?php if($input->action == 'repair') { repairTables(); } if($input->action == 'optimize') { optimizeTables(); } ?> </body> </html> example button:
  6. This is a simple loader for LessQL, an ORM alternative for PHP. It is based on NotORM, and provides a quick way to access and find things in a database, including traversals and back-traversals. As discussed in some earlier topics, there are times when you'd like to store some data away from ProcessWire's pages/fields/templates structure for whatever reasons. However ORMs are sometimes cumbersome and requires a lot more effort to deploy. LessQL offers a quick way to just up and go like you're using an ORM but without the added complexity and configuration files. Module: https://github.com/alguintu/LessQL This modules simply loads the LessQL library into ProcessWire and exposes a $lessQL variable (configurable in settings) that gives access to your database. It uses the same database specified in $config by default, but can be set to use a separate database, along with its credentials. Usage given a table person : $people = $lessQL->person()->select("id, firstname, lastname")->where("firstname LIKE ?", "%alex%")->orderBy("firstname")->limit(10); It uses lazy loading and doesn't execute the query until it needs to. Checkout www.lessql.net for more info on LessQL. Module wrapper is pretty much lifted from @teppo's RedBeanPHP module, but with a few modifications.
  7. Hi, my server or processwire or me cancelled database, that don't exist and my server haven't backup. The error log is: http://www.permaculturaorganica.info/?/ Error: Exception: SQLSTATE[HY000] [1044] Access denied for user 'casbo_RdS'@'%' to database 'casbooko1_po' (in /data/vhosts/permaculturaorganica.info/httpdocs/wire/core/ProcessWire.php line 308) Is this log a log for database not found, it's correct? I was write any articles, but NOT PUBLISH, because the site haven't any grafic. Now I go in /site/assets/cache/ by ftp, but I don't see any file. The address is correct for find the files cache?
  8. i am newbie, so i'm sorry for silly question.. i want to insert data to my database. this is my syntax $pDOStatement = $database->query("INSERT INTO questions (ID_USER,TIME_Q, QUESTION) VALUES (1,NOW(), $pertanyaan)"); for $pertanyaan is my variable which string. but, i get error (in attacment) please help. thx
  9. My Database is cancelled for error. I I create new database by cpanel, then I add it to domain processwire by cpanel, with same password and same username! But processwire don't identify it! What I wrong?
  10. When I take a look in a PW database I see this: pages are stored in “pages", templates are stored in “templates", sessions are stored in “sessions", forms are stored in "forms” (form builder), ... I want to make a website with a large catalog (1.5 million products). I don’t want that the products are stored in “pages” table in the database, but in the “products” table. Is this possible in PW? End will I maintain the same options, then when I store all products in “pages”? Some advice would be helpful! Kind Regards, Peejay
  11. Hello, I am truly stuck. I have a website I built for a client that has become quite successful: http://drydenwire.com It is an independent news agency. The problem is, I built everything from scratch in Processwire and things were purring along until the traffic went up. Now, I keep getting these huge spikes which last about 15 seconds and cause all users to receive a 503 Error. I have created a public repo for review: https://github.com/scramlo/DrydenWire.com/tree/master and can answer any questions that may lead to an answer. I am willing to hire a more experienced developer if the community is unable to help me mine out this issue. I have gone through the usage logs and know that all traffic is legitimate, I am not getting bombarded by a spam IP address or anything like that. Thank you for any and all assistance as this client is getting frustrated and I would rather not lose them!!! -Brian
  12. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hortons.pages' doesn't exist (in /srv/users/serverpilot/apps/hortons/public/wire/core/WireDatabasePDO.php line 439) Getting this error after upgrading from 2.4 to 2.8 then exporting the site profile and installing on the latest version of v3. Anything I could do about this, anyone come across this? thanks Edit: The issues started going from 2.4 to 2.8 - I used the upgrading advice on the github, replacing PW files. Im running ubuntu 14.4.x using serverpilot.io. The site hosting was originally not controlled by me so am trying to rehost and upgrade.
  13. Hi there, I was wondering if page->url and page->httpUrl are stored anywhere in the backend? I haven't been able to locate it so I'm beginning to think these are generated or calculated on the fly? Thanks in advance
  14. Hi guys, I've just discovered Processwire and I'd like to build my new project on it. It seems PW is the tool I was looking for. It's my first post and I guess many others are coming A few words about me : I live in France, I used to be a php dev (looong time ago), became a MySQL DBA during a few years and now a little less hands-on (except on that project). Speaking of the project, it's the complete rewrite of a game related to motorcycle races (you have to guess the podium in different categories). I have players who sign up, record a prediction for the next Grand Prix, get a ranking according to the precision of their prediction (vs real results). They have a profile page, etc. The frontend is based on data which is updated each Grand Prix (through some pure croned php scripts). The website sends automatically newsletters according to the date (vs the races calendar) and the same goes for the email which warns players their score was updated. It runs for years now. My goal is to reach thousands of players on this new version. I'm not anxious about speed here, I guess it will be ok, and I'll probably be a future client of ProCache and ProdevTools (yes I saw the coupon code :). That also will be my way to support the work which has been done here. Actually I'm rewriting the whole stuff (based on pure Php) and I will host more races next year (more categories, more players, more... everything). I'm interested in PW because I'm looking a modern way to rebuild my website without reinvent the wheel : using all the built-in stuff from PW (routing system, session/authentication, and all what the other modules can offer !). OK, enough for the project Although I've been through some different tutorials and read tons of thread on this forum for the last 3 days... I didn't yet make my mind on the solution to choose : "pure" SQL queries or use the API/pages. As I said before, I'm a DBA, I'm ok with queries and I've already wrote most of them. Actually, I see how to import my tables into the PW's database, so I can directly connect to my old tables (you call that custom tables I think) with the db handler which is passed to every page. I see how to create a template, I see how to choose the ouput strategy, but I have some difficulties to see how to add content to each page. I don't know if I need all this actually. I've read this very useful thread : https://processwire.com/talk/topic/18-how-do-i-import-lots-of-data-into-pages/ from @ryan, who answered a very good question from @jbroussia Technically speaking I understand the stuff but perhaps it's overkill for me. I'm looking for the easiest/quickest solution (I have so many things to code before launch :-/). According to you, can I survive without importing all my data in PW fields by using this way : $result = $db->query("SELECT id, name, data FROM some_table"); while($row = $result->fetch_array()) print_r($row); As I said the DB is updated frequently (each Grand Prix) and each player's score is updated in the same time, that goes for the different categories, well a lot of stuff is moving at each Grand Prix. According to me it should work with template + page using that template but without filling the fields... ? Moreover I'm afraid of losing some PW functionnalities here : Accross my readings I've picked up some quotes which I haven't completely understood, perhaps you can help me on that. - "If you want to present your data at unique URLs, then pages is the way to go.... " (from https://processwire.com/talk/topic/5325-database-table-versus-pages/) - "While it's there and ready for you to use, it's always preferable (not to mention easier and safer) to use ProcessWire's API for accessing any of it's data." - "If you went the pages route, you can also harness the extended power of templates, e.g. using templates to control page access..." (from https://processwire.com/talk/topic/17-functionsmethods-to-access-the-db/ -> I understand it's "easier" to use the API, but why is it "safer" than my own SQL queries ? I still have to sanitize myself any user entries in both case for example no ? -> Won't I be able to control page access if I'm not using the API ? I didn't dig into control access yet, please forgive me if the question is a nonsense. -> What about the uniqueness of URL that is mentionned in my first link ? Well, I think that's enough for a first post and thanks in advance for your answers.
  15. Hi, I have several questions about modules: Where are modules settings saved? In the database? If yes, in which table? Where are modules fields saved? Again, in the database? If I were to git control my website, should I ignore modules folder?
  16. We are currently looking at building a custom administration area with the basic outlined functionality. Users will be able to login and see their horses, their events and their payments. Admins will be able to login and see all users, horses, events, payments. Data structure below. Questions 1) Would this make sense to build as a single frontend with different 'admin' levels' rather than customising the backend of PW? Ultimately the PW install will be running a full frontend website (showing Horses for Sale, Events and other misc content) so users will need to login to update content. 2) How does PW handle database relationships? Could this structure be built? Users ------ ID Email Horses - one user can own many horses ------- ID UserID Membership Level (payment) Events - one horse can enter many events ------- ID HorseID Required Membership Level Payments ----- ID TransactionID Payment Items - one payment can have many payment items ---- ID PaymentID Order Type - Horse Registration/Donation/Event ItemID - HorseID, DonationID, EventID Cost VAT Many thanks Pete
  17. I'm not sure that I really follow this page; http://imgur.com/a/hCxqg I've created a database when setting up the server, so I'm presuming that this is what's being asked for here? The page linked for getting setup http://webdesign.tutsplus.com/tutorials/how-to-install-and-setup-processwire-cms--cms-25509 doesn't really mention anything about these fields. After trying to use the user name on the server, and the password that I entered when setting up the mySQL to start with I got the following error (so I had filled in "DB Name"={some name that I thought up }, "DB user" = {name of user on server}, "DB pass" = {pass i set up for mySQL}); http://imgur.com/a/cgFKq After this i tried using db name; {whatever} db user; {name of user on server} db pass; {password for user on server} This didn't work either, so I'm not sure what I'm meant to put here.
  18. The situation I'm trying to arrive at a good solution for is how to store user-created data in a production environment. We're pre-production but the issue I'm running into is that storing user-data as pages creates problems when it comes time to update the production site with a new version (of our site, not PW). Because I'm adding data as pages the data will be deleted if I create a backup and restore it to the production environment. I've spent a fair amount of time writing some DB compare logic to find differences but that will require manual updating for each difference. Because pages reference other page numbers via IDs and the production environment will be creating users and meta-information pages it isn't possible to save/restore those particular pages around a backup (from development) and restore (to production) of the PW database. It seems like the most straightforward approach is to put the user-created data in separate tables so that PW information can be updated independently. That is pretty easy using $db or $database. Are there any best practices for this kind of thing? Am I thinking about it wrong? How is this problem generally solved? The user-data is 1) user accounts and 2) meta-information about uploaded files (stored in the file system).
  19. I need to write a lazy cron job that goes through a list of files and deletes those that are associated with expired sessions. Our session information is stored in the DB table sessions. Is there a Wire API call that allows me to do one of: 1) fetch all expired sessions? 2) hook the session expiration event? 3) fetch all active sessions? 4) do direct DB access to lookup sessions? (least preferred as I have to directly tie to session implmentation). My logic can either flow: Find active sessions delete files NOT in active sessions Get files if session_id associated with file NOT in sessions (or has expired) delete file.
  20. I'm in need of changing the charset for my site but I couldn't find any way of doing so since changing $config->dbCharset = 'utf8'; in wire/config.php gave me an error when I tried to install. I couldn't find anyway of changing charset during the installation configuration either. So how do I do it? I need it to be set to Swedish language so that I can sort letter like Å,Ä and Ö proper.
  21. Hi guys I'm trying to duplicate a ProcessWire site on a different server so I can work on it. The good news is the live and the test servers are identical VPS. I already have multiple PW sites running on both. I can export the DB from the Live server but when I try to import to Test server I get the following error. Am I correct in thnking this error in the SQL syntax is being generated at the export stage? IE my Live PW site wouldn't be working with a syntax error so I must be messing up the export of the .sql file There is nothing at line 48 but a find command shows CREATE TABLE `fieldtype_options` ( `fields_id` int(10) UNSIGNED NOT NULL, `option_id` int(10) UNSIGNED NOT NULL, `title` text, `value` varchar(255) DEFAULT NULL, `sort` int(10) UNSIGNED NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; BTW, my server setup is: Version Plesk v12.5.30_build1205150826.19 os_CentOS 6 OS CentOS 6.3 (Final) MySQL: 5.5.41 PHP: 5.6.19
  22. Hi, the AdminThemeReno has mysteriously disappeared from the admin. it is in the wire modules, and the database modules table, but absent from the modules listing.. it has basically vanished; I tried updating to the latest dev to see if that would fix it. The problem seems to have started when i went into Modules Manager and the version was older so there was a json error; then right after reloading the page, the theme flipped back to the regular theme, and then the reno disappeared..; i'm not completely sure if modules manager was the source of the issue; I'm guessing some database corruption? not sure where to start troubleshooting this, but would really appreciate any help or advice. What do most people do when you hit a 'dead-end' issue like this? Is there some way to check the database for some misconfiguration? Should i delete the modules entry in the DB? not sure if this is related, but if i uninstall the default theme, i get this error: Modules: Module 'AdminThemeReno' dependency not fulfilled for: AdminThemeDefault and also if i try to place the default admin theme module into the /site/modules/ then i flip back to the legacy admin, and there is an error asking which one, but if you click on that and go to the module settings, there actually isn't any option to specify which folder to use; it ends up using the site version.. also getting strange errors... [14-Feb-2015 19:46:11 America/New_York] PHP Notice: Trying to get property of non-object in /home/someuser/dev/site/modules/ModulesManager/ModulesManager.module on line 820 [14-Feb-2015 19:46:32 America/New_York] PHP Notice: Undefined offset: 0 in /home/someuser/dev/site/modules/ProcessDiagnostics/DiagnoseModules.module on line 43 [14-Feb-2015 20:12:27 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 284 [14-Feb-2015 20:12:27 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 [14-Feb-2015 20:12:27 America/New_York] PHP Notice: Undefined index: flags in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 [14-Feb-2015 20:14:48 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 284 [14-Feb-2015 20:14:48 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 [14-Feb-2015 20:14:48 America/New_York] PHP Notice: Undefined index: flags in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 [14-Feb-2015 20:15:12 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 284 [14-Feb-2015 20:15:12 America/New_York] PHP Notice: Undefined index: AdminThemeDefault in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 [14-Feb-2015 20:15:12 America/New_York] PHP Notice: Undefined index: flags in /home/someuser/dev/wire/core/ModulesDuplicates.php on line 287 thanks!
  23. Hello, will the database structure change until stable release of ProcessWire 3 or won't the database be touched? This would be great to know, Ryan!
  24. Hello people, hope you're all doing well! Just seeing if anyone has any real world experience of working with remote databases? Mainly in a bid to be able to keep the development process between multiple people/places that bit easier? I'm thinking either setting up a traditional MySQL db on the server or even using a DAAS like Google SQL / Amazon? Any thoughts much appreciated!
  25. Hi all, I've just enabled the Session Handler Database module and would like to view the active sessions, however it doesn't display any. Does anyone know why, or what I'm missing?
×
×
  • Create New...