Search the Community
Showing results for tags 'external'.
-
Hi, I hope this is the correct section for my problem. All I need is a connection to an external Database and a query gettings some data. I do this in a processwire Page-Template. I am honestly not sure if it is a problem with processwire or my code: $host = ‚XXXXX’; $user = ‚XXXXX‘; $pass = ‚XXXXX‘; $db = ‚XXXXX‘; $port = ‚3306‘; $mydb = new Database($host, $user, $pass, $db , $port); $result = $mydb->query("SELECT * FROM char“); while($row = $result->fetch_assoc()) { print_r($row); } Produces the following error: Error: Exception: DB connect error 2002 - Connection timed out (in /customers/9/4/e/XXXX.de/httpd.www/wire/core/Database.php line 79) I also tried connecting without the $port variable but got the same error.
- 2 replies
-
- database connection
- external
-
(and 1 more)
Tagged with:
-
Hello all, I'm playing with Wordpress API and I trying to create pages in Processwire from WP API, did anybody do something like that (or any other api)? What is the best approach for creating pages via external API, any advice, examples would be awesome, thank you all
-
I'm trying to use "PHPMailerAutoload" class with Processwire. When I include class "include_once("./PHPMailerAutoload.php");" and call it in my code "$mail = new PHPMailer();" i get an error: <p style='background:crimson;color:white;padding:0.5em;font-family:sans-serif;'><b>Error: Class 'ProcessWire\PHPMailer' not found (line 24 of /Applications/MAMP/htdocs/vm-pw-react/server/site/templates/contact.php) </b><br /><br /><small>This error message was shown because: you are logged in as a Superuser. Error has been logged. </small></p> How do I load and use the class?
-
Hello everyone, I'm new to Process Wire and I'm trying to set up a website for a magazine. My first task was to import a bunch of videos from another site into PW and it actually worked out quite good. Now I've got a bunch of pages with an external image reference in the image field. My idea was *not* to copy the whole lot of images, but to download and resize the ones that are requested. The first naiive attempt was this: <img src="<?=$article->video_image->size(350,88)->url; ?>"> With 'video_image' being a full path to an image on another remote server. Soo ... that didn't work. Do I need to copy the image to my server before resizing it? Or is there a trick to resize it and save only the "new" image on my server? Thanks for any help! Loving PW so far! thomas