-
Posts
364 -
Joined
-
Last visited
Never
Everything posted by the_oliver
-
Hello, Looking for some advice please. Whilst i can do this in PostgreSQL im not sure weather it is the same for MySQL. Im looking for a way to create a user and a database, assigning only the new user permisions to use it. I want all this to happen automaticaly from a php script. Can i just run it as a query from a user with the wright permisions? Also is there a way that i can monitor/restrict the size of a database? Thanks.
-
Thanks for all of that! So there is no way to run a .asp sccript on an OS other then windows? What is the diffrence between ASP and ASP.NET? Which is the one you have to pay for? (Thanks for all your comments).
-
Hi, Whilst i am a php person i have been meeting more people resently who always insist on .asp and noticing more large sites using it. Is there a resion for this? Is it better for server side stuff? I know nothing about it so thought id see if someone can fill me in! Ta!
-
Thats why i times the diffrent parts by diffrent size numbers, so a to waite them.
-
Thanks, it would make life simpler, but i need to do it this way really. Its something that i dont just use in .php scrips so would like to know what im doing wrong for others also. + the scrip is running on windows files.
-
Hello, I have a scrip which will copy a file only if one is newer then the other. To do this i work out its age wateing years more then months, months more than days . . . etc. It was working fine in 2006, but now in 2007 it thinks that the old script is newer. I know that i need to change the waiting, but my maths is not quite up to this! So at the moment it is basicly: [code]$ModDate1 = Year * 10000 + Month * 1000 + Day * 100 + Hour * 10 + Minute[/code] Can anyone tell me what to do to solve this? Thanks!
-
Rairly any need to restart an entire server! Can just reboot parts of it. And being open source you can do as you please! Check out http://www.centos.org
-
IMAP Install Into PHP 5.1.6 CentOS 4.4
the_oliver replied to JustinK101's topic in PHP Installation and Configuration
yes there is a yum. Its called 'php-imap'. If you cannot find it can you post your REPOS and perhaps i can tell you which you should add. -
Stab in the dark.... Are you actualy using suse-linux like it says? Also are the files owned by the correct user with the right permisions?
-
Hello. Im running the folloging code and its not doing quite what i want. When i run a command through the shell_exec() function i want to decide what happens next, based on whethe anything was returned. Eg, if the code is to create a file, and it works, there should be no responce, and thus i want to carry on, after deleting the database row. However if something is retured, (for example, 'directory already exists') then i want it it update the database and break; The problem is it alway reacts as if nothing has been returned. Can anyone help? [code]foreach($c as $value) { $return = shell_exec($value); if ($return == "") { $remove = "DELETE FROM table WHERE id LIKE $id"; pg_query($pg_connection, $remove); } Else { $error_report = "UPDATE table SET error = 'Error: ".$return."' WHERE id = '".$id."'"; break; } }[/code] - Thanks
-
Can't get Apache to server, permission denied on anything.
the_oliver replied to n5tkn's topic in Apache HTTP Server
If you do add a virtual host does it make any diffrence? Like you say the <directory> bit looks right. -
what did you run to start with? gcc blaaaa . . . . Odvious question does /usr/bin/ld exist?
-
command line php script to run at startup? Suggestions?
the_oliver replied to crees's topic in Linux
Sounds intresting! I also use php for similar resions! Anyway..... The easyest way would be to add it to /etc/rc.local . It can also be added to /etc/inittab. The main diffrence hear is that anything in rc.local is run after everything in init. If your script is reliant on other services this feature of the rc.local file may be usfull. The other option is to make it a standard init script. This will then run as a service, and you can controle its run level like any other. If you wish to go down this way it would be best to read up on chkconfig and things! i dont really know/remember enough to help you hear. In some situations this is prefrable for odvious resions, but some of the experts say it also makes the script more visible. (that a little above me!). I asume its if your going to be calling them from else where. Hope some of this is helpfull. -
Perfect. Thank you.
-
Hello, im have the following in a php script, which cron runs every now and then! [code]$c1 = "useradd ".$username." -p $(crypt ".$clearpass.")"; shell_exec('$c1');[/code] Everything else in the script works fine, except this which returns this error to me by mail: [quote]X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/root> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=root> X-Cron-Env: <USER=root> sh: useradd: command not found[/quote] Can anyone tell me where i have gone wrong? if i run useradd laura -p $(crypt laurahelm) in the comand prompt it works fine. Thanks (im running it on CentOS 4.4)
-
go on.....
-
Having a blank moment hear! I have a list of variables ($c1, $c2, $c3 etc ... ) and want the to run one by one throught a function. function($c1) followed by function($c2) etc. How do i do this? Thanks
-
ForbiddenYou don't have permission to access / on this server.
the_oliver replied to shams's topic in Apache HTTP Server
Firstly try it with 777 as the permisions to see what happens. Also chwon it to apache:apache (or whatever user name its running under). If all that fails it may be something in your <directory> tags not allowing access. Can you post you vhosts config bit? -
Can't get Apache to server, permission denied on anything.
the_oliver replied to n5tkn's topic in Apache HTTP Server
Is that all of you httpd.conf file? Where is section three? I would suggest checking everything inside <directory></directory> tags to see if its denying access there. -
why are you using ns1 and ns2 to point to an apache server? These would inply they are the DNS server for this domin? If you are running the dedicated server as you DNS server having them both point to the same box compleatly defies the point. Are you just trying to set up a web server, with works on whatever.com? You really have given us nothing clear to go on. Also using test.com with our a pretext to it (say www. or ns1. or whatever.) requires a diffrent type of record. (i asume you have writen a standard A-record for the others). Where are these host records? If you need a change to the whois poll then the ns servers need to be changed by the registra, or owner is purchaced direct from a TLD.
-
command line php script to run at startup? Suggestions?
the_oliver replied to crees's topic in Linux
It is possible to have a script run at start-up or shutdown. In this case it may be worth making this a seprate script that prompts your main script. How you do this depends very much on what distro you are running. Havent done this for a while but i seem to remember placing the script in /etc/init.d and then running somthing like "rc-update add <script> default". Idealy you want to define it as a service. By far the simplest way to do it however would be to add it as a cron task. If cron's not an option, let us know your linux distro and perhaps we can tell you more. -
[quote]recipients ID is in the TO field so anything TO id's that match theirs are displayed[/quote] When the recipiects search for rows with ID's matching there could they also look for anyrow with the letter A in the to field? or a second unique number that all users look for? + add a line into the script for there PM page stopping the PM from being deleted?
-
Try checking anything in <directory> tags to see if its assigning permisions to special folders. . . (it may also be work renaming it mail_server) Hope that helps.
-
Hello. I have virtual hosts set up with the following on an apache server, running CentOS 4.4. [code] # get the server name from the Host: header UseCanonicalName Off # this log format can be split per-virtual-host based on the first field LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon # include the server name in the filenames used to satisfy requests VirtualDocumentRoot /var/www/html/%0/docs VirtualScriptAlias /var/www/html/%0/cgi-bin [/code] This works well, however i want the DocumentRoot to be on a diffrent partition, with the mount point /www Partition is fine however when i change the code to this: [code]# include the server name in the filenames used to satisfy requests VirtualDocumentRoot /www/%0/docs VirtualScriptAlias /www/%0/cgi-bin[/code] there is a problem! The web browser always shows: [quote]Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. [/quote]Can anyone tell me where im going wrong???? - Thanks
-
What operating system are you running it on?