
mits
Members-
Posts
22 -
Joined
-
Last visited
Never
Everything posted by mits
-
i guess clob is the one for long text then
-
I'm a little confused here. I have 3 fields in my table which require long text to be entered so the standard varchar2 isn't enough. I tried the "LONG" data type but it errored saying a table can only have 1 LONG data type used. Which data type do i use to cater for text for more than one column? thanks
-
Help: Retrieving data from an oracle db
mits replied to mits's topic in Other RDBMS and SQL dialects
thanks a lot.... the below worked; ociexecute($result); ocifetchstatement($result,$tab_result); // the result will be fetched in the table $tab_result echo ocirowcount($result); -
i am completely lost now and can not work out why no data is being retrieved when i run a query. I have set up oracle and php on my localhost using; xamp oci8 library oracle 10g express (universal) oracle instant client I am establishing a connection without any problem, but when i run a query and return results, it returns 0 :S. here's the code; $connect = oci_connect('myusername', 'mypassword', '127.0.0.1'); $query = 'SELECT * FROM EMPLOYEES'; $result = OCIParse($connect, $query); OCIExecute($result); echo OCI_Num_Rows($result); it returns 0 when in fact there are 5 records...i run the same query directly using oracle's interface and it works fine, it's just not working when i try it using PHP. any advice?
-
Problem Solved: Solution: http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration i used DOCUMENT_ROOT server variable within the require and it works fine.
-
hi, thanks for that....i added the full path to the file and i get the following error; Warning: require() [function.require]: URL file-access is disabled in the server configuration in /var/www/sites/stage.demomedia.co.uk/html/quote_generator/pdf.php on line 2 Warning: require(http://www.demomedia.co.uk/quote_builder/fpdf16/fpdf.php) [function.require]: failed to open stream: no suitable wrapper could be found in /var/www/sites/stage.demomedia.co.uk/html/quote_generator/pdf.php on line 2 i think it's progress. any ideas?
-
hi, i'm using the fpdf library to generate PDF's from form input. It all worked well on my local host, but now that i have transferred to a web server it displays the following error when trying to generate a PDF. Warning: require(/fpdf16/fpdf.php) [function.require]: failed to open stream: No such file or directory in /home/ddgq0o2n/public_html/quote_builder/pdf.php on line 2 Fatal error: require() [function.require]: Failed opening required '/fpdf16/fpdf.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ddgq0o2n/public_html/quote_builder/pdf.php on line 2 i have searched for "include_path", but can't find it anywhere. i'm thinking it's a server problem, where the library may not be compatible or something needs to be switched on, as it worked fine on my local host. any help and suggestions welcome thanks.
-
Hi, I kow this is probably something simple, but i have 2 links to a RSS feed which i need to put up on a web page. Not just a link, but the actual feed rendered with a number of news headlines. One is a ".rss2.XML" link and the ither is a html link. the HTML i suppose is static, so probably not any good. thanks in advance
-
hi, i have an article with several paragraphs. However i would like the first paragraph to be converted into a header. string replacement will not work as it will replace all the p tags. i just want the 1st set of p tags to be replaced. can anyone help? thanks
-
update To make things a lil more clear. The URL should be http://127.0.0.1/projects/project_name/svn/index.php?id=schedule?PHPSESSID=1234567890 instead i get the following url when i click on the schedule link. http://127.0.0.1/projects/project_name/svn/%3Cbr?PHPSESSID=if9kjk52uv979k9duf8v9hrfs1%20/%3E%3Cb%3EDeprecated%3C/b%3E:%20%20Function%20split()%20is%20deprecated%20in%20%3Cb%3EC:\wamp\www\projects\project_name\svn\extensions\makeUrl.inc%3C/b%3E%20on%20line%20%3Cb%3E11%3C/b%3E%3Cbr%20/%3Eindex.php?id=schedule we do have a makeurl function which does the obvious. however, if i copy in the url from index.php onwards from development to local it works fine. i think the make url function is working fine on development but not on my local.
-
Hi, I'm trying to view files on my localhost and i'm getting the error Forbidden: You don't have permission to access /dir/... on this server It works fine on our development server. Upuntil now i was working on development, but i want to work from localhost. We do use session id's for all our urls, e.g. index.php?id='page'?PHPSESSID=1234567890. I'm not sure whether thats the problem. I'm guessing it's some setting in the php.ini file. I'm using WAMP, but the same issue arises with XAMPP, so it's not the server itself. Thanks in advance.
-
Connecting to Oracle 10g using PHP
mits replied to paragkalra's topic in Other RDBMS and SQL dialects
well i got oracle working with php using the above instructions. install oracle on your local machine if needed download instant client add the instant client directory to windows path enable oci8 in the php.ini file ...and you should be good to go -
Your problem can be solved by "output buffering" you can do 2 things to control this; 1) at the beginning of your php script add the function "ob_start();" OR 2) Switch on output buffering in your php.ini file. Search for "output_buffering" current;y your one is probably set to "off" Make the change and restart your server. That should do the trick regarding "headers already sent"
-
Connecting to Oracle 10g using PHP
mits replied to paragkalra's topic in Other RDBMS and SQL dialects
My next project will involve using an Oracle DB with PHP instead of the usual MySQL. I've read a little about PHP and Oracle and so far I have done the following. 1) Installed Oracle 10g express 2) Downloaded Oracle Instant Client As far as i'm aware, i need to do the following; 1) Add the path of the Instant Client to the windows PATH 2) uncomment the OCI8 library in the php.ini file under extensions. and hopefully all should be fine! is there anything else I will need to do to configure PHP with Oracle? I'm going to go via http://www.oracle.com/technology/pub/notes/technote_php_instant.html ...and hope for the best! -
Replace empty line with a <br> tag from a php read text file...
mits replied to mits's topic in PHP Coding Help
oops! i have tried it now and it works fine. I used the follwing code. <?php $file = "line_break.txt"; $handle = fopen($file, "r"); $string = fread($handle, filesize($file)); echo nl2br($string); ?> .. and it works exactly how i want. thanks -
Replace empty line with a <br> tag from a php read text file...
mits replied to mits's topic in PHP Coding Help
that isn't going to work for what i want. That assumes i have a "\n" for all line breaks. That just replaces \n or \r with the br tag. the text file has no html coding....it's a text file with plain text. -
Is there a way i can read a text file and add a br tag where ever there is an empty line. for example; at the moment i have a text file which says "hello 123 456 world abc xyz dfdfd dfdf" there is a blank line between the hello and world. I need a way to add a br tag in between the 2 lines so when it displays it displays exactly as it is in the text file. currently when i print out the contents of the file, it ignores the line breaks. so to sum up, - read an external text file line by line - replace or add a br tag where ever PHP finds an empty line. thanks
-
it's OK, i have done it. i used the following formula; Using the GBP as the base currency EUR to USD = 1.425 ### formula ### $base_from = GBP to EUR = 1.136 $base_to = GBP to USD = 1.620 $rate = $base_to / $base_from = 1.620 / 1.136 = EUR to USD = 1.425 this system will cater for a lot more currencies e.g. 50 as mentioned above. Just add the rate to the pound in the array.
-
thanks for your replies. the task is just an exercise. It won't involve a database. If there are any tutorials out there, then that would be great. or if someone could just explain the logic behind such a system, then i can work it out using PHP.
-
Hi, i'm trying to build a currency converter which can cater for a range of currencies. Say about 40 different ones. i was going to try using a multi-dimensional array, but that won't be very efficient for a system requiring lots of currencies. what is the best way to go about doing this? and are there any tutorials out there which i can learn from. PS: I want to build this myself from scratch so please don't lead me to libraries etc. thanks in advance
-
well following on from my "PHP Frameworks for beginners?" thread, I have decided to go for YII. After my research, I found it is probably the future one which companies will sway towards. Either YII or Symphony. So i've downloaded YII and so far i have been very impressed. However, due to its relatively late entrance, it does lack documentation, but it will only increase over time. Also once the initial configuration is sorted then most of it falls into place. Apparently it is very similar to the Ruby on Rails framework, hence why it looks to be a very promising framework. Anyone else using this framework? What are your thoughts? Any decent tutorials out there?
-
i'm a recent graduate so don't have any experience of php frameworks. i've heard about the main one's in Zend, Symphony, Cake, CodeIgnitor etc. But as a complete beginner and novice to frameworks, which one should i go for?
-
Hi i'm new to the forum. I am a recent graduate and am looking for my first php developer role. Based in London, UK.