-
Posts
242 -
Joined
-
Last visited
Posts posted by matfish
-
-
PHPMailer is your best bet.
-
sudo apt-get install curl
the above says latest version is installed.
-
Hi there,
I'm using cURL in a PHP script which works fine.
But I get the following error when trying via command line:
curl "http://www.domain.com/script.php"
-bash: curl: command not found
So I'm unable to run a crontab which invokes curl to ping a script?
Any ideas?
-
I got it - I turned off safe_mode on the domain hosting in question and now all works.
Thanks for the pointers.
-
I done the phpinfo and found "disable_functions no value no value"
I'm on dedicated server so I can alter settings - just not sure where to edit them?
Many thanks
-
I get "failed to open stream: Operation not permitted" with the "file_get_contents"
I was hoping it was a on/off switch somewhere either php(.ini or something) or server related (dedicated server)?
-
On one server I can run "exec('cat /proc/loadavg')" in a .php file but on another server I can't.
Is this PHP related or server related and how can I find out if I can turn this back on?
Many thanks
-
Hi there,
I'm a PHP/MySQL developer and not touched ASP/MSSQL once!
I'm trying to help someone out and needed to know if there was an equivalent way to connect to an MSSQL database and export all tables to .CSV (as I would usually do in phpMyAdmin)
I've Googled and found "SQL SERVER EXPRESS" - is this easy enough to do the trick?
Many thanks
-
Works a treat. Thanks for the speedy help.
-
Hi there,
I have HTML code which I then strip_tag just to get plain text into $text variable. The text looks like:
$text = "This paragraph references to [code: ref1, ref3, ref87] and the next bit references to [code: ref9, ref4]. There could be several references like [code: ref67, ref55]."
I want to put all those code: ref numbers into an array?
I tried something, but after it wrote the first ref numbers to an array it quit and does not look at the rest?
Any ideas would be appreciated.
-
thats great, thank you!
-
Hi there,
This is probably either something which is not possible, or if it is, then is probably something really simple to do?!
I have a .php file of which I want to run as a .php file, but I want to change the file extension to something else (.it)
So - run.php would become run.it (running normally in php)
I have a dedicated server so I can change things on the server - but I'm a server newbie so would need instructions?
Hope that makes sense?
Many thanks
-
Cron Emails
in Linux
Thank you - that seems to work.
-
Cron Emails
in Linux
Hi there,
I've set up a crontab using Plesk but every time it's invoked, I get an email saying:
Hi. This is the qmail-send program at [my-server-address]. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[ftp_user_name]@my-server-address>: Sorry, no mailbox here by that name. (#5.1.1)
Any ideas why I get these emails every time it runs, or how to turn them off?
Many thanks
-
No point in asking for help on here if we got to RTFM
-
Im sure I used "curl username:password 'http://www.domain.com/script.php'" or something similar for when it was htacces password protected just to run the script and not download it with wget
-
Is there no other ways from the above?
-
Hi,
trying to run a .php script (on the same server) using a .sh script.
I thought it was something like
#!/bin/bash curl "http://www.domain.com/script.php"
but it's saying "curl command not found" - but curl is on the server.. Mental blockage as I've done something similar before - any help?
Many thanks
-
Thats great thanks - I'll give it a go
-
Hi,thanks for the reply.
Yes I have something similar however on this project I'm going to have to leave the current one in place as it was bespoke build with Ajax and one-click editing. When we have more time I will definitely be updating to the one you mentioned - looks great!
In the meantime, I just need to alter the <img> tag as mentioned previously when the html is submitted to the database.
-
Hi,
I have a javascript "MS-WORD" like script to allow users to add content to a page, this then gets inserted into the database. Cut a long story short - for some reason it just won't let me validate HTML correctly therefore I just need to know:
When inserting into the database I need to do a find for <img> tags only and add a slash before the closing bracket. For example find: <img src="image.jpg" border="0"> and add <img src="image" border="0" />
I do not want to do just a find and replace on all brackets as its not needed in some cases. Ideally it needs to just look at the <img> tags and add that last slash.
Any ideas? Many thanks
-
Thats great thank you.
Your first bit of code actually outputs the whole .php file to a .html file (including all the php includes and php code!)
However your second code using "ob_start" works fine.
Many thanks
-
Hi, something that sound simple but not sure how to go about it.
I have generated in .php an automated way to display an invoice in .php. For example, the URL would be /invoices/invoice.php?invoiceID=2
This then displays the invoice. However what I want it to do is generate and save the .html of this page to a folder under todays date, so when the above is run it saves it to /invoices/html/invoiceID2.html
Anyone know how to output and save the .html from a .php file?
Many thanks
-
Really not advanced enough in Javascript to build something like that but I see where your coming from.
If anyone else stumbles across this post and has one of these, please let me know.
Thanks for your help.
-bash: curl: command not found
in Linux
Posted
Mentioned the issue to my hosting company, all of a sudden everything works!